🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
chore: better error msg (#3361)
Wendong-Fana9c834984a05
diff --git a/camel/toolkits/function_tool.py b/camel/toolkits/function_tool.pyindex 8de871b71..e734eb5d5 100644--- a/camel/toolkits/function_tool.py+++ b/camel/toolkits/function_tool.py@@ -482,10 +482,15 @@ class FunctionTool:result = self.func(*args, **kwargs)return resultexcept Exception as e:+ parts = []+ if args:+ parts.append(f"args={args}")+ if kwargs:+ parts.append(f"kwargs={kwargs}")+ args_str = ", ".join(parts) if parts else "no arguments"raise ValueError(f"Execution of function {self.func.__name__} failed with "- f"arguments {args} and {kwargs}. "- f"Error: {e}"+ f"{args_str}. Error: {e}")async def async_call(self, *args: Any, **kwargs: Any) -> Any: