Switch to groq as default gptel backend
This commit is contained in:
parent
8b66d95775
commit
5f863cbfc3
1 changed files with 23 additions and 6 deletions
|
@ -213,7 +213,7 @@
|
||||||
(defvar categories-alist
|
(defvar categories-alist
|
||||||
'(
|
'(
|
||||||
(:name "org" :modes (org-mode org-agenda-mode) :buffer-name () :type global)
|
(:name "org" :modes (org-mode org-agenda-mode) :buffer-name () :type global)
|
||||||
(:name "gptel" :modes nil :buffer-name ("*llama-cpp*" "*gptel*" "*gptel-context*" "*gptel-query*") :type global)
|
(:name "gptel" :modes nil :buffer-name ("*llama-cpp*" "*gptel*" "*groq*" "*gptel-context*" "*gptel-query*") :type global)
|
||||||
(:name "terminal" :modes (vterm-mode term-mode) :buffer-name () :type per-project)
|
(:name "terminal" :modes (vterm-mode term-mode) :buffer-name () :type per-project)
|
||||||
(:name "misc" :modes (+doom-dashboard-mode native-comp-limple-mode messages-buffer-mode) :buffer-name () :type global)
|
(:name "misc" :modes (+doom-dashboard-mode native-comp-limple-mode messages-buffer-mode) :buffer-name () :type global)
|
||||||
(:name "misc" :modes (special-mode fundamental-mode) :buffer-name () :type per-project)
|
(:name "misc" :modes (special-mode fundamental-mode) :buffer-name () :type per-project)
|
||||||
|
@ -291,12 +291,29 @@
|
||||||
(use-package! gptel
|
(use-package! gptel
|
||||||
:init
|
:init
|
||||||
:config
|
:config
|
||||||
(setq! gptel-backend (gptel-make-openai "gptel"
|
(defun read-api-secret (secret-file)
|
||||||
|
(with-temp-buffer
|
||||||
|
(insert-file-contents (expand-file-name secret-file "~"))
|
||||||
|
(string-trim (buffer-substring-no-properties (point-min) (point-max)))))
|
||||||
|
|
||||||
|
|
||||||
|
(setq! gptel-backend (gptel-make-openai "groq"
|
||||||
|
:host "api.groq.com"
|
||||||
|
:endpoint "/openai/v1/chat/completions"
|
||||||
:stream t
|
:stream t
|
||||||
:protocol "http"
|
:key (read-api-secret ".groq_api_key")
|
||||||
:host "100.64.0.3:8080"
|
:models '("llama3-70b-8192"
|
||||||
:models '("default"))
|
"mixtral-8x7b-32768"
|
||||||
gptel-model "default")
|
"llama3-8b-8192"))
|
||||||
|
gptel-model "llama3-70b-8192"
|
||||||
|
)
|
||||||
|
|
||||||
|
(gptel-make-openai "llama-cpp"
|
||||||
|
:stream t
|
||||||
|
:protocol "http"
|
||||||
|
:host "100.64.0.3:8080"
|
||||||
|
:models '("llama-cpp-model"))
|
||||||
|
|
||||||
(setq! gptel-expert-commands t)
|
(setq! gptel-expert-commands t)
|
||||||
(setq! gptel-temperature 0.2)
|
(setq! gptel-temperature 0.2)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue