Update agent code and tool schema

This commit is contained in:
Liang Jiaqing
2026-02-01 16:07:18 +08:00
parent 5185416cb9
commit f0ccb7dfb9
4 changed files with 8 additions and 5 deletions

View File

@@ -180,7 +180,7 @@ class ToolClient:
data = tryparse(json_str)
func_name = data.get('function') or data.get('tool')
args = data.get('arguments') or data.get('args')
if args is None: args = {}
if args is None: args = data
if func_name: tool_calls = [MockToolCall(func_name, args)]
except json.JSONDecodeError:
print("[Warn] Failed to parse tool_use JSON:", json_str)