mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-13 07:03:45 +00:00
gracefully end stream
This commit is contained in:
parent
dbf3011cba
commit
a00bb3063d
1 changed files with 2 additions and 2 deletions
|
|
@ -136,7 +136,7 @@ export default {
|
|||
const encodedChunk = converter.encode("data: " + JSON.stringify({ "response": chunkText }) + "\n\n");
|
||||
controller.enqueue(encodedChunk);
|
||||
}
|
||||
const doneChunk = converter.encode("[DONE]");
|
||||
const doneChunk = converter.encode("data: [DONE]");
|
||||
controller.enqueue(doneChunk);
|
||||
controller.close();
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ export default {
|
|||
const encodedChunk = converter.encode("data: " + JSON.stringify({ "response": chunkText }) + "\n\n");
|
||||
controller.enqueue(encodedChunk);
|
||||
}
|
||||
const doneChunk = converter.encode("[DONE]");
|
||||
const doneChunk = converter.encode("data: [DONE]");
|
||||
controller.enqueue(doneChunk);
|
||||
controller.close();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue