Spaces:
Sleeping
Sleeping
Zanqi commited on
Commit ·
41558f1
1
Parent(s): 3d11b50
Enhance FinalAnswerTool description and input specifications for clarity and improved functionality
Browse files- tools/final_answer.py +5 -2
tools/final_answer.py
CHANGED
|
@@ -3,8 +3,11 @@ from smolagents.tools import Tool
|
|
| 3 |
|
| 4 |
class FinalAnswerTool(Tool):
|
| 5 |
name = "final_answer"
|
| 6 |
-
description = "Provides a final answer to the given problem."
|
| 7 |
-
inputs = {'answer': {'type': 'any', 'description': 'The final answer to the problem'}}
|
|
|
|
|
|
|
|
|
|
| 8 |
output_type = "any"
|
| 9 |
|
| 10 |
def forward(self, answer: Any) -> Any:
|
|
|
|
| 3 |
|
| 4 |
class FinalAnswerTool(Tool):
|
| 5 |
name = "final_answer"
|
| 6 |
+
# description = "Provides a final answer to the given problem."
|
| 7 |
+
# inputs = {'answer': {'type': 'any', 'description': 'The final answer to the problem'}}
|
| 8 |
+
description = "Provides a final answer or result for the question or request. You do not need to tell the user that the task is complete, simply return the result."
|
| 9 |
+
inputs = {'answer': {'type': 'any', 'description': 'An image, audio tensor or text response'}}
|
| 10 |
+
|
| 11 |
output_type = "any"
|
| 12 |
|
| 13 |
def forward(self, answer: Any) -> Any:
|