Automatically update the list of Ollama models

This commit is contained in:
Ohad Livne 2025-12-03 18:24:25 +02:00
parent 7900661c82
commit 1b7fb23a2e
Signed by: libohad-dev
GPG key ID: 34FDC68B51191A4D
2 changed files with 9 additions and 5 deletions

View file

@ -327,6 +327,12 @@
(seq-find (lambda (x) (eq (car x) model)) library model))
available))
(defun generate-ollama-declaration ()
(gptel-make-ollama "Ollama"
:host "ollama:11434"
:stream t
:models (enrich-ollama-models (list-ollama-models) gptel--local-models)))
(use-package gptel
:hook
;; keep-sorted start
@ -350,11 +356,7 @@
:stream t
:key 'gptel-api-key-from-auth-source
)
(gptel-make-ollama "Ollama"
:host "ollama:11434"
:stream t
:models (enrich-ollama-models (list-ollama-models) gptel--local-models)
)
(generate-ollama-declaration)
)
(use-package power-mode)