Changing model in wordpress plugin

Hello

I have a working wordpress plugin calling OpenAI GPT3.5. I want to update to use GPT4 but if I change the endpoint and model I get an error? Can anyone help with the code changes?

You’ll have to ask the plugin developer. Are you using GPT-3.5-instruct? That’s likely the problem. GPT-4 series uses ChatML or Chat Completion…

Thanks Paul

I used ChatGPT to write the code for a simple prompt-response plugin. I can’t upgrade to GPT-4 and ChatGPT doesn’t know how to update the code because in its world it doesn’t exist yet!

This should help…

https://help.openai.com/en/articles/7042661-moving-from-completions-to-chat-completions-in-the-openai-api

If you ask ChatGPT, it should be able to write the code if you ask for it correctly. Check the link above which should help.

Let us know if you get stuck.