Skip to content

Commit 36173b7

Browse files
committed
add gptel
1 parent a857ad4 commit 36173b7

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

emacs/lisp/init-copilot.el

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,18 @@ cleared, make sure the overlay doesn't come back too soon."
141141
;; (add-to-list 'copilot-indentation-alist '(emacs-lisp-mode 2))
142142
;; )
143143

144-
;; (use-package gptel
145-
;; :ensure t)
144+
(use-package gptel
145+
:ensure t
146+
:config
147+
(setq gptel-backend
148+
(gptel-make-openai "Llamafile"
149+
:protocol "http"
150+
:host "localhost:8080"
151+
:endpoint "/v1/chat/completions"
152+
:models '(LLaMA_CPP) ;; model name as exposed by the server
153+
:stream t
154+
:key (lambda () "no-key"))) ;; llamafile doesn’t require a real key
155+
)
146156

147157
(provide 'init-copilot)
148158
;; init-copilot.el ends here

0 commit comments

Comments
 (0)