fix: handle bad tool name input

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

No files matched your search

+4
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"