mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 06:19:05 +08:00
fix(OpenAIProvider): Enhanced function arguments fault tolerance (#3267)
This commit is contained in:
parent
a98fcfb68d
commit
42fc107503
@ -373,6 +373,9 @@ export default class OpenAIProvider extends BaseProvider {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (let i = 0; i < chunkToolCalls.length; i++) {
|
for (let i = 0; i < chunkToolCalls.length; i++) {
|
||||||
|
if (typeof toolCalls[i].function.arguments !== 'string') {
|
||||||
|
toolCalls[i].function.arguments = ''
|
||||||
|
}
|
||||||
toolCalls[i].function.arguments += chunkToolCalls[i].function?.arguments || ''
|
toolCalls[i].function.arguments += chunkToolCalls[i].function?.arguments || ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user