albertvillanova's picture
Upload tool
b399f21 verified
raw
history blame contribute delete
430 Bytes
from smolagents import Tool
from typing import Any, Optional
class SimpleTool(Tool):
name = "valid_tool_function"
description = "A valid tool function."
inputs = {"input":{"type":"string","description":"Input string."}}
output_type = "string"
def forward(self, input: str) -> str:
"""A valid tool function.
Args:
input (str): Input string.
"""
return input.upper()