mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-07 22:10:21 +08:00
fix[MCP]: enhance tool call handling in OpenAIProvider (#3642)
This commit is contained in:
parent
d7b542bbc8
commit
8afd416cdd
@ -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