Created
May 22, 2025 17:33
-
-
Save tazarov/a93a5dd9badceb1c3bff149faddfc927 to your computer and use it in GitHub Desktop.
OpenAI EF retry and timeouts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openai_ef = OpenAIEmbeddingFunction( | |
api_key=os.getenv("OPENAI_API_KEY"), | |
model_name=QAExecutor.embeddings_model | |
) | |
openai_ef._client._client.timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0) | |
openai_ef._client._client.max_retries=3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment