Configure gptel with OpenRouter
This commit is contained in:
parent
d7f3fc0b8e
commit
b2fab49b5e
1 changed files with 11 additions and 3 deletions
|
|
@ -315,9 +315,17 @@
|
|||
(use-package gptel
|
||||
:bind ("C-c RET" . gptel-send)
|
||||
:config
|
||||
(setq gptel-api-key
|
||||
(lambda ()
|
||||
(nth 0 (process-lines "pass" "show" "openai-api"))))
|
||||
(setq gptel-backend
|
||||
(gptel-make-openai "OpenRouter"
|
||||
:host "openrouter.ai"
|
||||
:endpoint "/api/v1/chat/completions"
|
||||
:stream t
|
||||
:key (lambda ()
|
||||
(nth 0 (process-lines "pass" "show" "emacs-openrouter-api-key")))
|
||||
:models '(openai/gpt-5
|
||||
openai/gpt-5-mini
|
||||
openai/gpt-5-nano
|
||||
deepseek/deepseek-chat-v3-0324:free)))
|
||||
(setq gptel-default-mode 'org-mode))
|
||||
|
||||
(use-package graphql-mode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue