[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>
This commit is contained in:
@@ -25,3 +25,4 @@ Settings
|
||||
settings_outgoing
|
||||
settings_categories_as_tabs
|
||||
settings_plugins
|
||||
settings_ai_summary
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
.. _settings ai_summary:
|
||||
|
||||
===============
|
||||
``ai_summary:``
|
||||
===============
|
||||
|
||||
Default configuration of the :ref:`AI summary plugin <ai_summary plugin>`.
|
||||
Users configure the Ollama server URL and the model in the *AI Summary* tab of
|
||||
their preferences; the values below only act as instance wide defaults.
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
ai_summary:
|
||||
base_url: "http://127.0.0.1:11434"
|
||||
model: "llama3.2:3b"
|
||||
|
||||
.. attention::
|
||||
|
||||
A user configurable server URL allows any user of the instance to make the
|
||||
SearXNG server send requests to a URL of their choice (`SSRF`_), and each
|
||||
summary is real LLM work. This plugin is intended for private instances --
|
||||
on a public instance lock the related preferences (:ref:`settings
|
||||
preferences`):
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
preferences:
|
||||
lock:
|
||||
- ai_summary_server
|
||||
- ai_summary_model
|
||||
- ai_summary_grounding
|
||||
|
||||
.. _SSRF: https://owasp.org/www-community/attacks/Server_Side_Request_Forgery
|
||||
|
||||
.. autoclass:: searx.ai_summary.SettingsAISummary
|
||||
:members:
|
||||
Reference in New Issue
Block a user