diff --git a/emacs/+chatGPT.el b/emacs/+chatGPT.el new file mode 100644 index 0000000..1c2646f --- /dev/null +++ b/emacs/+chatGPT.el @@ -0,0 +1,9 @@ +(use-package! chatgpt + :defer t + :config + (unless (boundp 'python-interpreter) + (defvaralias 'python-interpreter 'python-shell-interpreter)) + (setq chatgpt-repo-path (expand-file-name "straight/repos/ChatGPT.el/" doom-local-dir)) + (set-popup-rule! (regexp-quote "*ChatGPT*") + :side 'bottom :size .5 :ttl nil :quit t :modeline nil) + :bind ("C-c q" . chatgpt-query)) diff --git a/emacs/config.el b/emacs/config.el index 8fd879c..73afbb2 100644 --- a/emacs/config.el +++ b/emacs/config.el @@ -35,3 +35,5 @@ (load! "+keybinds") (load! "+orgmode") + +(load! "+chatGPT") diff --git a/emacs/config.org b/emacs/config.org index 8cd9d02..a0cbdc4 100644 --- a/emacs/config.org +++ b/emacs/config.org @@ -843,6 +843,44 @@ cat a.org ;(add-hook 'mixed-pitch-mode-hook #'solaire-mode-reset) #+end_src + +** ChatGPT +ChatGPT is good for creating short summaries about technical subjects. Its may be incorrect & does not produce citations, and is effectively just cargo culting, but may help me fill out some Roam docs quickly among other things. + +We will be using the [[https://github.com/joshcho/ChatGPT.el][joshcho/ChatGPT.el]] package + +To install this +#+BEGIN_SRC emacs-lisp :tangle "packages.el" +(package! chatgpt + :recipe (:host github :repo "joshcho/ChatGPT.el" :files ("dist" "*.el"))) +#+END_SRC + +Logic for this will be found in =$DOOMDIR/+chatGPT.el= +#+begin_src emacs-lisp +(load! "+chatGPT") +#+end_src + +Then use =use-package!= to configure. =C-c q= is the bind for this. + +#+begin_src emacs-lisp :tangle "+chatGPT.el" :noweb no-export :comments no +(use-package! chatgpt + :defer t + :config + (unless (boundp 'python-interpreter) + (defvaralias 'python-interpreter 'python-shell-interpreter)) + (setq chatgpt-repo-path (expand-file-name "straight/repos/ChatGPT.el/" doom-local-dir)) + (set-popup-rule! (regexp-quote "*ChatGPT*") + :side 'bottom :size .5 :ttl nil :quit t :modeline nil) + :bind ("C-c q" . chatgpt-query)) +#+end_src + +This runs the =chatgpt.py= file. There are a couple of dependencies, to install run the following: +#+begin_src bash :tangle no +pip install sexpdata==0.0.3 +pip install epc +pip install git+https://github.com/mmabrouk/chatgpt-wrapper +chatgpt install +#+end_src * Content Stolen From A large amount of the details listed here have been lifted from: - [[https://tecosaur.github.io/emacs-config/][tecosaur's literate configuration]]. diff --git a/emacs/packages.el b/emacs/packages.el index 30c6370..fe07ed8 100644 --- a/emacs/packages.el +++ b/emacs/packages.el @@ -1,3 +1,6 @@ ;;; packages.el -*- lexical-binding: t; -*- (package! ob-mermaid) + +(package! chatgpt + :recipe (:host github :repo "joshcho/ChatGPT.el" :files ("dist" "*.el")))