Term Cleanup: Handle embedding generation errors like rate limits
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
El issue no nombra archivos ni tests; primero localiza el flujo de cleanup que genera embeddings e inspecciona cómo se gestionan actualmente las respuestas de la API y los fallos de rate limit. Se considera terminado cuando los errores generales de la API se detienen con un mensaje visible, mientras que las respuestas de rate limit reintentan con un backoff acotado o finalmente se detienen con un error, respaldado por tests para ambos caminos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- PHP
- Estrellas
- 714
- Forks
- 68
- Merge medio
- 4 h 32 min
- PR fusionados (30 d)
- 23
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de 10up/classifai
-
wpvc
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
wpvc
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Register ClassifAI functionality with the Abilities APIPosiblemente ocupada @nhrrob la tomó hace 10 días. Abiertohelp wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
10up/classifai#1249 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
OpenAI usage tracking: Project ID setting is ignoredPosiblemente ocupada @dajiaohuang la tomó hace 30 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
BYOK Openai modelsAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de 10up/classifai
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
firefly-iii/firefly-iii#13259 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Sync EN] Document the getLastErrors() return value change in the PHP 8.2 migration guide (#6107)Abiertosync-en
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
sync-en
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Перевод устарел
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día