Term Cleanup: Handle embedding generation errors like rate limits
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
La issue non nomina file né test; individua innanzitutto il flusso di cleanup che genera embeddings e verifica come vengono attualmente gestite le risposte dell’API e gli errori di rate limit. Il lavoro è completato quando gli errori generici dell’API si interrompono con un messaggio visibile, mentre le risposte di rate limit ritentano con un backoff limitato o alla fine si interrompono con un errore, con test a supporto di entrambi i percorsi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your enhancement related to a problem? Please describe.
Originally documented by @dkotter:
I didn't run into any errors when testing but in looking at the code, it doesn't seem we ever look at the response from generating an embedding.
So in a scenario where this API request fails, we just continue on to the next term. Think of a situation where the API goes down or we hit rate limits on the API. In that case, the process will continue to try forever even though we aren't getting any results from the API.
I'd suggest, if easy enough, two different approaches:
- If we get just a general error response from the API (i.e. the API is down), I think we should show that error message and stop the process from continuing
- If we get a rate limit error, ideally we would pause for a minute or two before proceeding and then try again. If it fails again with a rate limit error, maybe increase our pause by a couple minutes. Once we've tried this a few times, we can then output an error and stop the process. So basically an automatic retry mechanism with a built-in backoff mechanic to try and handle rate limit issues.
Note this last piece may be overkill for this so we can discuss whether it's worth the effort or not.
Designs
Originally documented by @dkotter:
Note that OpenAI exposes some headers around rate limits that would be interesting to use: https://platform.openai.com/docs/guides/rate-limits/rate-limits-in-headers
They also provide some examples (in python) on how to build an exponential backoff system: https://platform.openai.com/docs/guides/rate-limits/retrying-with-exponential-backoff
Describe alternatives you've considered
Originally reported via https://github.com/10up/classifai-cleanup/issues/3
Code of Conduct
- I agree to follow this project's Code of Conduct
- Lingua principale
- PHP
- Stelle
- 714
- Fork
- 68
- Merge medio
- 4h 32m
- PR unite (30g)
- 23
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di 10up/classifai
-
wpvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
wpvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Register ClassifAI functionality with the Abilities APIForse già presa @nhrrob l’ha presa 10 giorni fa. Apertahelp wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
10up/classifai#1249 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
OpenAI usage tracking: Project ID setting is ignoredForse già presa @dajiaohuang l’ha presa 30 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
BYOK Openai modelsAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di 10up/classifai
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
firefly-iii/firefly-iii#13259 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Sync EN] Document the getLastErrors() return value change in the PHP 8.2 migration guide (#6107)Apertasync-en
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
sync-en
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Перевод устарел
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno