from smolagents import Tool | |
from typing import Any, Optional | |
class SimpleTool(Tool): | |
name = "simple_tool" | |
description = "A simple test tool." | |
inputs = {"text":{"type":"string","description":"Some input text"}} | |
output_type = "string" | |
def forward(self, text: str) -> str: | |
""" | |
A simple test tool. | |
Args: | |
text: Some input text | |
""" | |
return f"Processed: {text}" |