AceZz / bedtime-writer

Dreamy Tales is a Generative AI application to create bedtime stories for children. Developed by @AceZz and @Piwakk.
3 stars 0 forks source link

Batch generation of story cache may hit API rate limit #155

Open AceZz opened 1 year ago

AceZz commented 1 year ago

especially for dalle

Piwakk commented 1 year ago

Then we will need to implement a "rate limiter"… for ourselves! But less complicated than what we have. In #152 everything is done concurrently (Promise.all), this might indeed be too ambitious. Even Firestore might not like this.

Better to batch everything:

AceZz commented 1 year ago

let's do all the requests for a given form at once (this is only 27 requests). This should fit inside the open ai api rate limit (3rd line for us): image

But let's wait for sure 1min between each formId when we generate in advance (next PR)