-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Can you change the Open AI API key setup to read the environment variable instead of writing it in the config? #4
Comments
☝🏻 this! It says in the documentation that you can set the |
Hey @LSleutsky , actually, I just found out that it works with |
Hmm, really? That's bizarre, it doesn't work for me. Sometimes it gives me an error message that I've exceeded my API billing usage, even tho I have tons of credits on my OpenAI account, and have tried creating new keys and setting it to the env variable you mention, and still nada! Will try to dig around and see why. Thanks for the reply...! |
Another option if you manage your dotfiles with git is to keep the API keys in a Lua file that's in your .gitignore. Here's how I do it: https://github.com/b0o/nvim-conf/blob/main/lua/user/private.example.lua |
Just to clarify, |
Another alternative is to have the key in OPENAI_API_KEY=$(pass show openai-api-key) on fish shell: set -g OPENAI_API_KEY (pass show openai-api-key) |
People including me backs up their dot file in Github or other cloud platforms may accidentally expose their API key to the public, which I just did.
The text was updated successfully, but these errors were encountered: