Spaces:
Runtime error
Runtime error
Scott Cogan commited on
Commit ·
e0ce96b
1
Parent(s): 3e7082a
fix: Remove authorized_imports parameter and update template handling
Browse files- app.py +0 -1
- prompts.yaml +1 -1
app.py
CHANGED
|
@@ -88,7 +88,6 @@ agent = CodeAgent(
|
|
| 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 |
-
authorized_imports=config.get("authorized_imports", []), # Add authorized imports from config
|
| 92 |
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
|
| 93 |
)
|
| 94 |
|
|
|
|
| 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 |
|
prompts.yaml
CHANGED
|
@@ -34,7 +34,7 @@ prompt_templates:
|
|
| 34 |
5. Call a tool only when needed, and never re-do a tool call that you previously did with the exact same parameters.
|
| 35 |
6. Don't name any new variable with the same name as a tool.
|
| 36 |
7. Never create any notional variables in our code.
|
| 37 |
-
8. You can use imports in your code, but only from the following list of modules:
|
| 38 |
9. The state persists between code executions.
|
| 39 |
10. Don't give up! You're in charge of solving the task, not providing directions to solve it.
|
| 40 |
|
|
|
|
| 34 |
5. Call a tool only when needed, and never re-do a tool call that you previously did with the exact same parameters.
|
| 35 |
6. Don't name any new variable with the same name as a tool.
|
| 36 |
7. Never create any notional variables in our code.
|
| 37 |
+
8. You can use imports in your code, but only from the following list of modules: datetime, random, pandas, itertools, math, statistics, queue, time, collections, re
|
| 38 |
9. The state persists between code executions.
|
| 39 |
10. Don't give up! You're in charge of solving the task, not providing directions to solve it.
|
| 40 |
|