Skip to content

ImportError: cannot import name 'OpenAI' from 'openai' #1069

@jdragonx

Description

@jdragonx

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

Exactly this:

ImportError: cannot import name 'OpenAI' from 'openai'

Seems like is just a silly mistake that you didn't notice you had removed such an important part of the package, I had to pin my version to 1.7.1 to avoid this.

To Reproduce

Just update to the latest version (1.7.2) and then try to import using the examples described in the documentation.

Code snippets

No response

OS

Ubuntu

Python version

Python v3.10.12

Library version

openai v1.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions