Spaces:
Sleeping
Sleeping
| from typing import Optional | |
| class FinalAnswerTool: | |
| """A tool that allows the agent to provide a final answer to the user's query.""" | |
| def __call__(self, answer: str) -> str: | |
| """Provide a final answer to the user's query. | |
| Args: | |
| answer: The final answer to provide to the user. | |
| Returns: | |
| A confirmation message. | |
| """ | |
| return f"FINAL ANSWER: {answer}" | |
| def __str__(self) -> str: | |
| return "final_answer" | |
| def name(self) -> str: | |
| return "final_answer" | |
| def description(self) -> str: | |
| return "Use this tool to provide a final answer to the user's query." | |
| def signature(self) -> str: | |
| return "final_answer(answer: str) -> str" | |
| def argument_descriptions(self) -> dict: | |
| return { | |
| "answer": "The final answer to provide to the user." | |
| } |