Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'openai' has no attribute 'OpenAI' #1

Open
speakstone opened this issue Dec 11, 2024 · 1 comment
Open

module 'openai' has no attribute 'OpenAI' #1

speakstone opened this issue Dec 11, 2024 · 1 comment

Comments

@speakstone
Copy link

Traceback (most recent call last):
File "C:\Users\U0048328\OneDrive - BBA\Desktop\AI-COP\AI-Search-Engine\nanoPerplexityAI-main\nanoPerplexityAI.py", line 65, in
client =openai.OpenAI(api_key=OPENAI_API_KEY)
AttributeError: module 'openai' has no attribute 'OpenAI'

The official OpenAI documentation does not include the class client = openai.OpenAI(api_key=OPENAI_API_KEY). What version of OpenAI is this?

@Yusuke710
Copy link
Owner

Hi speakstone,

As of now, my current openai version is 1.35.13
Have you checked this doc? I believe openai.OpenAI() exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants