Skip to content

Commit 7736837

Browse files
authored
fix(server) : not show alert when DONE is received (#10674)
1 parent c9c6e01 commit 7736837

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/server/public_simplechat/simplechat.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,9 @@ class SimpleChat {
407407
if (curLine.startsWith("data:")) {
408408
curLine = curLine.substring(5);
409409
}
410+
if (curLine.trim() === "[DONE]") {
411+
break;
412+
}
410413
let curJson = JSON.parse(curLine);
411414
console.debug("DBUG:SC:PART:Json:", curJson);
412415
this.append_response(this.response_extract_stream(curJson, apiEP));

0 commit comments

Comments
 (0)