mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-03 19:30:04 +08:00
fix[MCP]: enhance tool call handling in OpenAIProvider (#3642)
This commit is contained in:
parent
4119aa7b6a
commit
1df26412d0
@ -497,7 +497,7 @@ export default class OpenAIProvider extends BaseProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (finishReason === 'tool_calls') {
|
if (finishReason === 'tool_calls' || (finishReason === 'stop' && Object.keys(final_tool_calls).length > 0)) {
|
||||||
const toolCalls = Object.values(final_tool_calls).map(this.cleanToolCallArgs)
|
const toolCalls = Object.values(final_tool_calls).map(this.cleanToolCallArgs)
|
||||||
console.log('start invoke tools', toolCalls)
|
console.log('start invoke tools', toolCalls)
|
||||||
if (this.isZhipuTool(model)) {
|
if (this.isZhipuTool(model)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user