feat(misc/chatgpt): add unofficial package for interacting with ChatGPT

This commit is contained in:
2023-03-01 12:29:14 +00:00
parent 405b6d0a15
commit 9207050c23
3 changed files with 34 additions and 0 deletions

View File

@@ -64,6 +64,7 @@
(require 'siren-flycheck)
;; Misc.
(require 'siren-chatgpt)
(require 'siren-explain-pause)
(require 'siren-lorem-ipsum)
(require 'siren-rand)

View File

@@ -0,0 +1,29 @@
;;; siren-chatgpt.el --- jimeh's Emacs Siren: chatgpt configuration.
;;; Commentary:
;; Basic configuration for chatgpt.
;;; Code:
(use-package chatgpt
:straight (:host github :repo "joshcho/ChatGPT.el"
:files ("dist" "*.el" "*.py"))
:bind
("C-c C-q" . chatgpt-query)
:custom
(chatgpt-query-format-string-map
'(("doc" . "Please write the documentation for the following code:\n\n%s")
("bug" . "There is a bug in the following code, please help me fix it:\n\n%s")
("understand" . "What is the following?\n\n%s")
("explain" . "Explain the following in detail:\n\n%s")
("improve" . "Please improve the following:\n\n%s")))
:init
(require 'python)
(setq chatgpt-repo-path
(expand-file-name "straight/repos/ChatGPT.el/" straight-base-dir)))
(provide 'siren-chatgpt)
;;; siren-chatgpt.el ends here

View File

@@ -1,4 +1,6 @@
(("a.el" . "93e5ed8c495794d1ba3c04b43041b95ce01079b1")
(("ChatGPT.el" . "336240cf01fdb1b05acfa0afc9e095e819d4efcb")
("a.el" . "93e5ed8c495794d1ba3c04b43041b95ce01079b1")
("ace-window" . "77115afc1b0b9f633084cf7479c767988106c196")
("all-the-icons-completion" . "e09e65bf05b247ea0e2bdc5d36ea5a58fc2ed69b")
("all-the-icons-ibuffer" . "e670540c1177258f2fe8e089dc9203c50e52dddd")
@@ -51,9 +53,11 @@
("elisp-tree-sitter" . "3cfab8a0e945db9b3df84437f27945746a43cc71")
("emacs-aio" . "da93523e235529fa97d6f251319d9e1d6fc24a41")
("emacs-async" . "d27b65fd453586b2fa87f8124a65da0d4fdb268e")
("emacs-ctable" . "48b73742757a3ae5736d825fe49e00034cc453b5")
("emacs-deferred" . "2239671d94b38d92e9b28d4e12fd79814cfb9c16")
("emacs-direnv" . "268536f564b7eba99264a89a9149268eb4bc67ac")
("emacs-emojify" . "1b726412f19896abf5e4857d4c32220e33400b55")
("emacs-epc" . "e1bfa5ca163273859336e3cc89b4b6460f7f8cda")
("emacs-hcl-mode" . "e4d9eef631e8a386341ae8f94f7c2579586e65b5")
("emacs-htmlize" . "dd27bc3f26efd728f2b1f01f9e4ac4f61f2ffbf9")
("emacs-kv" . "721148475bce38a70e0b678ba8aa923652e8900e")