Retry logic for AzureOpenAIEmbeddings #27732
jerichosiahaya
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m using
AzureOpenAIEmbeddings
and encountered an issue with the rate limit. I checked the code forOpenAIEmbeddings
, which includes a retry logic function. However, when I checkedAzureOpenAIEmbeddings
, I noticed there is no retry function. I’m wondering why both don’t have retry logic, are there any other concerns?Retry function for
OpenAIEmbeddings
:langchain/libs/community/langchain_community/embeddings/openai.py
Lines 44 to 68 in 5a2cfb4
langchain/libs/community/langchain_community/embeddings/openai.py
Lines 495 to 501 in 5a2cfb4
Currently, my simple solution to solve this in
AzureOpenAIEmbeddings
is to getRateLimitError
exception and then cooldown for 30 seconds before try for next attempt.Beta Was this translation helpful? Give feedback.
All reactions