Explorar el Código

chore: wont parse finished result

Yidadaa hace 2 años
padre
commit
85445c4ef2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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;