Spaces:
Sleeping
Sleeping
Update tools/final_answer.py
Browse files- tools/final_answer.py +3 -2
tools/final_answer.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from typing import Any
|
| 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 |
-
|
|
|
|
| 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)
|