File size: 494 Bytes
138ebb9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from typing import Any, Optional
from smolagents.tools import Tool
from smolagents import tool

class FinalAnswerTool:
    def __init__(self):
        pass

    @tool
    def final_answer(self, answer: str) -> str:
        """

        A tool to provide the final answer or conclusion.

        Args:

            answer: The final answer or conclusion to be provided.

        Returns:

            The formatted final answer.

        """
        return f"Final Answer: {answer}"