fix:修复部分LLM在工具调用时数据被空字符串覆盖的问题

This commit is contained in:
3030332422
2025-11-06 16:42:28 +08:00
parent 53ee24f828
commit 09dee65239
+2 -2
View File
@@ -798,9 +798,9 @@ class ConnectionHandler:
if tools_call is not None and len(tools_call) > 0:
tool_call_flag = True
if tools_call[0].id is not None:
if tools_call[0].id is not None and tools_call[0].id != "":
function_id = tools_call[0].id
if tools_call[0].function.name is not None:
if tools_call[0].function.name is not None and tools_call[0].function.name != "":
function_name = tools_call[0].function.name
if tools_call[0].function.arguments is not None:
function_arguments += tools_call[0].function.arguments