Move Babel section, add use-package section for it
This commit is contained in:
parent
0f96a54818
commit
2afc2f5b6d
52
README.org
52
README.org
|
@ -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-proofread= :: Proofread a string or buffer.
|
||||||
- =kagi-fastgpt-prompt-definition= :: Returns the definition of a word.
|
- =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
|
** Universal Summarizer
|
||||||
|
|
||||||
- =kagi-summarize-buffer= :: Summarizes the content of a buffer.
|
- =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.
|
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
|
** 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=.
|
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=.
|
||||||
|
|
Loading…
Reference in a new issue