Set some customizations for llm integration

This commit is contained in:
Jeremy Dormitzer 2024-05-16 10:37:26 -04:00
parent f4da3fc9e2
commit 87584357a9
2 changed files with 8 additions and 1 deletions

View File

@ -9,6 +9,12 @@
llm-set-model
llm-prompt
llm-prompt-buffer
llm-prompt-region))
llm-prompt-region)
:config
(add-to-list 'display-buffer-alist '("\\*llm-.*\\*"
(display-buffer-reuse-mode-window
display-buffer-pop-up-window)))
:custom
(llm-model "nous-hermes-llama2-13b"))
(provide 'init-llm)

View File

@ -156,6 +156,7 @@ The process is named NAME and runs in BUFFER-NAME."
(switch-to-buffer "*llm-prompt-buffer*")))
(defun llm-prompt-region (query)
"Prompt llm with the contents of the region and the QUERY."
(interactive "sQuery: ")
(let ((extra-args (list "-s" (buffer-substring-no-properties (region-beginning) (region-end)))))
(apply #'llm--run-async