3.7 KiB
Optional summaries and questions
searchi's search runs locally with Google EmbeddingGemma 2. You can optionally connect an OpenAI-compatible text-generation endpoint to summarize a selected document passage or ask a question about it. This does not change the search model or require an AI service for ordinary searches.
Connect your preferred endpoint
In desktop settings, open Optional AI answers, enable summaries and
questions, and enter your endpoint's API base URL, model name and API key if
required. A local server might use
http://127.0.0.1:1234/v1; use the exact URL and model supplied by your provider.
searchi appends /chat/completions to that base URL.
Configuration and the key are kept for the current app session only. They are not saved to the search index, settings file or performance reports. Re-enter them after restarting the app. There is no default cloud provider.
Choose what to send
Select a document result with a page, paragraph or text-line source. Open the Summarize or ask panel and inspect the prepared excerpt. Choose Summarize this passage, or enter a question and choose Ask. Only that explicit action makes a request; normal searches and selecting a result do not contact the endpoint.
The request contains the displayed excerpt, your question if present, a generic source label and its page/paragraph/line location. searchi does not attach the file, send its filename or path, or upload the whole folder. Anything you type into the question is sent as entered. A hosted endpoint receives this content; a local endpoint keeps it on your machine according to that server's setup.
The excerpt is bounded and can be the beginning of the selected indexed source, rather than the exact small search snippet. Read it before sending. Changed or deleted source files require reindexing and selecting a current result.
Answers are labeled as model-generated drafts, with source IDs. Read the source before relying on an answer: citation checks establish which excerpt was cited, not whether every generated claim is correct. Image/audio/video summaries, whole-document answers, multiple-result context and conversation history are not included in this initial integration.
Compatible API contract
The adapter sends a non-streaming POST /chat/completions request with model
and messages. Authentication, when configured, uses a Bearer header. The
model is instructed to return JSON containing answer and citations inside
choices[0].message.content. The endpoint must support this shape and the
chosen model must follow that instruction. Unknown source citations and invalid
responses produce an error; search remains available.
When an endpoint provides choices[0].finish_reason, it must be stop.
Truncated (length), filtered, tool-directed and unknown completion reasons
are rejected even if the returned text happens to parse as valid cited JSON.
Compatible local servers may omit this field. Nine local HTTP adapter tests
passed on 2026-10-13, including explicit completion reasons, citation validation,
credential handling, response limits and timeouts; strict Clippy passed.
This does not validate any hosted provider or generated answer accuracy.
Requests use timeouts and size limits. Redirects and ambient proxies are disabled to keep the configured destination explicit. Endpoint URLs must use HTTP or HTTPS and must not contain embedded credentials, query strings or fragments. No live hosted provider has been validated by the local fixture tests; provider compatibility and answer quality remain release checks.
For the underlying format, see the OpenAI Chat Completions reference.