Просмотр исходного кода

chore: wont parse finished result

Yidadaa 2 лет назад
Родитель
Сommit
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;