Skip to content

Commit

Permalink
fix: prefix execute_tool first param to avoid name clashes
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Dec 10, 2024
1 parent 03f5ddc commit e8bcaee
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/llmling/config/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,15 @@ def tools(self) -> dict[str, LLMCallableTool]:
"""
return dict(self._tool_registry)

async def execute_tool(self, name: str, **params: Any) -> Any:
async def execute_tool(
self,
_name: str, # prefixed with "_" to avoid name collisions
**params: Any,
) -> Any:
"""Execute a tool by name.
Args:
name: Name of the tool to execute
_name: Name of the tool to execute
**params: Parameters to pass to the tool
Returns:
Expand All @@ -607,7 +611,7 @@ async def execute_tool(self, name: str, **params: Any) -> Any:
Raises:
ToolError: If tool execution fails
"""
return await self._tool_registry.execute(name, **params)
return await self._tool_registry.execute(_name, **params)

def get_tool(self, name: str) -> LLMCallableTool:
"""Get a tool by name.
Expand Down

0 comments on commit e8bcaee

Please sign in to comment.