Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning when using api_key_cmd #443

Open
wilbrijo opened this issue Jun 7, 2024 · 3 comments
Open

Warning when using api_key_cmd #443

wilbrijo opened this issue Jun 7, 2024 · 3 comments

Comments

@wilbrijo
Copy link

wilbrijo commented Jun 7, 2024

I'm using the op option to set api_key_cmd. There are two issues I'm running in to, however.

  1. Every time I open nvim, I get a warning that OPENAI_API_KEY is not set.
  2. 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",
	},
}
Screenshot 2024-06-07 at 3 06 35 PM
@maxpetretta
Copy link

have the second issue as well...

@fabmorais
Copy link

same here!

@MrCee
Copy link

MrCee commented Jul 12, 2024

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.. #454

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants