Skip to content

Commit ef67a9c

Browse files
committed
fix: typo in function tool
1 parent 6a22e52 commit ef67a9c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

camel/toolkits/function_tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ def set_function_description(self, description: str) -> None:
547547
"""
548548
self.openai_tool_schema["function"]["description"] = description
549549

550-
def get_paramter_description(self, param_name: str) -> str:
550+
def get_parameter_description(self, param_name: str) -> str:
551551
r"""Gets the description of a specific parameter from the function
552552
schema.
553553
@@ -563,7 +563,7 @@ def get_paramter_description(self, param_name: str) -> str:
563563
param_name
564564
]["description"]
565565

566-
def set_paramter_description(
566+
def set_parameter_description(
567567
self,
568568
param_name: str,
569569
description: str,

test/toolkits/test_openai_function.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,15 +426,17 @@ def test_get_set_openai_tool_schema():
426426

427427
def test_get_set_parameter_description():
428428
add = FunctionTool(add_with_doc)
429-
assert add.get_paramter_description("a") == "The first number to be added."
430-
add.set_paramter_description("a", "New description for a.")
431-
assert add.get_paramter_description("a") == "New description for a."
429+
assert (
430+
add.get_parameter_description("a") == "The first number to be added."
431+
)
432+
add.set_parameter_description("a", "New description for a.")
433+
assert add.get_parameter_description("a") == "New description for a."
432434

433435

434436
def test_get_set_parameter_description_non_existing():
435437
add = FunctionTool(add_with_doc)
436438
with pytest.raises(KeyError):
437-
add.get_paramter_description("non_existing")
439+
add.get_parameter_description("non_existing")
438440

439441

440442
def test_get_set_openai_function_schema():

0 commit comments

Comments
 (0)