Commit Graph

4 Commits

Author SHA1 Message Date
jasonwitty ce02bebf7b [doc] ai_summary: say what the summary is for in the introduction
The introduction described the mechanism before the purpose.  It now
states what the plugin does, that it is meant for a local LLM server
speaking the OpenAI chat completions API, and -- the part that was
missing -- that the summary exists to condense the results the query
actually returned rather than to recite training data.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 16:31:01 -07:00
jasonwitty 6b50b23467 [fix] doc: drop the contents:: directive, name the plugin consistently
Furo renders its own page-local table of contents and reports an error
when a page adds one with contents::.  No other page in the tree uses
that directive; these two now follow suit.

The plugin is named "AI Summary" where the name of the plugin is meant,
and "AI summary" where the generated text itself is meant.  That also
fixes the entry in the plugin navigation, which takes its label from the
page title.

Two references to the configuration page rendered as its title, the bare
YAML key "ai_summary:", which reads as a typo in a sentence.  They now
carry explicit link text.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 16:17:53 -07:00
jasonwitty b6eed9a993 [doc] ai_summary: rewrite for readers new to the feature
The documentation was written from the perspective of someone who had
just implemented the plugin: it opened with SSRF caveats and settings
keys, and explained decisions rather than usage.

The admin page now starts from what the feature is, followed by a
four-step quickstart (install Ollama, pull a model, configure, restart)
and a troubleshooting section for the failures that actually occur.  The
quickstart repeats the default plugins because a plugins: block replaces
that list instead of merging into it -- following the short version of
the instructions would otherwise switch every other plugin off.

The developer page gains a rendered data flow diagram.  The two-request
design -- placeholder first, streamed answer second -- is the part of
this plugin that is hard to convey in prose, and the SSE to NDJSON
change is easier to see than to read about.

The module docstring now describes the module and links to both pages,
instead of restating administration guidance.

Add Jason Witty to AUTHORS.rst.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 12:30:53 -07:00
jasonwitty b47fd08cb7 [feat] plugin: AI summary of search results via local Ollama server
Add an optional, disabled-by-default plugin that shows an AI generated
summary at the top of the result page, generated by a (local) Ollama
server:

- async: the result page is never delayed; a client plugin streams the
  answer (NDJSON over a new /ai_summary endpoint) into a placeholder
  answer with a typing indicator, collapsed behind a More button, with
  an inline follow-up chat
- trigger: first page of general searches only, skipped when an infobox
  or instant answer already answers the query
- grounding (per-user preference): send the top result snippets as
  context, the model answers from them instead of its own knowledge
- configuration: new AI Summary preferences tab (server URL, model,
  grounding) with instance defaults in a new ai_summary: settings
  section; all three preferences can be locked for public instances

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 10:47:18 -07:00