Sborole commited on
Commit
cb91cc3
·
verified ·
1 Parent(s): 1c97386

Update tools/FinalAnswerTool.py

Browse files
Files changed (1) hide show
  1. 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 = "Return only the final answer as a clean string. Provides the exact, few comma separated words or a single final answer to the given question."
14
- inputs = {
15
- "answer": {"type": "string", "description": "The final, correctly formatted answer string."},
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: