SmartWebAnalyzerPlus / tools /final_answer.py
MHamdan's picture
Initial commit with full functionality extend app req tools
413d2b0
raw
history blame
518 Bytes
# 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"