diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 19992c8..e3a988b 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -306,14 +306,6 @@ auto-mode-alist)) ) -(defun list-ollama-models () - "Query the local Ollama server for the list of installed models" - (condition-case error-var - (mapcar #'intern (mapcar #'car (mapcar #'split-string (cdr (process-lines "podllama" "list"))))) - (error - (message "Failed to list local models: %s" error-var) - ()))) - (use-package gptel :hook ; keep-sorted start @@ -326,7 +318,6 @@ ; keep-sorted start (gptel-backend (gptel-get-backend "Ollama")) (gptel-default-mode 'org-mode) - (gptel-expert-commands t) (gptel-highlight-methods '(face margin)) (gptel-model 'llama3.2:latest) ; keep-sorted end @@ -337,7 +328,7 @@ ) (gptel-make-ollama "Ollama" :stream t - :models (list-ollama-models) + :models '(llama3.2:latest) ) ) diff --git a/.local/bin/podllama b/.local/bin/llm-import-model similarity index 66% rename from .local/bin/podllama rename to .local/bin/llm-import-model index 947b0d0..ffd2c6c 100755 --- a/.local/bin/podllama +++ b/.local/bin/llm-import-model @@ -5,5 +5,5 @@ IFS=$'\n\t' mkdir --parents ~/.local/share/ollama/ pod_id=$(podman run --detach --rm --volume ~/.local/share/ollama/:/root/.ollama ollama:latest) -podman exec --interactive --tty "${pod_id}" ollama "$@" -podman kill "${pod_id}" > /dev/null +podman exec --interactive --tty "${pod_id}" ollama pull "${1}" +podman kill "${pod_id}"