Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feature request: expose verify param of httpx client #2359

Copy link
Copy link
Open
@ccurme

Description

@ccurme
Issue body actions

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.