fix: handle bad tool name input

This commit is contained in:
Alex
2025-02-10 16:20:37 +00:00
parent 7db7c9e978
commit 60772889d5
5 changed files with 66 additions and 13 deletions

View File

@@ -52,6 +52,10 @@ class Agent:
},
}
for tool_id, tool in tools_dict.items()
if (
(tool["name"] == "api_tool" and "actions" in tool.get("config", {}))
or (tool["name"] != "api_tool" and "actions" in tool)
)
for action in (
tool["config"]["actions"].values()
if tool["name"] == "api_tool"