jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.71k stars 310 forks source link

ChatGPTEditWithInstructions is not working. #310

Closed bench87 closed 9 months ago

bench87 commented 11 months ago

In the ChatGPTEditWithInstructions window, I type prompt and press enter, but nothing happens. How do I find out which is the problem?

here my setting

  {
    "jackMort/ChatGPT.nvim",
    event = "VeryLazy",
    config = function()
      require("chatgpt").setup({
        api_key_cmd = "op read op://private/chatgpt/password --no-newline",
        openai_params = {
          model = "gpt-4",
        },
        openai_edit_params = {
          model = "code-davinci-edit-001",
          temperature = 0,
          top_p = 1,
          n = 1,
        },
      })
    end,
    dependencies = {
      "MunifTanjim/nui.nvim",
      "nvim-lua/plenary.nvim",
      "nvim-telescope/telescope.nvim",
    },
  },
Donut3183 commented 11 months ago

Try escaping insert mode first by pressing escape, and then enter.

nicolimo86 commented 11 months ago

You have an old config. Change this:

openai_edit_params = {
          model = "code-davinci-edit-001",  <----this
          temperature = 0,
          top_p = 1,
          n = 1,
        },

to this:

    openai_edit_params = {
      model = "gpt-3.5-turbo",
      temperature = 0,
      top_p = 1,
      n = 1,
    },