mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
Reconfigure GPTel for Ollama
This commit is contained in:
@@ -282,9 +282,6 @@
|
||||
- src: desktop/email.el.j2
|
||||
dest: .emacs.d/lisp/misc/email.el
|
||||
mode: "0644"
|
||||
- src: desktop/gptel-private.el.j2
|
||||
dest: .emacs.d/lisp/misc/gptel-private.el
|
||||
mode: "0600"
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
;;; gptel-private.el -*- lexical-binding: t; -*-
|
||||
|
||||
(let ((openai-api-key "{{ vault_openai_api_key | default('') }}"))
|
||||
(when (> (length openai-api-key) 0)
|
||||
(setq gptel-api-key openai-api-key)))
|
||||
|
||||
;;; gptel-private.el ends here
|
||||
@@ -4,10 +4,13 @@
|
||||
:ensure t
|
||||
:commands (gptel gptel-send gptel-rewrite)
|
||||
:config
|
||||
(let ((private-config
|
||||
(expand-file-name "lisp/misc/gptel-private.el" user-emacs-directory)))
|
||||
(when (file-readable-p private-config)
|
||||
(load private-config nil 'nomessage))))
|
||||
(setq gptel-backend
|
||||
(gptel-make-ollama
|
||||
"Ollama"
|
||||
:host "localhost:11434"
|
||||
:stream t))
|
||||
;; Set `gptel-model' after installing a local Ollama model.
|
||||
)
|
||||
|
||||
(provide 'fscotto-gptel)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user