mirror of
https://github.com/larstvei/dot-emacs.git
synced 2024-11-26 07:28:31 +00:00
Use gptel in favor of chatgpt-shell
This commit is contained in:
parent
277e6927af
commit
3a712cf8be
24
init.org
24
init.org
@ -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,25 +1202,17 @@
|
|||||||
|
|
||||||
#+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
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
|
|
||||||
;; Org babel functions for ChatGPT evaluation
|
|
||||||
(use-package ob-chatgpt-shell
|
|
||||||
:after ob)
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user