فهرست منبع

fix content-type = text/event-stream;charset=utf-8

kirk.shan 1 سال پیش
والد
کامیت
789f3d993c
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      app/client/platforms/openai.ts

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

@@ -99,7 +99,9 @@ export class ChatGPTApi implements LLMApi {
 
             if (
               !res.ok ||
-              res.headers.get("content-type") !== EventStreamContentType ||
+              !res.headers
+                .get("content-type")
+                ?.startsWith(EventStreamContentType) ||
               res.status !== 200
             ) {
               const responseTexts = [responseText];