Add chatgpt-shell config
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "chatgpt-shell"]
|
||||||
|
path = chatgpt-shell
|
||||||
|
url = https://github.com/xenodium/chatgpt-shell
|
||||||
1
chatgpt-shell
Submodule
1
chatgpt-shell
Submodule
Submodule chatgpt-shell added at f7a53903eb
22
config.org
22
config.org
@@ -1306,6 +1306,28 @@
|
|||||||
'clang-format-region-or-buffer)))
|
'clang-format-region-or-buffer)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** ChatGPT
|
||||||
|
The =chatpt-shell= package is in a git submodule, so this has to be
|
||||||
|
added to the [[help:load-path][load-path]] and ~require~'d:
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(let ((path (concat (getenv "HOME")
|
||||||
|
"/.emacs.d/chatgpt-shell")))
|
||||||
|
(add-to-list 'load-path path))
|
||||||
|
(require 'chatgpt-shell)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
[[help:chatgpt-shell-openai-key][chatgpt-shell-openai-key]] must also be set to a function that
|
||||||
|
returns an OpenAI API key. I have a key (made on [[https://platform.openai.com/account/api-keys][this page]]) stored
|
||||||
|
in =pass(1)= under =openai/api-key=, so this can be retrieved via
|
||||||
|
[[help:process-lines][process-lines]]:
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq chatgpt-shell-openai-key
|
||||||
|
(lambda ()
|
||||||
|
(car (process-lines "pass" "openai/api-key"))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Backup and Autosave
|
* Backup and Autosave
|
||||||
** Keep $PWD Tidy
|
** Keep $PWD Tidy
|
||||||
Emacs' default behaviour of dumping temporary files in the current
|
Emacs' default behaviour of dumping temporary files in the current
|
||||||
|
|||||||
Reference in New Issue
Block a user