mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
fix:修复部分LLM在工具调用时数据被空字符串覆盖的问题
This commit is contained in:
parent
53ee24f828
commit
09dee65239
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue