Spaces:
Sleeping
Sleeping
File size: 449 Bytes
c52d511 ba25b4b c52d511 ba25b4b c52d511 ba25b4b c52d511 ba25b4b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# tools/final_answer.py
from typing import Any
from smolagents import tool
@tool
class FinalAnswerTool:
name = "final_answer" # Required by smolagents
description = "A tool to provide the final answer"
def __call__(self, answer: str) -> str:
"""Tool to provide a final answer
Args:
answer: The final answer to return
"""
return answer
def __str__(self) -> str:
return self.name |