Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,14 +30,21 @@ class BasicAgent:
|
|
| 30 |
tools=[search_tool],
|
| 31 |
model=model,
|
| 32 |
add_base_tools=True,
|
| 33 |
-
max_steps=
|
| 34 |
additional_authorized_imports=["pandas", "requests"],
|
| 35 |
)
|
| 36 |
|
| 37 |
-
code_agent.planning_interval = 2
|
| 38 |
response = code_agent.run(
|
| 39 |
f"""
|
| 40 |
-
You are an expert in answering questions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
Question:
|
| 42 |
{question}
|
| 43 |
"""
|
|
|
|
| 30 |
tools=[search_tool],
|
| 31 |
model=model,
|
| 32 |
add_base_tools=True,
|
| 33 |
+
max_steps=1,
|
| 34 |
additional_authorized_imports=["pandas", "requests"],
|
| 35 |
)
|
| 36 |
|
|
|
|
| 37 |
response = code_agent.run(
|
| 38 |
f"""
|
| 39 |
+
You are an expert in answering questions.
|
| 40 |
+
|
| 41 |
+
Rules to follow:
|
| 42 |
+
Your final answer should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
|
| 43 |
+
Do not elaborate on the answer
|
| 44 |
+
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.
|
| 45 |
+
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.
|
| 46 |
+
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.
|
| 47 |
+
|
| 48 |
Question:
|
| 49 |
{question}
|
| 50 |
"""
|