Skip to content

Commit

Permalink
Fix issue huggingface#606: Fixed wrong parameter name. toolcalling_ag…
Browse files Browse the repository at this point in the history
…ent.yaml states that the argument to be given in the call is called 'request' and not 'task'. Name also changed on agent test
  • Loading branch information
Fabio Espinosa committed Feb 14, 2025
1 parent 8348367 commit 78991f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/smolagents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 78991f7

Please sign in to comment.