Various fixes in the README
This commit is contained in:
parent
64e2779335
commit
e1f2f6fcc8
25
README.org
25
README.org
|
@ -48,7 +48,7 @@ Note that texts submitted to Kagi are subject to their [[https://kagi.com/privac
|
|||
|
||||
* Installation and configuration
|
||||
|
||||
kagi.el is available on [[https://melpa.org/#/kagi][MELPA]].
|
||||
kagi.el is available on [[https://melpa.org/#/kagi][MELPA]] and [[https://stable.melpa.org/#/kagi][MELPA Stable]].
|
||||
|
||||
To install from Git, clone with:
|
||||
|
||||
|
@ -66,7 +66,7 @@ You may want to load and configure the package with ~use-package~, for example p
|
|||
;; or use a function, e.g. with the password-store package:
|
||||
(kagi-api-token (lambda () (password-store-get "Kagi/API")))
|
||||
|
||||
;; Univernal Summarizer settings
|
||||
;; Universal Summarizer settings
|
||||
(kagi-summarizer-engine "cecil")
|
||||
(kagi-summarizer-default-language "EN")
|
||||
(kagi-summarizer-cache t)
|
||||
|
@ -79,12 +79,12 @@ You may want to load and configure the package with ~use-package~, for example p
|
|||
(kagi-bold ((t (:inherit modus-themes-bold)))))
|
||||
#+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. with the combination of [[https://passwordstore.org/][pass(1)]] and the password-store package that comes with it).
|
||||
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. with the combination of [[https://passwordstore.org/][pass(1)]] and the /password-store/ package that comes with it).
|
||||
|
||||
** Kagi API setup
|
||||
|
||||
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. Check the pricing for the [[https://help.kagi.com/kagi/api/fastgpt.html#pricing][FastGPT API]] and the [[https://help.kagi.com/kagi/api/summarizer.html#pricing][Summarizer API]] for for the actual costs.
|
||||
3. In [[https://kagi.com/settings?p=api][the API portal]], create an API token. Put the result in ~kagi-api-token~ (or write a function to access it securely).
|
||||
|
||||
** Configuration settings
|
||||
|
@ -114,7 +114,7 @@ The token can be supplied directly as a string, but you could write a lambda to
|
|||
|----------------------------------------+---------------------------------------------------------|
|
||||
| kagi-api-token | The Kagi API token. |
|
||||
| kagi-fastgpt-api-url | The Kagi FastGPT API entry point. |
|
||||
| kagi-stubbed-responses | Whether the package should return a stubbed response. |
|
||||
| kagi-fastgpt-prompts | Prompts to choose for a buffer, text or region. |
|
||||
| kagi-summarizer-api-url | The Kagi Summarizer API entry point. |
|
||||
| kagi-summarizer-cache | Determines whether the Summarizer should cache results. |
|
||||
| kagi-summarizer-default-language | Default target language of the summary. |
|
||||
|
@ -129,20 +129,7 @@ The code to generate the table of configuration items was inspired by an idea of
|
|||
|
||||
The =kagi-summarize= function allows you to summarize texts or URLs from Emacs Lisp.
|
||||
|
||||
By overriding a variable with a =let= construct you can (temporarily) deviate from the default / configured value. A few examples are shown below:
|
||||
|
||||
*** Language override
|
||||
|
||||
To obtain a Dutch summary of a video you may want to define the following function:
|
||||
|
||||
#+begin_src elisp
|
||||
(defun my/kagi/dutch-summary (text-or-url)
|
||||
"Obtain a Dutch summary for the given TEXT-OR-URL."
|
||||
(let ((kagi-summarize-default-language "NL"))
|
||||
(kagi-summarize text-or-url)))
|
||||
#+end_src
|
||||
|
||||
Note that, when you invoke the summarizer functionality interactively, you can also temporarily choose a different target language with the universal prefix (=C-u=) on one of the =kagi-summarize-*= commands.
|
||||
By overriding a variable with a =let= construct you can (temporarily) deviate from the default / configured value. An example is shown below:
|
||||
|
||||
*** Caching override
|
||||
|
||||
|
|
Loading…
Reference in a new issue