fix(OpenAIProvider): Enhanced function arguments fault tolerance (#3267)
This commit is contained in:
parent
a0fde96b40
commit
52de270d04
@ -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…
x
Reference in New Issue
Block a user