Spaces:
Sleeping
Sleeping
Download tools/base_tool.py from FD900/Final_Assignment_Template: direct link, hf CLI and curl.
- Browser
- Download file 509 Bytes
-
https://huggingface.co/spaces/FD900/Final_Assignment_Template/resolve/d6ca7ae70c23a88c91e7e77285c52d6c19d77e48/tools/base_tool.py
- Command line
-
hf download hf://spaces/FD900/Final_Assignment_Template@d6ca7ae70c23a88c91e7e77285c52d6c19d77e48/tools/base_tool.py
-
curl -L -o base_tool.py https://huggingface.co/spaces/FD900/Final_Assignment_Template/resolve/d6ca7ae70c23a88c91e7e77285c52d6c19d77e48/tools/base_tool.py
509 Bytes
| class BaseTool: | |
| """ | |
| A base class that defines the interface for tools. | |
| Each tool should define: | |
| - name: Unique identifier for the tool | |
| - description: What the tool does | |
| - inputs: A dictionary describing input arguments | |
| - output_type: The expected output format | |
| """ | |
| name: str | |
| description: str | |
| inputs: dict | |
| output_type: str | |
| def forward(self, *args, **kwargs): | |
| raise NotImplementedError("Each tool must implement the forward method.") | |