-
Notifications
You must be signed in to change notification settings - Fork 3.9k
APIRemovedInV1: You tried to access openai.ChatCompletion, but this is no longer supported #987
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
Comments
It seems you're using the earlier syntax for the ChatCompletion API. The syntax was changed from
to
Additionally, your line here:
needs to be modified to
After doing these modifications on the same environment, I was able to get your app to run no problem! You can see some more examples of the usage of the new API in the examples/: https://github.com/openai/openai-python/blob/main/examples/demo.py and in the main README. Hope that clears things up! |
Thanks was also facing the same issue |
I get a TypeError: Client.init() got an unexpected keyword argument 'proxies'. after the API issue is resolved. Did anyone else face this too? Please let me know how it can be fixed. |
You need to update to the latest version, that was a bug which has been fixed. |
Thank you for the quick reply. It works now! |
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
I'm trying to create a simple BOT however getting the below error.
APIRemovedInV1: You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API. You can run
openai migrate
to automatically upgrade your codebase to use the 1.0.0 interface. Alternatively, you can pin your installation to the old version, e.g.pip install openai==0.28
A detailed migration guide is available here: #742Validations:
Environment Check done
Upgraded OpenAI Python Library
Restarted Kernel
Validated API key
To Reproduce
Code attached
Code snippets
OS
windows
Python version
Python 3.12.1
Library version
openai 1.5.0
The text was updated successfully, but these errors were encountered: