from typing import Any, Optional from smolagents.tools import Tool class UserInputTool(Tool): name = "user_input" description = "Asks for user's input on a specific question" inputs = {"question": {"type": "string", "description": "The question to ask the user"}} output_type = "string" def forward(self, question): user_input = input(f"{question} => Type your answer here:") return user_input def __init__(self, *args, **kwargs): self.is_initialized = False