From db64c46e5f7bcef934f32ac35372d9bb327575bc Mon Sep 17 00:00:00 2001 From: Aymeric Date: Thu, 26 Dec 2024 19:27:05 +0100 Subject: [PATCH] Clarify tool.save() docstring --- src/smolagents/tools.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/smolagents/tools.py b/src/smolagents/tools.py index 50abe4a..b540e3a 100644 --- a/src/smolagents/tools.py +++ b/src/smolagents/tools.py @@ -242,12 +242,11 @@ class Tool: Saves the relevant code files for your tool so it can be pushed to the Hub. This will copy the code of your tool in `output_dir` as well as autogenerate: - - an `app.py` file so that your tool can be converted to a space + - a `tool.py` file containing the logic for your tool. + - an `app.py` file providing an UI for your tool when it is exported to a Space with `tool.push_to_hub()` - a `requirements.txt` containing the names of the module used by your tool (as detected when inspecting its code) - You should only use this method to save tools that are defined in a separate module (not `__main__`). - Args: output_dir (`str`): The folder in which you want to save your tool. """