Skip to content

Commit 557da2f

Browse files
authored
Merge pull request #2 from eduardoarandah/patch-1
README: get api key from environment
2 parents e14355f + 64bdd38 commit 557da2f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ For lazy:
2525
```lua
2626
{
2727
'skywind3000/vim-gpt-commit',
28-
config = function ()
29-
vim.g.gpt_commit_key = 'Your openai apikey'
28+
config = function ()
29+
-- if you don't want to set your api key directly, add to your .zshrc:
30+
-- export OPENAI_API_KEY='sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
31+
vim.g.gpt_commit_key = os.getenv("OPENAI_API_KEY")
3032
-- uncomment this line below to enable proxy
3133
-- vim.g.gpt_commit_proxy = 'socks5://127.0.0.1:1080'
3234
end,

0 commit comments

Comments
 (0)