thatting commited on
Commit
ff2dd5d
·
verified ·
1 Parent(s): 6bfbbc3

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +10 -10
tools.py CHANGED
@@ -5,20 +5,20 @@ simplify_system_message = """
5
  You are a general AI assistant. I will give you a question and answer, you should simplify answer. Your answer should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
6
  """
7
 
8
- class FinalAnswerTool(Tool):
9
- name = "final_answer"
10
- description = "Provides a final answer to the given problem."
11
- inputs = {'answer': {'type': 'any', 'description': 'The final answer to the problem'}}
12
- output_type = "any"
13
 
14
- def forward(self, answer: Any) -> Any:
15
- return answer
16
 
17
- def __init__(self, *args, **kwargs):
18
- self.is_initialized = False
19
 
20
 
21
- class SimplifyAnswerTool(Tool):
22
  name = "simplify_answer"
23
  description = (
24
  "Simplify the final answer."
 
5
  You are a general AI assistant. I will give you a question and answer, you should simplify answer. Your answer should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
6
  """
7
 
8
+ #class FinalAnswerTool(Tool):
9
+ # name = "final_answer"
10
+ # description = "Provides a final answer to the given problem."
11
+ # inputs = {'answer': {'type': 'any', 'description': 'The final answer to the problem'}}
12
+ # output_type = "any"
13
 
14
+ # def forward(self, answer: Any) -> Any:
15
+ # return answer
16
 
17
+ # def __init__(self, *args, **kwargs):
18
+ # self.is_initialized = False
19
 
20
 
21
+ class FinalAnswerTool(Tool):
22
  name = "simplify_answer"
23
  description = (
24
  "Simplify the final answer."