Closed laurentHYZ closed 1 month ago
@laurentHYZ
You would put that in config.el
in Doom Emacs (I think).
You can do something like this:
;; All gptel configuration:
(use-package gptel
:defer
:config
(gptel-make-anthropic "Claude" ;Any name you want
:stream t ;Streaming responses
:key "your-api-key"))
If you're only using Claude, you may want to make that the default backend for gptel, as indicated in the README.
Hi Karthink, I modified my doom .config.el as follow:
(use-package! gptel :config (setq! gptel-api-key "sk-proj-ant...") :defer :config (gptel-make-anthropic "Claude" ;Any name you want :stream t ;Streaming responses :key "sk-ant-api...")
It does not work, I don't see a new option to pick from within my gptel-menu.
I must be missing a keyword required in doom. In Doom use-package should be replaced by use-package!, should (gptel-make-anthropic "C...") be replaced by (setq! gptel-make-anthropic ...).
Thank you!
Could you try this?
(use-package! gptel
:config
(setq! gptel-api-key "sk-proj-ant...")
(gptel-make-anthropic "Claude" ;Any name you want
:stream t ;Streaming responses
:key "sk-ant-api..."))
We'll have to ask a Doom Emacs user if this doesn't work.
Here's my config
Hi Edmund, I was late the check the issue here and did not reply on time, sorry about that and thank you for sharing your config. I have tried it and I have little problems with the authentication, but this issue is closed. thank you!
Hi Karthink, I have installed and used gptel, and I was watching your YT video in order to understand how I can add additional LLM, but I am missing something. The documentation says that registering a backend for , say, anthropic should look like that: (gptel-make-anthropic "Claude" ;Any name you want :stream t ;Streaming responses :key "your-api-key")
Where do I put that code within doom emacs? thank you!