Spaces:
Sleeping
Sleeping
| from smolagents import Tool | |
| from typing import Any, Optional | |
| class SimpleTool(Tool): | |
| name = "simple_tool" | |
| description = "A simple tool that returns a string." | |
| inputs = {"msg":{"type":"string","description":"A string message."}} | |
| output_type = "string" | |
| def forward(self, msg: str)->str: | |
| """ | |
| A simple tool that returns a string. | |
| Args: | |
| msg: A string message. | |
| Returns: | |
| str: The same string message. | |
| """ | |
| print(msg) | |
| return "Hello, world!" |