Fix arg passing to AgentExecutionError (#309)

This commit is contained in:
Albert Villanova del Moral 2025-01-22 11:13:59 +01:00 committed by GitHub
parent a721837c57
commit 117014d2e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -394,7 +394,7 @@ class MultiStepAgent:
observation = available_tools[tool_name].__call__(**arguments, sanitize_inputs_outputs=True) observation = available_tools[tool_name].__call__(**arguments, sanitize_inputs_outputs=True)
else: else:
error_msg = f"Arguments passed to tool should be a dict or string: got a {type(arguments)}." error_msg = f"Arguments passed to tool should be a dict or string: got a {type(arguments)}."
raise AgentExecutionError(error_msg, self.logger, self.logger) raise AgentExecutionError(error_msg, self.logger)
return observation return observation
except Exception as e: except Exception as e:
if tool_name in self.tools: if tool_name in self.tools: