ChatGPT.nvim icon indicating copy to clipboard operation
ChatGPT.nvim copied to clipboard

`code-davinci-edit-001` is deprecated, `ChatGPTEditWithInstructions` doesn't work anymore

Open traysh opened this issue 2 years ago • 7 comments

Starting today, when I run ChatGPTEditWithInstructions, I get an error message:

// API ERROR: The model `text-davinci-003` has been deprecated, learn more
here: https://platform.openai.com/docs/deprecations

The error message seems wrong, as text-davinci-003 is not used in ChatGPT.nvim. Nonetheless, the command fails and the deprecations URL the error refers to points code-davinci-edit-001 was to be shutdown at 2024-01-04. The recommended replacement is GPT-4, but that might increase the costs (I didn't check).

traysh avatar Jan 08 '24 20:01 traysh

just found the model text-davinci-003 is the one actually used in the code, in ChatGPT.nvim/lua/chatgpt/flows/code_completions/init.lua

traysh avatar Jan 08 '24 21:01 traysh

temp workaround is to change that model to gpt-3.5-turbo-instruct works for me.

lalewis1 avatar Jan 11 '24 06:01 lalewis1

I changed to the instruct model and at first it worked for me, but now I am getting some API errors // API ERROR: Invalid URL (POST /v1/edits)

Msouza91 avatar Jan 11 '24 13:01 Msouza91

@lalewis1 Did you just change the model reference on the ^-o settings screen? Mine only works if I set it to a GPT-4 model which is considerably more expensive relative to 3.5-turbo

Msouza91 avatar Jan 14 '24 18:01 Msouza91

Sorry, should have mentioned that.

I changed this line https://github.com/jackMort/ChatGPT.nvim/blob/main/lua%2Fchatgpt%2Fflows%2Fcode_completions%2Finit.lua#L55

From: model = "text-davinci-003", To: model = "gpt-3.5-turbo-instruct",

If you are using Lazy the source files should be under ~/.local/share/nvim/lazy/chatgpt/...

Or at least that's where they are on my Linux machine. Might be different on Windows.

lalewis1 avatar Jan 14 '24 21:01 lalewis1

Can this be closed as it seems to have been fixed by https://github.com/jackMort/ChatGPT.nvim/pull/373

kaka-ruto avatar Apr 04 '24 01:04 kaka-ruto

yeah that's correct.

lalewis1 avatar Apr 04 '24 02:04 lalewis1