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

fix: typo in function tool

Wendongef67a9c9e30a
diff --git a/camel/toolkits/function_tool.py b/camel/toolkits/function_tool.py
index 529eb81a0..2c3621a04 100644
--- a/camel/toolkits/function_tool.py
+++ b/camel/toolkits/function_tool.py
@@ -547,7 +547,7 @@ class FunctionTool:
"""
self.openai_tool_schema["function"]["description"] = description
- def get_paramter_description(self, param_name: str) -> str:
+ def get_parameter_description(self, param_name: str) -> str:
r"""Gets the description of a specific parameter from the function
schema.
@@ -563,7 +563,7 @@ class FunctionTool:
param_name
]["description"]
- def set_paramter_description(
+ def set_parameter_description(
self,
param_name: str,
description: str,
diff --git a/test/toolkits/test_openai_function.py b/test/toolkits/test_openai_function.py
index 9f733bb7b..980de1420 100644
--- a/test/toolkits/test_openai_function.py
+++ b/test/toolkits/test_openai_function.py
@@ -426,15 +426,17 @@ def test_get_set_openai_tool_schema():
def test_get_set_parameter_description():
add = FunctionTool(add_with_doc)
- assert add.get_paramter_description("a") == "The first number to be added."
- add.set_paramter_description("a", "New description for a.")
- assert add.get_paramter_description("a") == "New description for a."
+ assert (
+ add.get_parameter_description("a") == "The first number to be added."
+ )
+ add.set_parameter_description("a", "New description for a.")
+ assert add.get_parameter_description("a") == "New description for a."
def test_get_set_parameter_description_non_existing():
add = FunctionTool(add_with_doc)
with pytest.raises(KeyError):
- add.get_paramter_description("non_existing")
+ add.get_parameter_description("non_existing")
def test_get_set_openai_function_schema():