Ive been working on my own custom chatgpt project, and have pasted my API key for the GPT to use. I tried running the project and whenever I type a prompt it returns this
#Not recognizing API?
1 messages · Page 1 of 1 (latest)
This page has text-davinci-003 listed with a shutdown date of 2024-01-04:
https://platform.openai.com/docs/deprecations
The recommended replacement is gpt-3.5-turbo-instruct. Can you try updating the model in your requestOptions body to another model to see if that helps?
It also might be helpful to see the error being returned by the API. Your code sets the textContent to "Oops! Something went wrong while retrieving the response. Please try again.", but you should see if you can output the actual response error to give yourself more context while debugging
So i updated it to gpt 3 1106, but it still doesnt work
the error i am getting is that i havent put an API key in, even though it is there
Ive also bought API credits so Im not sure what the issue is
ok heres what i have actually
wrong endpoint for that model
i switched to gpt-4-0125-preview
the endpoint for it should be https://api.openai.com/v1/chat/completions
after putting that i get error 400