henryk's picture
Update tools.py
a16ede3 verified
raw
history blame
324 Bytes
from smolagents import Tool
class TextTransformerTool(Tool):
name = "text_transformer"
description = "Reverses the input text."
inputs = {
"text": {"type": "string", "description": "Text to reverse."}
}
output_type = "string"
def forward(self, text: str) -> str:
return text[::-1]