albertvillanova's picture
Upload tool
f332d77 verified
raw
history blame contribute delete
428 Bytes
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}"