mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
fix:修复部分LLM在工具调用时数据被空字符串覆盖的问题
This commit is contained in:
@@ -798,9 +798,9 @@ class ConnectionHandler:
|
|||||||
|
|
||||||
if tools_call is not None and len(tools_call) > 0:
|
if tools_call is not None and len(tools_call) > 0:
|
||||||
tool_call_flag = True
|
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
|
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
|
function_name = tools_call[0].function.name
|
||||||
if tools_call[0].function.arguments is not None:
|
if tools_call[0].function.arguments is not None:
|
||||||
function_arguments += tools_call[0].function.arguments
|
function_arguments += tools_call[0].function.arguments
|
||||||
|
|||||||
Reference in New Issue
Block a user