from typing import Any from smolagents.tools import Tool class FinalAnswerTool(Tool): name = "final_answer" description = "Returns the final answer generated by the LLM." inputs = {"answer": {"type": "any", "description": "The final answer to output"}} output_type = "any" def forward(self, answer: Any) -> Any: # Just pass through whatever the LLM returns. return answer def __init__(self, *args, **kwargs): self.is_initialized = False