Skip to content

Commit

Permalink
Add docstring for MultiStepAgent.from_folder
Browse files Browse the repository at this point in the history
  • Loading branch information
albertvillanova committed Feb 14, 2025
1 parent d33bc2d commit ab6dcf2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/smolagents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,12 @@ def from_hub(

@classmethod
def from_folder(cls, folder: Union[str, Path], **kwargs):
"""Loads an agent from a local folder"""
"""Loads an agent from a local folder.
Args:
folder (`str` or `Path`): The folder where the agent is saved.
**kwargs: Additional keyword arguments that will be passed to the agent's init.
"""
folder = Path(folder)
agent_dict = json.loads((folder / "agent.json").read_text())

Expand Down

0 comments on commit ab6dcf2

Please sign in to comment.