RayVentura / ShortGPT

🚀🎬 ShortGPT - Experimental AI framework for youtube shorts / tiktok channel automation
https://shortx.ai/?ref=sgpt
MIT License
5.55k stars 695 forks source link

ERROR | Exception : GPT3 error: module 'openai' has no attribute 'ChatCompletion' #40

Closed somenormalguy7 closed 1 year ago

somenormalguy7 commented 1 year ago

How to fix this?

D:\ShortGPT-stable\ShortGPT-stable>python runShortGPT.py Running on local URL: http://127.0.0.1:31415

To create a public link, set share=True in launch(). Step 1 _generateScript Error communicating with OpenAI: module 'openai' has no attribute 'ChatCompletion' Error communicating with OpenAI: module 'openai' has no attribute 'ChatCompletion' Error communicating with OpenAI: module 'openai' has no attribute 'ChatCompletion' Error communicating with OpenAI: module 'openai' has no attribute 'ChatCompletion' Error File "D:\ShortGPT-stable\ShortGPT-stable\gui\short_automation_ui.py", line 61, in create_short for step_num, step_info in shortEngine.makeContent(): File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\engine\abstract_content_engine.py", line 72, in makeContent self.stepDict[currentStep]() File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\engine\reddit_short_engine.py", line 38, in _generateScript self._dbscript, = self.getRealisticStory(max_tries=1) File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\engine\reddit_short_engine.py", line 25, in __getRealisticStory new_script = self.generateRandomStory() File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\engine\reddit_short_engine.py", line 16, in __generateRandomStory question = reddit_gpt.getInterestingRedditQuestion() File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\gpt\reddit_gpt.py", line 17, in getInterestingRedditQuestion return gpt_utils.gpt3Turbo_completion(chat_prompt=chat, system=system, temp=1.08) File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\gpt\gpt_utils.py", line 88, in gpt3Turbo_completion raise Exception("GPT3 error: %s" % oops)

RayVentura commented 1 year ago

How to fix this?

D:\ShortGPT-stable\ShortGPT-stable>python runShortGPT.py Running on local URL: http://127.0.0.1:31415

To create a public link, set share=True in launch(). Step 1 _generateScript Error communicating with OpenAI: module 'openai' has no attribute 'ChatCompletion' Error communicating with OpenAI: module 'openai' has no attribute 'ChatCompletion' Error communicating with OpenAI: module 'openai' has no attribute 'ChatCompletion' Error communicating with OpenAI: module 'openai' has no attribute 'ChatCompletion' Error File "D:\ShortGPT-stable\ShortGPT-stable\gui\short_automation_ui.py", line 61, in create_short for step_num, step_info in shortEngine.makeContent(): File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\engine\abstract_content_engine.py", line 72, in makeContent self.stepDictcurrentStep File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\engine\reddit_short_engine.py", line 38, in _generateScript self._dbscript, = self.getRealisticStory(max_tries=1) File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\engine\reddit_short_engine.py", line 25, in __getRealisticStory new_script = self.generateRandomStory() File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\engine\reddit_short_engine.py", line 16, in __generateRandomStory question = reddit_gpt.getInterestingRedditQuestion() File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\gpt\reddit_gpt.py", line 17, in getInterestingRedditQuestion return gpt_utils.gpt3Turbo_completion(chat_prompt=chat, system=system, temp=1.08) File "D:\ShortGPT-stable\ShortGPT-stable\shortGPT\gpt\gpt_utils.py", line 88, in gpt3Turbo_completion raise Exception("GPT3 error: %s" % oops)

the OpenAI pip library seems to be miss-installed , try pip install --upgrade openai