MHamdan commited on
Commit
69dd942
·
1 Parent(s): 413d2b0

Initial commit with full functionality extend app req tools

Browse files
Files changed (1) hide show
  1. tools/final_answer.py +5 -3
tools/final_answer.py CHANGED
@@ -1,10 +1,12 @@
1
  # tools/final_answer.py
2
- from dataclasses import dataclass
3
- from typing import Any
4
 
5
  @dataclass
6
  class FinalAnswerTool:
7
  """A tool to format and deliver the final answer to the user."""
 
 
 
8
 
9
  def __call__(self, answer: str) -> str:
10
  """Process and return the final response.
@@ -18,4 +20,4 @@ class FinalAnswerTool:
18
  return answer
19
 
20
  def __str__(self) -> str:
21
- return "final_answer"
 
1
  # tools/final_answer.py
2
+ from dataclasses import dataclass, field
 
3
 
4
  @dataclass
5
  class FinalAnswerTool:
6
  """A tool to format and deliver the final answer to the user."""
7
+
8
+ name: str = field(default="final_answer", init=False)
9
+ description: str = field(default="Tool to provide the final answer", init=False)
10
 
11
  def __call__(self, answer: str) -> str:
12
  """Process and return the final response.
 
20
  return answer
21
 
22
  def __str__(self) -> str:
23
+ return self.name