Refactor tool execution logic to improve handling of callable tools and None responses

pull/923/head
harshalmore31 6 days ago
parent e5a5eaecea
commit 57eff390a5

@ -1080,12 +1080,11 @@ class Agent:
# Print
self.pretty_print(response, loop_count)
# Handle tools
# Check and execute callable tools
if exists(self.tools):
if (
hasattr(self, "tool_struct")
and self.tool_struct is not None
and self.output_raw_json_from_tool_call
is True
self.tool_struct is not None
and self.output_raw_json_from_tool_call is True
):
response = response
else:

Loading…
Cancel
Save