Compare commits

...

8 Commits

Author SHA1 Message Date
TySS-Dev be3caee615 Merge pull request 'Updated README' (#2) from main into testing
Reviewed-on: #2
2026-05-17 20:55:00 -04:00
TySS-Dev eeac7fcd88 Added more known issues 2026-05-17 20:13:19 -04:00
TySS-Dev 1c3824b7a4 Fixed typo 2026-05-17 20:01:43 -04:00
TySS-Dev a7c031d27b Fixed check boxes 2026-05-17 20:00:56 -04:00
TySS-Dev 5e2b2a246f Added known issues and roadmap 2026-05-17 19:59:55 -04:00
TySS-Dev ffad0de8ae Fixed flow diagram 2026-05-17 19:51:19 -04:00
TySS-Dev 3dffeb384b Fixed a typo in README 2026-05-17 19:46:04 -04:00
TySS-Dev 85d1481bd9 Updated README 2026-05-17 19:45:37 -04:00
+43 -25
View File
@@ -10,44 +10,50 @@
A SearXNG plugin that generates local AI overviews powered by Ollama, using search results as RAG context.
Features:
- Token-by-token UI streaming
- Clickable inline citations
- Interactive mode: continue summary, ask follow-ups, copy, or regenerate
- Simple response mode with no extras
- Internally called low-latency RAG for follow-ups (bypasses HTTP loopback)
- Native network integration via `searx.network` (respects proxy/SSL settings)
- Stateless conversation persistence/shareability via URL hash
- Model selector in the AI overview widget
- Does not slow down result loading
- One file install
- Real-time streaming via Valkey — responses stream token by token using a background thread + Valkey job queue, working around granian's broken generator support for true streaming feel
- TF-IDF result reranking — fetched page content is scored against the query using BM25-style TF-IDF before being sent to Ollama, surfacing the most relevant sources first
- Smart chunking — pages are split into 512-token overlapping segments and the highest-scoring chunk per page is selected for context
- Intent detection — queries are automatically classified into 8 intent types (factual, howto, technical, comparison, opinion, current, local, general) with tailored system prompts per type
- Conversation memory — 30-minute cross-search conversation history stored in Valkey, so follow-up questions work even after navigating to a new search
- Markdown rendering — AI responses render bold, italic, lists, headers, and inline code natively in the result box
- Intent emoji badge — a small emoji appears next to "AI Overview" indicating the detected query type
## Features:
- Inline numbered citations
- Interactive mode - Continue summary, ask follow-ups, copy, or regenerate
- Overview of ranked results with prompts based on detected query intent:
- `How To` `Technical` `Factual` `Comparison` `Opinion` `Current` `Local` `Geneal`
- Internally called RAG for follow-ups
- Native network integration via `searx.network`
- Stateless conversation presistence/shareability via URL hash
- Ollama model selector
- Feeds fetched results to Ollama without slowing down SearXNG results
- Real-time streaming via Valkey (No waiting for a completed response)
- TF-IDF result ranking before being sent to Ollama
- Smart chunking - Pages are split into 512-token segments and highest-scoring chunk per page used for context
- Conversation memory - 30-minute cross-search conversation history via Valkey for follow-up questions
- Markdown support
- Intent emoji badge showing what intent prompt was used
## Install
1. Download the plugin:
### Main repo (Gitea)
```bash
curl -o ollama_answers.py https://raw.githubusercontent.com/TySP-Dev/ollama-ai-answers-searxng/master/ollama_answers.py
curl -o ollama_answers.py https://git.tysstech.com/TySS-Dev/ollama-ai-answers-searxng/raw/branch/main/ollama_answers.py
```
2. Copy to your SearXNG plugins directory:
### Mirror repo (Github):
```bash
cp ollama_answers.py ~/searxng/plugins/ollama_answers.py
curl -o ollama_answers.py https://raw.githubusercontent.com/TySP-Dev/ollama-ai-answers-searxng/main/ollama_answers.py
```
3. Add the volume mount to your `docker-compose.yml` under the searxng service:
3. Copy to your SearXNG plugins directory:
```bash
cp ollama_answers.py path_to/searxng/plugins/ollama_answers.py
```
4. Add the volume mount to your `docker-compose.yml` under the searxng service:
```yaml
volumes:
- ./plugins/ollama_answers.py:/usr/local/searxng/searx/plugins/ollama_answers.py:Z
```
4. Add environment variables to `docker-compose.yml`:
5. Add environment variables to `docker-compose.yml`:
```yaml
environment:
- LLM_URL=http://ollama:11434/v1/chat/completions
@@ -55,14 +61,14 @@ Features:
- VALKEY_HOST=searxng-valkey
```
5. Add to `settings.yml` plugins section:
6. Add to `settings.yml` plugins section:
```yaml
plugins:
searx.plugins.ollama_answers.SXNGPlugin:
active: true
```
6. Restart SearXNG:
7. Restart SearXNG:
```bash
docker compose up -d --force-recreate core
```
@@ -96,6 +102,18 @@ Configure via environment variables.
6. Client-side script calls a signed endpoint (`/ai-stream`)
7. Ollama streams a response token-by-token in the UI
## Known Issues
- [ ] When asking a follow up question the previous output disappears
- [ ] Parts of the UI are not theme aware resulting in a unpolished look when not using a dark theme
- [ ] When SearXNG provides a info blob for a search it appears on top of the overview i.e. `Wikipedia` or `Linux`
For any issues not stated here please create an issue ticket on [Gitea](https://git.tysstech.com/TySS-Dev/ollama-ai-answers-searxng/issues) or [GitHub](https://github.com/TySP-Dev/ollama-ai-answers-searxng/issues) and add the `bug` tag.
## Roadmap
- [ ] Working on feature plans
## Architecture
```