Skip to content

Commit bdf7a94

Browse files
authored
Merge pull request #2 from pablioRichardy/formatting-endpoint-name-before-tool
fix: solving function name problem updating to a valid one by formatt…
2 parents d00d201 + c11c63c commit bdf7a94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

agentle/agents/apis/endpoint.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,9 +592,11 @@ async def endpoint_callable(**kwargs: Any) -> Any:
592592

593593
tool_parameters[param.name] = param_info
594594

595+
tool_name = "_".join(self.name.lower().split())
596+
595597
# Create the tool
596598
tool = Tool(
597-
name=self.name,
599+
name=tool_name,
598600
description=self.get_enhanced_description(),
599601
parameters=tool_parameters,
600602
)

0 commit comments

Comments
 (0)