Spaces:
Sleeping
Sleeping
Update tools/FinalAnswerTool.py
Browse files- tools/FinalAnswerTool.py +8 -4
tools/FinalAnswerTool.py
CHANGED
|
@@ -10,10 +10,14 @@ settings = Settings()
|
|
| 10 |
print(settings.llm_model_id)
|
| 11 |
class FinalAnswerTool(Tool):
|
| 12 |
name = "final_answer"
|
| 13 |
-
description = "
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
output_type = "string"
|
| 18 |
|
| 19 |
def forward(self, answer: str) -> str:
|
|
|
|
| 10 |
print(settings.llm_model_id)
|
| 11 |
class FinalAnswerTool(Tool):
|
| 12 |
name = "final_answer"
|
| 13 |
+
description = """
|
| 14 |
+
Takes the agent's computed result and formats the final answer.
|
| 15 |
+
|
| 16 |
+
If the question asks to express time in 'thousands of hours', divide the total hours by 1000,
|
| 17 |
+
round to the nearest integer, and return ONLY that integer with no extra text.
|
| 18 |
+
|
| 19 |
+
Output only the final answer as a clean string — no explanation, no labels, no formatting.
|
| 20 |
+
"""
|
| 21 |
output_type = "string"
|
| 22 |
|
| 23 |
def forward(self, answer: str) -> str:
|