Update tools/final_answer.py
Browse files- tools/final_answer.py +11 -3
tools/final_answer.py
CHANGED
|
@@ -1,10 +1,18 @@
|
|
| 1 |
-
from typing import Any
|
| 2 |
from smolagents.tools import Tool
|
| 3 |
|
|
|
|
| 4 |
class FinalAnswerTool(Tool):
|
| 5 |
name = "final_answer"
|
| 6 |
-
description = "Provides
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
output_type = "any"
|
| 9 |
|
| 10 |
def forward(self, answer: Any) -> Any:
|
|
|
|
| 1 |
+
from typing import Any
|
| 2 |
from smolagents.tools import Tool
|
| 3 |
|
| 4 |
+
|
| 5 |
class FinalAnswerTool(Tool):
|
| 6 |
name = "final_answer"
|
| 7 |
+
description = "Provides the final answer to the user. This can be text or an image."
|
| 8 |
+
|
| 9 |
+
inputs = {
|
| 10 |
+
"answer": {
|
| 11 |
+
"type": "any",
|
| 12 |
+
"description": "The final answer to the user, which can be text or an image."
|
| 13 |
+
}
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
output_type = "any"
|
| 17 |
|
| 18 |
def forward(self, answer: Any) -> Any:
|