mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 23:49:56 +00:00
Reconfigure GPTel for Ollama
This commit is contained in:
@@ -282,9 +282,6 @@
|
|||||||
- src: desktop/email.el.j2
|
- src: desktop/email.el.j2
|
||||||
dest: .emacs.d/lisp/misc/email.el
|
dest: .emacs.d/lisp/misc/email.el
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
- src: desktop/gptel-private.el.j2
|
|
||||||
dest: .emacs.d/lisp/misc/gptel-private.el
|
|
||||||
mode: "0600"
|
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.dest }}"
|
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
|
:ensure t
|
||||||
:commands (gptel gptel-send gptel-rewrite)
|
:commands (gptel gptel-send gptel-rewrite)
|
||||||
:config
|
:config
|
||||||
(let ((private-config
|
(setq gptel-backend
|
||||||
(expand-file-name "lisp/misc/gptel-private.el" user-emacs-directory)))
|
(gptel-make-ollama
|
||||||
(when (file-readable-p private-config)
|
"Ollama"
|
||||||
(load private-config nil 'nomessage))))
|
:host "localhost:11434"
|
||||||
|
:stream t))
|
||||||
|
;; Set `gptel-model' after installing a local Ollama model.
|
||||||
|
)
|
||||||
|
|
||||||
(provide 'fscotto-gptel)
|
(provide 'fscotto-gptel)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user