jackMort / ChatGPT.nvim

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

curl: no URL specified #265

Closed thaiducdung255 closed 1 year ago

thaiducdung255 commented 1 year ago

Hi, after install the plugin, i can use it normally but, after some questions, i got this error, please help: image

hacker-DOM commented 1 year ago

I am encountering this as well. Didn't happen before. Must have been introduced in a recent commit.

Fissium commented 1 year ago

The same error

cauliyang commented 1 year ago

same error

lfaudreejr commented 1 year ago

After recent update, OPENAI_API_HOST key not set warning started popping up and this curl error as well.

Mephistophillis commented 1 year ago

I found the problem: if OPENAI_API_HOST exists we should fire the callback for create other variables. Simple example (with duplicate loadApiConfig func) https://github.com/Mephistophillis/ChatGPT.nvim/commit/f07b3e4009d883bc6dbcb84f4220fa0b702f6345

heimann commented 1 year ago

Temporary fix while we wait is to force your plugin manager to load the last working commit (24bcca7). If you're using Lazy.nvim the configuration that would work is:

  {
    "jackMort/ChatGPT.nvim",
    event = "VeryLazy",
    commit = "24bcca7",
    config = function()
      require("chatgpt").setup()
    end,
    dependencies = {
      "MunifTanjim/nui.nvim",
      "nvim-lua/plenary.nvim",
      "nvim-telescope/telescope.nvim"
    },
  },
minamorl commented 1 year ago

I think that PR is pretty corner case so reverting seems good to me