diff options
| author | Franck Cuny <franck@fcuny.net> | 2025-06-12 14:40:10 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2025-06-12 14:40:10 -0700 |
| commit | 287154f425fae2fd908a11b7688457845efc9fa7 (patch) | |
| tree | aa8705260305ea5ba125b1b99b23f25c8abf6e73 /configs/users/fcuny/emacs/site-lisp/init-llm.el | |
| parent | stop using relative paths for secrets (diff) | |
| download | infra-287154f425fae2fd908a11b7688457845efc9fa7.tar.gz | |
move emacs configuration at the top level
Diffstat (limited to 'configs/users/fcuny/emacs/site-lisp/init-llm.el')
| -rw-r--r-- | configs/users/fcuny/emacs/site-lisp/init-llm.el | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/configs/users/fcuny/emacs/site-lisp/init-llm.el b/configs/users/fcuny/emacs/site-lisp/init-llm.el new file mode 100644 index 0000000..48346e6 --- /dev/null +++ b/configs/users/fcuny/emacs/site-lisp/init-llm.el @@ -0,0 +1,33 @@ +;;; init-llm.el --- Configure LLMs -*- lexical-binding: t -*- +;; Author: Franck Cuny <franck@fcuny.net> + +;;; Commentary: + +;; Configure completions + +;;; Code: +(require 's) + +(defun fcuny/read-anthropic-key () + "Read and return the API key for anthropic." + (with-temp-buffer + (insert-file-contents "~/.local/share/agenix/anthropic-api-key") + (s-trim (buffer-string)))) + +(use-package gptel + :custom + (gptel-default-mode 'org-mode) + :config + (gptel-make-anthropic "Claude" :stream t :key (lambda () (fcuny/read-anthropic-key)))) + +(use-package aidermacs + :bind ("C-c a" . aidermacs-transient-menu) + :custom + (aider-args '("--no-check-update" "--no-show-model-warnings")) + (aidermacs-default-model "claude-3-7-sonnet-latest") + :config + (setenv "ANTHROPIC_API_KEY" (fcuny/read-anthropic-key))) + +(provide 'init-llm) + +;;; init-llm.el ends here |
