[doom] Add gptel
This commit is contained in:
@@ -72,6 +72,15 @@
|
|||||||
;; org-caldav-files nil
|
;; org-caldav-files nil
|
||||||
;; org-caldav-sync-direction 'cal->org))
|
;; org-caldav-sync-direction 'cal->org))
|
||||||
|
|
||||||
|
(defun my/get-rbw-password (alias)
|
||||||
|
"Return the password for ALIAS via rbw, unlocking the vault only if needed."
|
||||||
|
(let* ((cmd (format "rbw get %s 2>&1" alias))
|
||||||
|
(output (shell-command-to-string cmd)))
|
||||||
|
(string-trim output)))
|
||||||
|
|
||||||
|
(use-package! gptel
|
||||||
|
:config
|
||||||
|
(setq! gptel-api-key (my/get-rbw-password "openai-api-key-chatgpt-el")))
|
||||||
|
|
||||||
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
||||||
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
||||||
|
|||||||
@@ -50,3 +50,5 @@
|
|||||||
;; (unpin! t)
|
;; (unpin! t)
|
||||||
|
|
||||||
;; (package! org-caldav)
|
;; (package! org-caldav)
|
||||||
|
|
||||||
|
(package! gptel :recipe (:nonrecursive t))
|
||||||
|
|||||||
Reference in New Issue
Block a user