Update the README with the Universal Summarizer
This commit is contained in:
parent
b6b1164b26
commit
1fa0b05748
1 changed files with 32 additions and 7 deletions
39
README.org
39
README.org
|
@ -3,16 +3,28 @@
|
||||||
|
|
||||||
* Introduction
|
* Introduction
|
||||||
|
|
||||||
This package provides a shell to submit prompts to FastGPT, inspired by [[https://github.com/xenodium/chatgpt-shell][xenodium's chatgpt-shell]].
|
This Emacs package provides the following functionalities from the Kagi search engine:
|
||||||
|
|
||||||
Kagi is a relatively new ad-free search engine, offering additional services such as the [[https://kagi.com/summarizer][Universal Summarizer]] or more notably [[https://kagi.com/fastgpt][FastGPT]], their open source LLM offering. Some functionality is provided through an API.
|
- FastGPT :: Kagi's open source LLM offering, as a shell inspired by [[https://github.com/xenodium/chatgpt-shell][xenodium's chatgpt-shell]].
|
||||||
|
- Universal Summarizer :: Summarizes texts, webpages, videos and more.
|
||||||
|
|
||||||
* Usage
|
* Setup
|
||||||
|
|
||||||
1. Make a Kagi account if you haven't done so already. An account is free, and comes with 100 trial searches.
|
1. Create a Kagi account if you haven't done so already. An account is free, and comes with 100 trial searches.
|
||||||
2. In [[https://kagi.com/settings?p=billing_api][your account settings]], put a balance for the API part (note that this is a separate balance than the subscription). The recommendation is to start with a one-time charge of $5. A single query ranges from 1 to 5 cents typically, depending on the amount of tokens processed.
|
2. In [[https://kagi.com/settings?p=billing_api][your account settings]], put a balance for the API part (note that this is a separate balance than the subscription). The recommendation is to start with a one-time charge of $5. A single query ranges from 1 to 5 cents typically, depending on the amount of tokens processed.
|
||||||
3. In [[https://kagi.com/settings?p=api][the API portal]], create an API token. Put the result in ~kagi-api-token~.
|
3. In [[https://kagi.com/settings?p=api][the API portal]], create an API token. Put the result in ~kagi-api-token~.
|
||||||
4. You're good to go: run the command ~kagi-fastgpt-shell~ and start prompting.
|
|
||||||
|
* Commands
|
||||||
|
|
||||||
|
** FastGPT
|
||||||
|
|
||||||
|
The FastGPT functionality has only one command: =kagi-fastgpt-shell=. This opens a shell buffer in a new window where prompts can be typed.
|
||||||
|
|
||||||
|
** Universal Summarizer
|
||||||
|
|
||||||
|
- =kagi-summarize-buffer= :: Summarizes the content of a buffer and displays it in a separate buffer.
|
||||||
|
- =kagi-summarize-region= :: Similarly, the text inside the region is summarized and shown in a separate buffer.
|
||||||
|
- =kagi-summarize-url= :: Prompts for a URL of which a summary is composed and displayed.
|
||||||
|
|
||||||
* Installation and configuration
|
* Installation and configuration
|
||||||
|
|
||||||
|
@ -28,13 +40,26 @@ You way want to load and configure the package with ~use-package~, for example p
|
||||||
|
|
||||||
#+begin_src elisp
|
#+begin_src elisp
|
||||||
(use-package kagi
|
(use-package kagi
|
||||||
:commands kagi-fastgpt-shell
|
:commands
|
||||||
|
kagi-fastgpt-shell
|
||||||
|
kagi-summarize-buffer
|
||||||
|
kagi-summarize-region
|
||||||
|
kagi-summarize-url
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:load-path "/path/to/kagi.el"
|
:load-path "/path/to/kagi.el"
|
||||||
:custom
|
:custom
|
||||||
(kagi-api-token "ABCDEF")
|
(kagi-api-token "ABCDEF")
|
||||||
;; or use a function, e.g. with the password-store package:
|
;; or use a function, e.g. with the password-store package:
|
||||||
(kagi-api-token (lambda () (password-store-get "Kagi/API"))))
|
(kagi-api-token (lambda () (password-store-get "Kagi/API")))
|
||||||
|
|
||||||
|
;; summarizer settings
|
||||||
|
(kagi-api-summarizer-engine "cecil")
|
||||||
|
(kagi-api-summarize-default-language "EN"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
The token can be supplied directly as a string, but you could write a lambda to retrieve the token from a more secure location (e.g. [[https://passwordstore.org/][pass(1)]]).
|
The token can be supplied directly as a string, but you could write a lambda to retrieve the token from a more secure location (e.g. [[https://passwordstore.org/][pass(1)]]).
|
||||||
|
|
||||||
|
* References
|
||||||
|
|
||||||
|
- [[https://help.kagi.com/kagi/api/fastgpt.html][FastGPT API]]
|
||||||
|
- [[https://help.kagi.com/kagi/api/summarizer.html][Kagi Universal Summarizer API]]
|
||||||
|
|
Loading…
Reference in a new issue