nanoPerplexityAI icon indicating copy to clipboard operation
nanoPerplexityAI copied to clipboard

module 'openai' has no attribute 'OpenAI'

Open speakstone opened this issue 1 year ago • 1 comments

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?

speakstone avatar Dec 11 '24 05:12 speakstone

Hi speakstone,

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

Yusuke710 avatar Dec 11 '24 15:12 Yusuke710