Skip to content

Commit e3a6936

Browse files
committed
πŸ‘Œ IMPROVE: Rate limit handling
1 parent 48de7b6 commit e3a6936

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

β€Žpackages/baseai/src/deploy/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ export async function uploadDocumentsToMemory({
645645
account: Account;
646646
}) {
647647
const BATCH_SIZE = 5; // Number of concurrent uploads
648-
const RATE_LIMIT_DELAY = 1000; // 1 second delay between requests
648+
const RATE_LIMIT_DELAY = 1500; // 1.5 second delay between requests
649649

650650
// Process documents in batches to avoid rate limiting
651651
for (let i = 0; i < documents.length; i += BATCH_SIZE) {
@@ -693,7 +693,7 @@ export async function deleteDocumentsFromMemory({
693693
account: Account;
694694
}) {
695695
const BATCH_SIZE = 5; // Number of concurrent uploads
696-
const RATE_LIMIT_DELAY = 1000; // 1 second delay between requests
696+
const RATE_LIMIT_DELAY = 1500; // 1.5 second delay between requests
697697

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

@@ -1123,7 +1123,7 @@ export async function handleGitSyncMemoryDeploy({
11231123
overwrite: boolean;
11241124
}) {
11251125
const BATCH_SIZE = 5;
1126-
const RATE_LIMIT_DELAY = 1000;
1126+
const RATE_LIMIT_DELAY = 1500;
11271127

11281128
// Fetch existing documents once
11291129
const prodDocs = await listMemoryDocuments({

0 commit comments

Comments
Β (0)