瀏覽代碼

chore: wont parse finished result

Yidadaa 1 年之前
父節點
當前提交
85445c4ef2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/client/platforms/openai.ts

+ 1 - 1
app/client/platforms/openai.ts

@@ -123,7 +123,7 @@ export class ChatGPTApi implements LLMApi {
             }
           },
           onmessage(msg) {
-            if (msg.data === "[DONE]") {
+            if (msg.data === "[DONE]" || finished) {
               return finish();
             }
             const text = msg.data;