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

Issue: openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 #30

Open
DaveDaveDaveDave opened this issue Nov 30, 2023 · 3 comments

Comments

@DaveDaveDaveDave
Copy link

DaveDaveDaveDave commented Nov 30, 2023

The following error is displayed in QGIS 3.34.1 using plugin version 0.7 on windows 10. This occurred on first run after a fresh install of the plugin. The error is displayed when you submit text with the send button. I have a proper OpenAI api key configured.

QChatGPT: 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 runopenai migrateto 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: https://github.com/openai/openai-python/discussions/742 . You can find your API key at https://platform.openai.com/account/api-keys.

Unfortunately when attempting to run openai migrate as the error suggests, an error is generated that states that openai does not support migrate in windows environments at this time.

@emre-07
Copy link

emre-07 commented Apr 20, 2024

Did anyone find the solution?

@jvdkwast
Copy link

jvdkwast commented Jun 7, 2024

@DaveDaveDaveDave & @emre-07, can you try if the other solution works?
pip install openai==0.28

You can do this from the QGIS Python Consol. Restart QGIS afterwards.
image

For me it seems to work.

@davidmoshal
Copy link

didn't work for me

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

4 participants