feat: Configure Ellama further

This commit is contained in:
2025-06-15 15:01:28 +03:00
parent df0311c7ca
commit e3fdedc12f

View File

@@ -565,7 +565,7 @@
;; (add-hook 'darkman-after-mode-changed-hook #'toggle-theme) ;; (add-hook 'darkman-after-mode-changed-hook #'toggle-theme)
(use-package! ellama (use-package! ellama
:ensure t :ensure t
:bind ("SPC e" . ellama) ;; :bind ("SPC e" . ellama)
;; send last message in chat buffer with C-c C-c ;; send last message in chat buffer with C-c C-c
:hook (org-ctrl-c-ctrl-c-final . ellama-chat-send-last-message) :hook (org-ctrl-c-ctrl-c-final . ellama-chat-send-last-message)
:init :init
@@ -597,20 +597,20 @@
;; without it. It is just example. ;; without it. It is just example.
;; Naming new sessions with llm ;; Naming new sessions with llm
(setopt ellama-naming-provider (setopt ellama-naming-provider
(make-llm-ollama (make-llm-ollama
:chat-model "llama3:8b-instruct-q8_0" :chat-model "deepseek-r1"
:embedding-model "nomic-embed-text" :embedding-model "nomic-embed-text"
:default-chat-non-standard-params '(("stop" . ("\n"))))) :default-chat-non-standard-params '(("stop" . ("\n")))))
(setopt ellama-naming-scheme 'ellama-generate-name-by-llm) (setopt ellama-naming-scheme 'ellama-generate-name-by-llm)
;; Translation llm provider ;; Translation llm provider
(setopt ellama-translation-provider ;; (setopt ellama-translation-provider
(make-llm-ollama ;; (make-llm-ollama
:chat-model "qwen2.5:3b" ;; :chat-model "qwen2.5:3b"
:embedding-model "nomic-embed-text" ;; :embedding-model "nomic-embed-text"
:default-chat-non-standard-params ;; :default-chat-non-standard-params
'(("num_ctx" . 32768)))) ;; '(("num_ctx" . 32768))))
(setopt ellama-extraction-provider (make-llm-ollama (setopt ellama-extraction-provider (make-llm-ollama
:chat-model "qwen2.5-coder:7b-instruct-q8_0" :chat-model "qwen2.5-coder"
:embedding-model "nomic-embed-text" :embedding-model "nomic-embed-text"
:default-chat-non-standard-params :default-chat-non-standard-params
'(("num_ctx" . 32768)))) '(("num_ctx" . 32768))))
@@ -620,15 +620,13 @@
(setopt ellama-instant-display-action-function #'display-buffer-at-bottom) (setopt ellama-instant-display-action-function #'display-buffer-at-bottom)
:config :config
;; show ellama context in header line in all buffers ;; show ellama context in header line in all buffers
(ellama-context-header-line-global-mode +1) ;; (ellama-context-header-line-global-mode nil)
;; show ellama session id in header line in all buffers ;; show ellama session id in header line in all buffers
(ellama-session-header-line-global-mode +1) ;; (ellama-session-header-line-global-mode nil)
;; handle scrolling events ;; handle scrolling events
(advice-add 'pixel-scroll-precision :before #'ellama-disable-scroll) (advice-add 'pixel-scroll-precision :before #'ellama-disable-scroll)
(advice-add 'end-of-buffer :after #'ellama-enable-scroll)) (advice-add 'end-of-buffer :after #'ellama-enable-scroll))
;; (after! ellama (map! :leader
;; (map! :leader :nv "e" #'ellama
;; :nv "e" #' )
;; )
;; )