Open
Description
Confirm this is a feature request for the Python library and not the underlying OpenAI API.
- This is a feature request for the Python library
Describe the feature or improvement you're requesting
httpx allows you to specify SSL contexts when instantiating a client (see httpx docs). Otherwise, httpx will create a new SSL context when creating the client, which is expensive if you are instantiating multiple OpenAI
clients.
Exposing verify
in openai.(Async)OpenAI
would allow you to share the SSL context among clients.
Currently, you'd need to share httpx
clients. If you want default params (e.g., base URL) you need to ensure you're consistent with how OpenAI instantiates httpx clients.
Alternatively, OpenAI._client
could be made a public attribute.
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels