Use gptel in favor of chatgpt-shell

This commit is contained in:
larstvei 2023-06-23 14:20:01 +02:00
parent 277e6927af
commit 3a712cf8be

View File

@ -1034,8 +1034,7 @@
'org-babel-load-languages 'org-babel-load-languages
'((emacs-lisp . t) '((emacs-lisp . t)
(python . t) (python . t)
(clojure . t) (clojure . t))))
(chatgpt-shell . t))))
#+end_src #+end_src
@ -1194,7 +1193,8 @@
* ChatGPT * 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 #+begin_example
@ -1202,28 +1202,20 @@
#+end_example #+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 #+begin_src emacs-lisp
;; Interaction mode for ChatGPT ;; Interaction mode for ChatGPT
(use-package chatgpt-shell (use-package gptel
:defer t :defer t
:config :config
(setq chatgpt-shell-openai-key (setq gptel-default-mode 'org-mode
(auth-source-pick-first-password gptel-api-key (auth-source-pick-first-password
:host "api.openai.com"))) :host "api.openai.com")))
#+end_src #+end_src
#+begin_src emacs-lisp
;; Org babel functions for ChatGPT evaluation
(use-package ob-chatgpt-shell
:after ob)
#+end_src
* Multiple cursors * Multiple cursors
I use this /all the time/. Perhaps more than I should? I use this /all the time/. Perhaps more than I should?