From 4b9dd0395d2767d1714993cf09d6d7a835967320 Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Thu, 30 Jan 2025 11:42:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=9D=9E=E6=B5=81=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E6=80=9D=E8=80=83=E8=BD=AC=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/openai/chatgpt-api.js | 3 +++ utils/openai/types.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/openai/chatgpt-api.js b/utils/openai/chatgpt-api.js index 86f26a7..1e8beb3 100644 --- a/utils/openai/chatgpt-api.js +++ b/utils/openai/chatgpt-api.js @@ -304,6 +304,9 @@ 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; + } if (message_1.role) { result.role = message_1.role; } diff --git a/utils/openai/types.ts b/utils/openai/types.ts index d2df1dd..f40fced 100644 --- a/utils/openai/types.ts +++ b/utils/openai/types.ts @@ -288,7 +288,7 @@ export namespace openai { * @memberof ChatCompletionResponseMessage */ content: string - + reasoning_content: string function_call: FunctionCall, tool_calls: ToolCall[] }