Skip to content

Commit 2224a22

Browse files
committed
👌 IMPROVE: Rate limit handling
1 parent 30f0df7 commit 2224a22

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎packages/baseai/src/deploy/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ export async function uploadDocumentsToMemory({
684684
account: Account;
685685
}) {
686686
const BATCH_SIZE = 5; // Number of concurrent uploads
687-
const RATE_LIMIT_DELAY = 1000; // 1 second delay between requests
687+
const RATE_LIMIT_DELAY = 1500; // 1.5 second delay between requests
688688

689689
// Process documents in batches to avoid rate limiting
690690
for (let i = 0; i < documents.length; i += BATCH_SIZE) {
@@ -732,7 +732,7 @@ export async function deleteDocumentsFromMemory({
732732
account: Account;
733733
}) {
734734
const BATCH_SIZE = 5; // Number of concurrent uploads
735-
const RATE_LIMIT_DELAY = 1000; // 1 second delay between requests
735+
const RATE_LIMIT_DELAY = 1500; // 1.5 second delay between requests
736736

737737
p.log.info(`Deleting ${documents.length} documents from memory: ${name}`);
738738

@@ -1165,7 +1165,7 @@ export async function handleGitSyncMemoryDeploy({
11651165
overwrite: boolean;
11661166
}) {
11671167
const BATCH_SIZE = 5;
1168-
const RATE_LIMIT_DELAY = 1000;
1168+
const RATE_LIMIT_DELAY = 1500;
11691169

11701170
// Fetch existing documents once
11711171
const prodDocs = await listMemoryDocuments({

0 commit comments

Comments
 (0)