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

Migrate to openai 1.0.0 or higher #5

Open
Ronan24 opened this issue Jul 21, 2024 · 0 comments
Open

Migrate to openai 1.0.0 or higher #5

Ronan24 opened this issue Jul 21, 2024 · 0 comments

Comments

@Ronan24
Copy link

Ronan24 commented Jul 21, 2024

If you follow the instructions and try the command python src/generate.py, we receive the following error :

File "D:<PATH>\pokemon-card-generator\src\util\gpt_call.py", line 32, in get_completion
response = openai.Completion.create(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:<PATH>\Python\Python312\Lib\site-packages\openai\lib_old_api.py", line 39, in call
raise APIRemovedInV1(symbol=self._symbol)
openai.lib._old_api.APIRemovedInV1:

You tried to access openai.Completion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.

The actual version installed by pip is 1.36.0 nowadays.

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

1 participant