RCaz commited on
Commit
1393885
·
verified ·
1 Parent(s): b27798f

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +4 -4
agent.py CHANGED
@@ -229,8 +229,8 @@ class TestAgent:
229
  FinalAnswerTool()],
230
  additional_authorized_imports=["pandas","markdownify","requests","chess","os"], # V2 add markdownify & requests V5 add chess and os
231
  model=model,
232
- max_steps=4, # V3 increase steps
233
- planning_interval=2, # V3 add structure
234
  verbosity_level=2,
235
  use_structured_outputs_internally=True # V3. Adds structure
236
  )
@@ -240,7 +240,7 @@ class TestAgent:
240
 
241
  # V4. use prompt from the paper as guidance
242
  prompt = """\n\n
243
- Remember: You are a general AI assistant. I will ask you a question. Report your thoughts, and
244
  finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER].
245
  YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated
246
  list of numbers and/or strings.
@@ -251,7 +251,7 @@ class TestAgent:
251
  If you are asked for a comma separated list, apply the above rules depending of whether the element
252
  to be put in the list is a number or a string.
253
  """
254
- self.agent.prompt_templates['system_prompt'] = self.agent.prompt_templates['system_prompt'] + prompt
255
 
256
 
257
  def __call__(self, question: str) -> str:
 
229
  FinalAnswerTool()],
230
  additional_authorized_imports=["pandas","markdownify","requests","chess","os"], # V2 add markdownify & requests V5 add chess and os
231
  model=model,
232
+ max_steps=6, # V3 increase steps
233
+ planning_interval=3, # V3 add structure
234
  verbosity_level=2,
235
  use_structured_outputs_internally=True # V3. Adds structure
236
  )
 
240
 
241
  # V4. use prompt from the paper as guidance
242
  prompt = """\n\n
243
+ System: You are a general AI assistant. I will ask you a question. Report your thoughts, and
244
  finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER].
245
  YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated
246
  list of numbers and/or strings.
 
251
  If you are asked for a comma separated list, apply the above rules depending of whether the element
252
  to be put in the list is a number or a string.
253
  """
254
+ self.agent.prompt_templates['system_prompt'] = prompt
255
 
256
 
257
  def __call__(self, question: str) -> str: