Closed jgarte closed 1 year ago
Could you try executing (auth-source-pass-enable) before running gptel?
In case somebody is lazy, like me, and also whose password-store file naming convention doesn't fit with that conventions assumed by auth-source
, you can directly retrieve the key with:
(alist-get 'secret (auth-source-pass-parse-entry "KEY_FILE_WITHIN_PASSWORD_STORE_WITHOUT_EXTENSION")))
i.e. you would need to customize gptel-api-key
to:
(lambda () (alist-get 'secret (auth-source-pass-parse-entry "KEY_FILE_WITHIN_PASSWORD_STORE_WITHOUT_EXTENSION")))
(You might also need (require 'auth-source-pass)
somewhere in your init.)
(This works for me.)
(But if your key is in .password-store/openai.com
, and you run:
(auth-source-pass-enable)
then everything should also work.)
BTW @karthink thanks for the very convenient package! :)
BTW @karthink thanks for the very convenient package! :)
Glad it's useful.
I'm assuming this issue is resolved now. Please re-open if not.
After following the usage section I added this config:
But
gptel
still prompts me for an api key.What do you think I am missing?