Closed weissgerber1 closed 2 months ago
Please leverage this checklist to ensure your code review is thorough before approving
Our underlying impl has changed and so this PR is not landable as is.
That being said - we'd still like to add this functionality and that is now tracked in this issue.
Added support for a custom HTTP client in the OpenAIEmbeddingFunction class.
http_client
parameter of typehttpx.Client
to the__init__
method of OpenAIEmbeddingFunctionhttp_client
to bothopenai.AzureOpenAI
andopenai.OpenAI
when initializing the client for OpenAI SDK v1.x.The change allows for providing an own HTTP client. Useful for SSL configuration, proxies or connection pooling.
Backwards compatibility is maintained as the OpenAI client will use its default HTTP client when provided with 'None'.