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[] }