Configure gptel for Ollama Cloud

This commit is contained in:
Fabio Scotto di Santolo
2026-04-19 08:03:27 +02:00
parent 8732cb886f
commit 2fd894d2b0
3 changed files with 35 additions and 5 deletions

View File

@@ -4,13 +4,20 @@
:ensure t
:commands (gptel gptel-send gptel-rewrite)
:config
(setq gptel-model 'qwen3.5:397b)
(setq gptel-backend
(gptel-make-ollama
"Ollama"
:host "localhost:11434"
:stream t))
;; Set `gptel-model' after installing a local Ollama model.
)
"Ollama Cloud"
:protocol "https"
:host "ollama.com"
:endpoint "/api/chat"
:models '(qwen3.5:397b)
:stream t
:key (lambda () (gptel-api-key-from-auth-source "ollama.com"))
:header
(lambda (&optional _info)
(when-let ((key (gptel-api-key-from-auth-source "ollama.com")))
`(("Authorization" . ,(concat "Bearer " key))))))))
(provide 'fscotto-gptel)