commit 4d587f0d43373395962f8ee902a8379af7cb59b3 parent 541fbd9507682919ccdeb1dce300733b59aba841 Author: Michael Neuper <michael@michaelneuper.com> Date: Thu, 10 Jul 2025 00:52:08 +0200 configure llm module Diffstat:
| M | config.org | | | 29 | +++++++++++++++++++++++++++-- |
| M | packages.el | | | 3 | +++ |
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/config.org b/config.org @@ -505,11 +505,36 @@ Ensure [[https://github.com/alexluigit/dirvish/blob/main/docs/CUSTOMIZING.org#in (setq dape-breakpoint-margin-string "●")) ;; or use • #+end_src *** llm +Set up =gptel= to use copilot and install some tools from the =llm-tool-collection= package. #+begin_src emacs-lisp (after! gptel - (setq gptel-model '4o + (setq gptel-model 'gpt-4.1 gptel-backend (gptel-make-gh-copilot "Copilot") - gptel-default-mode 'org-mode)) + gptel-default-mode 'org-mode) + + ;; see https://github.com/karthink/gptel/wiki/Tools-collection + (gptel-make-tool + :function (lambda (command &optional working_dir) + (with-temp-message (format "Executing command: `%s`" command) + (let ((default-directory (if (and working_dir (not (string= working_dir ""))) + (expand-file-name working_dir) + default-directory))) + (shell-command-to-string command)))) + :name "run_command" + :description "Executes a shell command and returns the output as a string. IMPORTANT: This tool allows execution of arbitrary code; user confirmation will be required before any command is run." + :args (list + '(:name "command" + :type string + :description "The complete shell command to execute.") + '(:name "working_dir" + :type string + :description "Optional: The directory in which to run the command. Defaults to the current directory if not specified.")) + :category "command" + :confirm t + :include t) + + (mapcar (apply-partially #'apply #'gptel-make-tool) + (llm-tool-collection-get-all))) #+end_src *** lsp +eglot Change some of =eglot='s faces. diff --git a/packages.el b/packages.el @@ -38,6 +38,9 @@ (package! eglot-booster :recipe (:host github :repo "jdtsmith/eglot-booster")) +(package! llm-tool-collection + :recipe (:host github :repo "skissue/llm-tool-collection")) + ;; UI (package! solaire-mode :disable t)