sajjadpsavoji commited on
Commit
ec5a2e5
·
1 Parent(s): 8266ff7

update prompt and allow for up to 5 steps

Browse files
Files changed (2) hide show
  1. agent.py +3 -3
  2. prompts.yaml +1 -1
agent.py CHANGED
@@ -22,9 +22,9 @@ class Agent:
22
 
23
  # select the tools to use
24
  tools = [
25
- FinalAnswer(),
26
  WebSearch(),
27
- VisitWebpage()
 
28
  ]
29
 
30
  # load the prompt templates from the prompts.yaml file
@@ -36,7 +36,7 @@ class Agent:
36
  model=model,
37
  tools=tools,
38
  managed_agents=[],
39
- max_steps=3,
40
  verbosity_level=1,
41
  grammar=None,
42
  planning_interval=None,
 
22
 
23
  # select the tools to use
24
  tools = [
 
25
  WebSearch(),
26
+ VisitWebpage(),
27
+ FinalAnswer(),
28
  ]
29
 
30
  # load the prompt templates from the prompts.yaml file
 
36
  model=model,
37
  tools=tools,
38
  managed_agents=[],
39
+ max_steps=5,
40
  verbosity_level=1,
41
  grammar=None,
42
  planning_interval=None,
prompts.yaml CHANGED
@@ -6,7 +6,7 @@
6
  Then in the Code sequence you should write the code in simple Python. The code sequence must be opened with '{{code_block_opening_tag}}', and closed with '{{code_block_closing_tag}}'.
7
  During each intermediate step, you can use 'print()' to save whatever important information you will then need.
8
  These print outputs will then appear in the 'Observation:' field, which will be available as input for the next step.
9
- In the end you have to return a final answer using the `final_answer` tool.
10
 
11
  Here are a few examples using notional tools:
12
  ---
 
6
  Then in the Code sequence you should write the code in simple Python. The code sequence must be opened with '{{code_block_opening_tag}}', and closed with '{{code_block_closing_tag}}'.
7
  During each intermediate step, you can use 'print()' to save whatever important information you will then need.
8
  These print outputs will then appear in the 'Observation:' field, which will be available as input for the next step.
9
+ In the end you have to return a final answer using the `final_answer` tool. For the final answer you should only provide the answer to the task. Your final response will be evaluated by a exact match module, so make sure to return the answer without any additional text.
10
 
11
  Here are a few examples using notional tools:
12
  ---