yaroslavyaroslav / OpenAI-sublime-text

First class Sublime Text AI assistant with GPT-4o and llama.cpp support!
MIT License
130 stars 11 forks source link

How exactly is GPT-4 supported? #23

Closed kaklik closed 10 months ago

kaklik commented 10 months ago

I have issue with change of default models deprecated

"edit_model": "code-davinci-edit-001",
"model": "text-davinci-003",
"chat_model": "gpt-3.5-turbo", 

To suggested replacement

"edit_model": "gpt-4",
"model": "gpt-4",
"chat_model": "gpt-4"

Unfortunately I then getting the following message in case I try to call GPT-4 to edit the code:

image

yaroslavyaroslav commented 10 months ago

Hi, thank for your issues.

Unfortunately gpt-4 supported only for the chat_completion mode as for now.

So the error that you're reffering to is pretty much unavoidable for both edit and insert modes.

Later on I'll update the plugin to make it support the all brand new model for those modes as well by migrating them to chat_completion endpoint as well.

You can follow the progress of this enhancement along in this issue #19

So the answer to your exact question is you have to put it that way to make it work with gpt-4.

"edit_model": "code-davinci-edit-001",
"model": "text-davinci-003",
"chat_model": "gpt-4", 
yaroslavyaroslav commented 10 months ago

FYI: Recently I've got newsletter from OpenAI about new instruct model release. It's not GPT-4 yet, but at least it's GPT-3.5. There's two models reveals available for me in response to the related API request: (1) gpt-3.5-turbo-instruct-0914 and (2) gpt-3.5-turbo-instruct, I believe there's no difference between as for now. These models are capable only with v1/complete gateway, which are corresponds with OpenAI: Complete and OpenAI: Insert actions and NOT corresponds with OpenAI: Edit (which is your issue about).

Another major point regarding that issue is that I've no plans to update both model and edit_model behaviour in any way because both of gateways behind them are deprecated and would be abandoned at the very beginning of the 2024 regarding to a OpenAI release. Though this features would be provided by chat-completion models soon before this abandon appears.