Scott Cogan commited on
Commit
d977661
·
1 Parent(s): e0ce96b

fix: Remove tools_dict parameter and update template handling

Browse files
Files changed (2) hide show
  1. app.py +1 -2
  2. prompts.yaml +3 -3
app.py CHANGED
@@ -87,8 +87,7 @@ agent = CodeAgent(
87
  planning_interval=1, # Added planning interval to ensure proper planning
88
  name="question_answering_agent",
89
  description="An agent specialized in answering various types of questions using available tools. The agent must use the final_answer tool to submit its answer.",
90
- prompt_templates=prompt_templates,
91
- tools_dict={tool.name: tool for tool in [final_answer, DuckDuckGoSearchTool(), calculate_min_price, extract_price_from_snippet, get_current_time_in_timezone]} # Add tools dictionary
92
  )
93
 
94
  # Configure Gradio UI with sharing enabled
 
87
  planning_interval=1, # Added planning interval to ensure proper planning
88
  name="question_answering_agent",
89
  description="An agent specialized in answering various types of questions using available tools. The agent must use the final_answer tool to submit its answer.",
90
+ prompt_templates=prompt_templates
 
91
  )
92
 
93
  # Configure Gradio UI with sharing enabled
prompts.yaml CHANGED
@@ -22,8 +22,8 @@ prompt_templates:
22
  d. Use final_answer to submit your response
23
 
24
  Available tools:
25
- {% for tool_name, tool in tools_dict.items() %}
26
- - {{ tool_name }}: {{ tool.description }}
27
  {% endfor %}
28
 
29
  Here are the rules you should always follow to solve your task:
@@ -87,7 +87,7 @@ prompt_templates:
87
  ```
88
 
89
  Available tools:
90
- {% for tool in tools.values() %}
91
  - {{ tool.name }}: {{ tool.description }}
92
  {% endfor %}
93
 
 
22
  d. Use final_answer to submit your response
23
 
24
  Available tools:
25
+ {% for tool in tools %}
26
+ - {{ tool.name }}: {{ tool.description }}
27
  {% endfor %}
28
 
29
  Here are the rules you should always follow to solve your task:
 
87
  ```
88
 
89
  Available tools:
90
+ {% for tool in tools %}
91
  - {{ tool.name }}: {{ tool.description }}
92
  {% endfor %}
93