Spaces:
Running
Running
File size: 645 Bytes
fd18d93 8fe992b 3c9e5cf 8fe992b a1969f6 3c9e5cf a1969f6 3c9e5cf 8fe992b bfabe80 a1969f6 bee9023 8fe992b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
from typing import Any, Optional
from smolagents.tools import Tool
class FinalAnswerTool(Tool):
name = "final_answer"
description = "Provides a final answer to the given problem. Uses the nutritional information from calories_check tool to give an advice as a professional nutritionist."
inputs = {
"final_answer": {
"type": "any",
"description": "The final answer to the problem and a final advice.",
}
}
output_type = "any"
def forward(self, final_answer: Any) -> Any:
return final_answer
def __init__(self, *args, **kwargs):
self.is_initialized = False
|