SergeyO7 commited on
Commit
05cb108
·
verified ·
1 Parent(s): f34d3d9

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +6 -4
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: {question}\n"
307
- f"If the question references an attachment, use the download_file tool with task_id: {task_id}\n"
308
- f"Return the answer as a string."
 
309
  )
310
  print(f"Calling agent.run for task {task_id}...")
311
- response = await asyncio.to_thread(
 
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
  )