mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
fix: toolCall.function.arguments maybe undefined (#2545)
当arg===undefined时,会导致 currentTool.function.arguments += arg; 字符串拼接出问题。
This commit is contained in:
parent
450167c951
commit
14bd1b5404
|
|
@ -432,7 +432,7 @@ async function streamResponse({
|
|||
}
|
||||
|
||||
/* arg 插入最后一个工具的参数里 */
|
||||
const arg: string = toolCall?.function?.arguments;
|
||||
const arg: string = toolCall?.function?.arguments ?? '';
|
||||
const currentTool = toolCalls[toolCalls.length - 1];
|
||||
|
||||
if (currentTool) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue