Started with takeaway summary support
This commit is contained in:
parent
58a8560b8c
commit
eb3d486534
1 changed files with 15 additions and 1 deletions
16
kagi.el
16
kagi.el
|
@ -162,6 +162,19 @@ same text will be charged.)"
|
||||||
:type 'boolean
|
:type 'boolean
|
||||||
:group 'kagi)
|
:group 'kagi)
|
||||||
|
|
||||||
|
(defconst kagi--summarizer-summary-formats '((paragraph . "summary")
|
||||||
|
(takeaway . "takeaway"))
|
||||||
|
"Mapping from summary type symbol to the expected API string.")
|
||||||
|
|
||||||
|
(defcustom kagi-summarizer-default-summary-format 'paragraph
|
||||||
|
"The summary format that should be returned.
|
||||||
|
|
||||||
|
Symbol paragraph returns a paragraph of prose. Symbol takeaway
|
||||||
|
returns a bullet list."
|
||||||
|
:type '(choice (const :tag "Paragraph" paragraph)
|
||||||
|
(const :tag "Bullet-list" takeaway))
|
||||||
|
:group 'kagi)
|
||||||
|
|
||||||
(defface kagi-bold '((t :inherit bold))
|
(defface kagi-bold '((t :inherit bold))
|
||||||
"Face for bold parts in the Kagi output."
|
"Face for bold parts in the Kagi output."
|
||||||
:group 'kagi)
|
:group 'kagi)
|
||||||
|
@ -324,7 +337,8 @@ list of conses."
|
||||||
(append items
|
(append items
|
||||||
`(("engine" . ,kagi-summarizer-engine)
|
`(("engine" . ,kagi-summarizer-engine)
|
||||||
("summary_type" . "summary")
|
("summary_type" . "summary")
|
||||||
("cache" . ,kagi-summarizer-cache))
|
("cache" . ,kagi-summarizer-cache)
|
||||||
|
("summary_type" . ,kagi-summarizer-default-summary-format))
|
||||||
|
|
||||||
;; prevent a nil in the result list, causing (json-encode)
|
;; prevent a nil in the result list, causing (json-encode)
|
||||||
;; to generate a wrong request object.
|
;; to generate a wrong request object.
|
||||||
|
|
Loading…
Reference in a new issue