From 7736837d62efed1dbebfe579472fca041eda12d6 Mon Sep 17 00:00:00 2001 From: Plamen Minev Date: Thu, 5 Dec 2024 23:36:41 +0200 Subject: [PATCH] fix(server) : not show alert when DONE is received (#10674) --- examples/server/public_simplechat/simplechat.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/server/public_simplechat/simplechat.js b/examples/server/public_simplechat/simplechat.js index 8e0df3b61df2b..2fcd24a860bd4 100644 --- a/examples/server/public_simplechat/simplechat.js +++ b/examples/server/public_simplechat/simplechat.js @@ -407,6 +407,9 @@ class SimpleChat { if (curLine.startsWith("data:")) { curLine = curLine.substring(5); } + if (curLine.trim() === "[DONE]") { + break; + } let curJson = JSON.parse(curLine); console.debug("DBUG:SC:PART:Json:", curJson); this.append_response(this.response_extract_stream(curJson, apiEP));