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

Codeium with auth-source and password-store (aka pass) #84

Open
abcdw opened this issue Dec 1, 2023 · 1 comment
Open

Codeium with auth-source and password-store (aka pass) #84

abcdw opened this issue Dec 1, 2023 · 1 comment

Comments

@abcdw
Copy link

abcdw commented Dec 1, 2023

To obtain a token from password store, you can use the following snippet of code:

(with-eval-after-load 'codeium
  (require 'auth-source)
  (setq-default
   codeium/metadata/api_key
   (funcall (plist-get
             (nth 0 (auth-source-search :host "codeium.ai"))
             :secret))))

Probably it should be a better implementation or support on codeium side.

@bbigras
Copy link

bbigras commented Feb 23, 2024

Yeah it would be nice if codeium had something like gptel where you can set gptel-api-key to the key string and the default is to use a function to fetch the key from the auth-source.

https://github.com/karthink/gptel/blob/8ba07d042c11cb65ebce69fc1dc069905ec00e5e/gptel.el#L156-L166

https://github.com/karthink/gptel/blob/8ba07d042c11cb65ebce69fc1dc069905ec00e5e/gptel.el#L498-L512

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

2 participants