Hello Dears,
I am new for chatGPT API, and I am trying to use chatGPT API in my Python program, /
I tried to follow every step and setup the environment.
I followed everyhing mentioned in this document
[link](https:// raise APIRemovedInV1(symbol=self._symbol) openai.lib._old_api.APIRemovedInV1:)
I downloaded WSL, Ubuntu and everything is needed.
But hen I try to run this code
key_api = 'MY API KEY'
openai.api_key = key_api
chat_completion = openai.Completion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Who won the world series in 2020?"},
],
)
print(chat_completion['choices'][0]['message']['content'])
I got this error
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.
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`
and when I try to run openai migrate
First I got this error
Error: Windows is not supported yet in the migration CLI
And now I got this message
usage: openai [-h] [-V] [-v] [-b API_BASE] [-k API_KEY] [-p PROXY [PROXY ...]] [-o ORGANIZATION] {api,tools,wandb} ...
openai: error: argument {api,tools,wandb}: invalid choice: 'migrate' (choose from 'api', 'tools', 'wandb')
would you mind to help , I am new to this, and really need help.
I don’t know how to solve it, I am really confused