瀏覽代碼

fix: empty response

Dogtiti 1 年之前
父節點
當前提交
4a8e85c28a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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) {