-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docstring args for ToolCallingAgent, CodeAgent and ManagedAgent #335
docstring args for ToolCallingAgent, CodeAgent and ManagedAgent #335
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you saw my PR:
Indeed, I am not sure about the syntax in a couple of lines.
My idea was to check them in the PR docs, but its deployment is not working at the moment.
Once this fixed, I will check/fix my syntax doubts.
@albertvillanova I was going to do this yesterday, but I thought it will cause issues and today I saw your PR, so I did the rest of them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
src/smolagents/agents.py
Outdated
@@ -655,6 +655,14 @@ def planning_step(self, task, is_first_step: bool, step: int) -> None: | |||
class ToolCallingAgent(MultiStepAgent): | |||
""" | |||
This agent uses JSON-like tool calls, using method `model.get_tool_call` to leverage the LLM engine's tool calling capabilities. | |||
|
|||
Args: | |||
tools (`list[Tool]`):List of tools that the agent can use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tools (`list[Tool]`):List of tools that the agent can use. | |
tools (`list[Tool]`): List of tools that the agent can use. |
src/smolagents/agents.py
Outdated
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. | ||
grammar (`dict[str, str]`, *optional*): Grammar used to parse the LLM output. | ||
additional_authorized_imports (`list[str]`, *optional*): List of additional imports that are authorized for the agent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not use its type (List) to define the parameter.
agent (`object`): The agent to be managed. | ||
name (`str`): The name of the managed agent. | ||
description (`str`): A description of the managed agent. | ||
additional_prompting (`Optional[str]`, *optional*): Additional prompting for the managed agent. Defaults to None. | ||
provide_run_summary (`bool`, *optional*): Whether to provide a run summary after the agent completes its task. Defaults to False. | ||
managed_agent_prompt (`Optional[str]`, *optional*): Custom prompt for the managed agent. Defaults to None. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's align the definitions with the ones above: better not start the description with "the" or "a".
agent (`object`): The agent to be managed. | ||
name (`str`): The name of the managed agent. | ||
description (`str`): A description of the managed agent. | ||
additional_prompting (`Optional[str]`, *optional*): Additional prompting for the managed agent. Defaults to None. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant Optional[]
and *optional*
. Better removing the first one.
Add args to
ToolCallingAgent ``CodeAgent
andManagedAgent
docstring.