1
0
Fork 0

Move Babel section, add use-package section for it

This commit is contained in:
Bram Schoenmakers 2024-04-15 07:06:30 +02:00
parent 0f96a54818
commit 2afc2f5b6d
Signed by: bram
GPG key ID: 0CCD19DFDC63258F

View file

@ -32,26 +32,6 @@ kagi.el has some functions that use FastGPT to perform certain operations on tex
- =kagi-proofread= :: Proofread a string or buffer.
- =kagi-fastgpt-prompt-definition= :: Returns the definition of a word.
*** Org Babel support
=kagi-fastgpt-prompt= can also be used from Org mode with source blocks. Make sure to initialize the package:
#+begin_src elisp
(require 'ob-kagi-fastgpt)
(ob-kagi-fastgpt-setup)
#+end_src
Then create a source block with 'language' =kagi-fastgpt=:
#+begin_src org
,#+begin_src kagi-fastgpt
Can Kagi FastGPT be used in Org mode?
,#+end_src
#+end_src
Then, press =C-c C-c= (=org-babel-execute-src-block=) to obtain the result below the prompt.
** Universal Summarizer
- =kagi-summarize-buffer= :: Summarizes the content of a buffer.
@ -181,6 +161,38 @@ could contain an instruction to say either /Yes/ or /No/. See
Note the =%%s= notation, =format= turns it into =%s= which becomes the prompt placeholder.
** Org Babel support
=kagi-fastgpt-prompt= can also be used from Org mode with source blocks. Make sure to initialize the package.
With =use-package=:
#+begin_src elisp
(use-package ob-kagi-fastgpt
:ensure nil ; provided by the kagi package
:after org
:config
(ob-kagi-fastgpt-setup))
#+end_src
Or, without =use-package=:
#+begin_src elisp
(require 'ob-kagi-fastgpt)
(ob-kagi-fastgpt-setup)
#+end_src
Then create a source block with 'language' =kagi-fastgpt=:
#+begin_src org
,#+begin_src kagi-fastgpt
Can Kagi FastGPT be used in Org mode?
,#+end_src
#+end_src
Then, press =C-c C-c= (=org-babel-execute-src-block=) to obtain the result below the prompt.
** Embark integration
The kagi.el package can be integrated with [[https://github.com/oantolin/embark][Embark]]. Use it to easily summarize, translate or proofread a buffer, region or a URL. It can also be used to call your custom prompts with =define-kagi-fastgpt-prompt=.