Skip to content

Allow for custom SSL certs to be used by the APIClient classes #1204

Closed
@tdene

Description

@tdene

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

Currently, the APIClient classes allow for custom timeout, custom headers, custom max_retries, to be easily passed in as parameters.

The only way to pass in custom SSL certs are by one of these two options:

  • Setting the SSL_CERT_FILE environment variable. This causes issues with async calls.
  • Passing in a custom http_client. This causes inconsistencies, and is unnecessarily complicated when handling both Sync and Async clients through a 3rd party library like langchain.

Instead, verify should be an argument that can be passed in just like timeout or max_retries.

PR #1205 fixes this issue.

To Reproduce

  1. Try to use custom SSL certs.
  2. Note the difficulty in doing so.
  3. Merge in fix: make verify a client parameter (openai#1204) #1205 to make the task simple.

Code snippets

No response

OS

Ubuntu 20.04.5 LTS

Python version

Python v.3.11.6

Library version

openai v1.13.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions