From 0217d3fd58c09633eefbd3059bfccc86c9da8b5d Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Thu, 23 Jan 2025 17:38:09 +0100 Subject: [PATCH] Fix MultiStepAgent docstring (#336) * Fix MultiStepAgent docstring * Force PR doc build --- docs/source/en/reference/agents.md | 3 --- src/smolagents/agents.py | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/source/en/reference/agents.md b/docs/source/en/reference/agents.md index bfe41fe..77a0df1 100644 --- a/docs/source/en/reference/agents.md +++ b/docs/source/en/reference/agents.md @@ -35,17 +35,14 @@ We provide two types of agents, based on the main [`Agent`] class. Both require arguments `model` and list of tools `tools` at initialization. - ### Classes of agents - [[autodoc]] MultiStepAgent [[autodoc]] CodeAgent [[autodoc]] ToolCallingAgent - ### ManagedAgent [[autodoc]] ManagedAgent diff --git a/src/smolagents/agents.py b/src/smolagents/agents.py index 416d221..0123a3d 100644 --- a/src/smolagents/agents.py +++ b/src/smolagents/agents.py @@ -164,8 +164,8 @@ class MultiStepAgent: While the objective is not reached, the agent will perform a cycle of action (given by the LLM) and observation (obtained from the environment). Args: - tools (`list[[`Tool`]]`): List of tools that the agent can use. - model (Callable[[list[dict[str, str]]], [`ChatMessage`]]): Model that will generate the agent's actions. + tools (`list[Tool]`): [`Tool`]s that the agent can use. + model (`Callable[[list[dict[str, str]]], ChatMessage]`): Model that will generate the agent's actions. system_prompt (`str`, *optional*): System prompt that will be used to generate the agent's actions. tool_description_template (`str`, *optional*): Template used to describe the tools in the system prompt. max_steps (`int`, default `6`): Maximum number of steps the agent can take to solve the task. @@ -173,8 +173,8 @@ class MultiStepAgent: add_base_tools (`bool`, default `False`): Whether to add the base tools to the agent's tools. verbosity_level (`int`, default `1`): Level of verbosity of the agent's logs. grammar (`dict[str, str]`, *optional*): Grammar used to parse the LLM output. - managed_agents (`list`, *optional*): List of managed agents that the agent can call. - step_callbacks (`list[Callable]`, *optional*): List of callbacks that will be called at each step. + managed_agents (`list`, *optional*): Managed agents that the agent can call. + step_callbacks (`list[Callable]`, *optional*): Callbacks that will be called at each step. planning_interval (`int`, *optional*): Interval at which the agent will run a planning step. """