jcleee commited on
Commit
6421802
·
verified ·
1 Parent(s): 3731b9f

Update tools/final_answer.py

Browse files
Files changed (1) hide show
  1. tools/final_answer.py +3 -2
tools/final_answer.py CHANGED
@@ -1,4 +1,4 @@
1
- from typing import Any, Optional
2
  from smolagents.tools import Tool
3
 
4
  class FinalAnswerTool(Tool):
@@ -8,7 +8,8 @@ class FinalAnswerTool(Tool):
8
  output_type = "any"
9
 
10
  def forward(self, answer: Any) -> Any:
 
11
  return answer
12
 
13
  def __init__(self, *args, **kwargs):
14
- self.is_initialized = False
 
1
+ from typing import Any
2
  from smolagents.tools import Tool
3
 
4
  class FinalAnswerTool(Tool):
 
8
  output_type = "any"
9
 
10
  def forward(self, answer: Any) -> Any:
11
+ # ✅ This is what actually returns the value back to the agent
12
  return answer
13
 
14
  def __init__(self, *args, **kwargs):
15
+ super().__init__(*args, **kwargs)