ChatGPT.nvim
ChatGPT.nvim copied to clipboard
Warning when using `api_key_cmd`
I'm using the op option to set api_key_cmd. There are two issues I'm running in to, however.
- Every time I open nvim, I get a warning that
OPENAI_API_KEYis not set. - I'm immediately asked to authenticate with 1Password, even though I haven't loaded the plugin. I thought since
event = "VeryLazy", this should only load when I actually run chatgpt command.
I'm obviously doing something wrong, as no one else has posted about this issue. I'm just not sure what it is.
return {
"jackMort/ChatGPT.nvim",
event = "VeryLazy",
config = function()
require("chatgpt").setup({
api_key_cmd = "op read op://private/OpenAI/credential --no-newline",
api_model = "gpt-4-turbo",
})
end,
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"folke/trouble.nvim",
"nvim-telescope/telescope.nvim",
},
}
have the second issue as well...
same here!
I saw this when trying to use pass. I was setting the OPENAI_API_KEY in my lua plugin but haven't needed to do that now. See if any of this helps.. https://github.com/jackMort/ChatGPT.nvim/issues/454