Skip to content

Commit

Permalink
chore: concurrency 10, max 100 (GCP rate limit incr)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctjlewis committed Apr 15, 2024
1 parent f811c51 commit 75dfbe2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/backoff.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ export async function backoff(action, maxRetries = 6, initialDelay = 15) {
const results = await action();
return results;
} catch (e) {
retries++;

if (retries === maxRetries) {
throw new Error('Max retries exceeded.');
}

retries++;
console.error(e.message);
console.error(`Error. Retrying in ${delay}s. [Attempt ${retries}/${maxRetries}]`);

Expand Down
2 changes: 1 addition & 1 deletion src/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ async function runFullChallenge(systemPrompt, runs = 50, batchSize = 1) {
console.log();
}

await runFullChallenge(prompt, 500, 6);
await runFullChallenge(prompt, 500, 10);

0 comments on commit 75dfbe2

Please sign in to comment.