Spaces:
Running
Running
Update agent.py
Browse files
agent.py
CHANGED
@@ -303,12 +303,14 @@ class MagAgent:
|
|
303 |
await asyncio.sleep(60 / 15) # Assuming 15 RPM
|
304 |
# Include task_id in the task prompt to guide the agent
|
305 |
task = (
|
306 |
-
f"Answer the following question accurately and concisely:
|
307 |
-
f"
|
308 |
-
f"
|
|
|
309 |
)
|
310 |
print(f"Calling agent.run for task {task_id}...")
|
311 |
-
response =
|
|
|
312 |
self.agent.run,
|
313 |
task=task
|
314 |
)
|
|
|
303 |
await asyncio.sleep(60 / 15) # Assuming 15 RPM
|
304 |
# Include task_id in the task prompt to guide the agent
|
305 |
task = (
|
306 |
+
f"Answer the following question accurately and concisely: \n"
|
307 |
+
f"{question}"
|
308 |
+
f"If the question references an attachment, use tool to download it with task_id: {task_id}\n"
|
309 |
+
# f"Return the answer as a string."
|
310 |
)
|
311 |
print(f"Calling agent.run for task {task_id}...")
|
312 |
+
response =
|
313 |
+
await asyncio.to_thread(
|
314 |
self.agent.run,
|
315 |
task=task
|
316 |
)
|