Spaces:
Sleeping
Sleeping
| from smolagents import Tool | |
| class AdditionTool(Tool): | |
| name = "add_numbers" | |
| description = """ | |
| This is a tool that adds two numbers.""" | |
| inputs = { | |
| "a": { | |
| "type": "number", | |
| "description": "the first number", | |
| }, | |
| "b": { | |
| "type": "number", | |
| "description": "the second number", | |
| }, | |
| } | |
| output_type = "number" | |
| def forward(self, a: float, b: float) -> float: | |
| return a + b | |
| addition_tool = AdditionTool() | |