SergeyO7 commited on
Commit
17263ef
·
verified ·
1 Parent(s): 3e9c5a1

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -2
agent.py CHANGED
@@ -88,7 +88,7 @@ class DownloadTaskAttachmentTool(Tool):
88
  if self.rate_limiter:
89
  while not self.rate_limiter.consume(1):
90
  print(f"Rate limit reached for downloading file for task {task_id}. Waiting...")
91
- time.sleep(60 / 15) # Assuming 15 RPM
92
  response = requests.get(file_url, stream=True, timeout=15)
93
  response.raise_for_status()
94
 
@@ -438,7 +438,7 @@ class MagAgent:
438
  if self.rate_limiter:
439
  while not self.rate_limiter.consume(1):
440
  print(f"Rate limit reached for task {task_id}. Waiting...")
441
- await asyncio.sleep(60 / 15) # Assuming 15 RPM
442
  # Include task_id in the task prompt to guide the agent
443
  task = (
444
  # f"Answer the following question accurately and concisely: \n"
 
88
  if self.rate_limiter:
89
  while not self.rate_limiter.consume(1):
90
  print(f"Rate limit reached for downloading file for task {task_id}. Waiting...")
91
+ time.sleep(4) # Assuming 15 RPM
92
  response = requests.get(file_url, stream=True, timeout=15)
93
  response.raise_for_status()
94
 
 
438
  if self.rate_limiter:
439
  while not self.rate_limiter.consume(1):
440
  print(f"Rate limit reached for task {task_id}. Waiting...")
441
+ await asyncio.sleep(4) # Assuming 15 RPM
442
  # Include task_id in the task prompt to guide the agent
443
  task = (
444
  # f"Answer the following question accurately and concisely: \n"