mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-29 04:35:05 +00:00
fix(server) : not show alert when DONE is received (#10674)
This commit is contained in:
@ -407,6 +407,9 @@ class SimpleChat {
|
|||||||
if (curLine.startsWith("data:")) {
|
if (curLine.startsWith("data:")) {
|
||||||
curLine = curLine.substring(5);
|
curLine = curLine.substring(5);
|
||||||
}
|
}
|
||||||
|
if (curLine.trim() === "[DONE]") {
|
||||||
|
break;
|
||||||
|
}
|
||||||
let curJson = JSON.parse(curLine);
|
let curJson = JSON.parse(curLine);
|
||||||
console.debug("DBUG:SC:PART:Json:", curJson);
|
console.debug("DBUG:SC:PART:Json:", curJson);
|
||||||
this.append_response(this.response_extract_stream(curJson, apiEP));
|
this.append_response(this.response_extract_stream(curJson, apiEP));
|
||||||
|
Reference in New Issue
Block a user