Bläddra i källkod

fix: empty response

Dogtiti 1 år sedan
förälder
incheckning
4a8e85c28a
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      app/client/platforms/openai.ts

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

@@ -135,7 +135,7 @@ export class ChatGPTApi implements LLMApi {
         },
       ];
     }
-    return res.choices?.at(0)?.message?.content ?? "";
+    return res.choices?.at(0)?.message?.content ?? res;
   }
 
   async chat(options: ChatOptions) {