From 78991f70b1ef8e34ba9bef29d7b42c1b1285bf6a Mon Sep 17 00:00:00 2001 From: Fabio Espinosa Date: Wed, 12 Feb 2025 11:45:38 +0100 Subject: [PATCH] Fix issue #606: Fixed wrong parameter name. toolcalling_agent.yaml states that the argument to be given in the call is called 'request' and not 'task'. Name also changed on agent test --- src/smolagents/agents.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smolagents/agents.py b/src/smolagents/agents.py index be40f2591..96b1aa5c9 100644 --- a/src/smolagents/agents.py +++ b/src/smolagents/agents.py @@ -766,14 +766,14 @@ def replay(self, detailed: bool = False): """ self.memory.replay(self.logger, detailed=detailed) - def __call__(self, task: str, **kwargs): + def __call__(self, request: str, **kwargs): """Adds additional prompting for the managed agent, runs it, and wraps the output. This method is called only by a managed agent. """ full_task = populate_template( self.prompt_templates["managed_agent"]["task"], - variables=dict(name=self.name, task=task), + variables=dict(name=self.name, task=request), ) report = self.run(full_task, **kwargs) answer = populate_template(