Selaa lähdekoodia

fix: empty response

Dogtiti 1 vuosi sitten
vanhempi
commit
4a8e85c28a
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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) {