Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

chore: Improve `validate_openai_tool_schema` warning: include function name and details (#2703)

Lei Zhang981cdc665f7c
diff --git a/camel/toolkits/function_tool.py b/camel/toolkits/function_tool.py
index fb0ec093f..8a386a353 100644
--- a/camel/toolkits/function_tool.py
+++ b/camel/toolkits/function_tool.py
@@ -531,9 +531,10 @@ class FunctionTool:
param_dict = properties[param_name]
if "description" not in param_dict:
warnings.warn(
- f"Parameter description is missing "
- f"for {param_dict}. This may affect the "
- f"quality of tool calling."
+ f"Parameter description is missing for the "
+ f"function '{openai_tool_schema['function']['name']}'. "
+ f"The parameter definition is {param_dict}. "
+ f"This may affect the quality of tool calling."
)
def get_openai_tool_schema(self) -> Dict[str, Any]: