From 3a712cf8be35a3e95010dc7ea3ab357e3a95ed10 Mon Sep 17 00:00:00 2001 From: larstvei Date: Fri, 23 Jun 2023 14:20:01 +0200 Subject: [PATCH] Use gptel in favor of chatgpt-shell --- init.org | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/init.org b/init.org index fee00d9..ee02d37 100644 --- a/init.org +++ b/init.org @@ -1034,8 +1034,7 @@ 'org-babel-load-languages '((emacs-lisp . t) (python . t) - (clojure . t) - (chatgpt-shell . t)))) + (clojure . t)))) #+end_src @@ -1194,7 +1193,8 @@ * ChatGPT - I have a line like this: + The ChatGPT client [[https://github.com/karthink/gptel][gptel]] needs an API key from the OpenAI API. This key can + be stored in your ~.authinfo~ file by adding a line like this: #+begin_example @@ -1202,25 +1202,17 @@ #+end_example - in my ~.authinfo~ file. Then the ~chatgpt-shell-openai-key~ can by set by: + Then the ~gptel-api-key~ can be set using auth source. #+begin_src emacs-lisp ;; Interaction mode for ChatGPT - (use-package chatgpt-shell + (use-package gptel :defer t :config - (setq chatgpt-shell-openai-key - (auth-source-pick-first-password - :host "api.openai.com"))) - - #+end_src - - #+begin_src emacs-lisp - - ;; Org babel functions for ChatGPT evaluation - (use-package ob-chatgpt-shell - :after ob) + (setq gptel-default-mode 'org-mode + gptel-api-key (auth-source-pick-first-password + :host "api.openai.com"))) #+end_src