File size: 428 Bytes
f332d77 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
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}" |