File size: 430 Bytes
b399f21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()