From 65bb1539e216340013e5518b51c77de15d9aeb47 Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Thu, 30 Jan 2025 11:48:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20content=E5=92=8Creasoning=5Fcontent?= =?UTF-8?q?=E6=98=AF=E5=90=8C=E6=97=B6=E5=87=BA=E7=8E=B0=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/openai/chatgpt-api.js | 4 +--- utils/openai/chatgpt-api.ts | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/utils/openai/chatgpt-api.js b/utils/openai/chatgpt-api.js index 1e8beb3..e3e54d9 100644 --- a/utils/openai/chatgpt-api.js +++ b/utils/openai/chatgpt-api.js @@ -304,9 +304,7 @@ var ChatGPTAPI = /** @class */ (function () { else if (message_1.tool_calls) { result.functionCall = message_1.tool_calls.map(function (tool) { return tool.function; })[0]; } - else if (message_1.reasoning_content) { - result.thinking_text = message_1.reasoning_content; - } + result.thinking_text = message_1.reasoning_content; if (message_1.role) { result.role = message_1.role; } diff --git a/utils/openai/chatgpt-api.ts b/utils/openai/chatgpt-api.ts index 0987a5c..c7ac533 100644 --- a/utils/openai/chatgpt-api.ts +++ b/utils/openai/chatgpt-api.ts @@ -316,9 +316,8 @@ export class ChatGPTAPI { result.functionCall = message.function_call } else if (message.tool_calls) { result.functionCall = message.tool_calls.map(tool => tool.function)[0] - } else if (message.reasoning_content) { - result.thinking_text = message.reasoning_content } + result.thinking_text = message.reasoning_content if (message.role) { result.role = message.role }