Spaces:
Sleeping
Sleeping
File size: 518 Bytes
c52d511 413d2b0 c52d511 413d2b0 c52d511 413d2b0 ba25b4b c52d511 413d2b0 ff69472 413d2b0 c52d511 413d2b0 c52d511 413d2b0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# tools/final_answer.py
from dataclasses import dataclass
from typing import Any
@dataclass
class FinalAnswerTool:
"""A tool to format and deliver the final answer to the user."""
def __call__(self, answer: str) -> str:
"""Process and return the final response.
Args:
answer: The final answer text to return to the user.
Returns:
The processed answer as a string.
"""
return answer
def __str__(self) -> str:
return "final_answer" |