Spaces:
Running
Running
Update agent.py
Browse files
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(
|
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(
|
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"
|