devika icon indicating copy to clipboard operation
devika copied to clipboard

Error code: 404 - {'error': {'message': 'The model `gpt-4-turbo` does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}

Open SpringBootReactTypescriptTailwindMaster opened this issue 1 year ago • 11 comments

Hello

I bought GPT premium, but this bug has appeared. What should I do?

image

image

Did you go into the settings wheel and hit edit and paste your gpt api and save?

clbxr100 avatar Apr 26 '24 15:04 clbxr100


client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
response = client.models.list()

for model in response.data:
    if model.id.startswith("gpt-4"):
        print(model.id)

run this code to check how many models are available for you.

ARajgor avatar Apr 27 '24 06:04 ARajgor

Did you go into the settings wheel and hit edit and paste your gpt api and save?

Yes i saved the settings image Maybe i should change the openAI api endpoint ? image

client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
response = client.models.list()

for model in response.data:
    if model.id.startswith("gpt-4"):
        print(model.id)

run this code to check how many models are available for you.

Where i have to add this script ?

image

the last message indicates that **** Settings are not logged ****

i just wanna precise that my version of python is 3.12.2 and not < 3.12

Version's requirements

  • Python >= 3.10 and < 3.12
  • NodeJs >= 18
  • bun

client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
response = client.models.list()

for model in response.data:
    if model.id.startswith("gpt-4"):
        print(model.id)

run this code to check how many models are available for you.

Where i have to add this script ?

image

the last message indicates that **** Settings are not logged ****

make a test.py, copy this code and run that file (replace your api key).

ARajgor avatar Apr 29 '24 10:04 ARajgor

I did this : setx OPENAI_API_KEY ""

And i runned python test.py but it show nothing :

image

I did this : setx OPENAI_API_KEY ""

And i runned python test.py but it show nothing :

image

It should be OpenAI(api_key="sk-....") And print the response.

ARajgor avatar Apr 30 '24 02:04 ARajgor

exactly the same thing. image