Files
research-bridge/README.de.md

4.6 KiB

Research Bridge

SearXNG + Kimi for Coding Research Pipeline. Self-hosted Alternative zu Perplexity mit $0 laufenden Kosten.

Python 3.11+ License: MIT Podman Ready

English Version


🚀 Schnellstart

Mit Podman (Empfohlen)

# Repository klonen
git clone git@gitea.ragtag.rocks:b0rbor4d/research-bridge.git
cd research-bridge

# Alle Services starten
podman-compose up -d

# Health-Check
curl http://localhost:8000/health

Manuelle Einrichtung

# Repository klonen und einrichten
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

# SearXNG starten
docker-compose -f config/searxng-docker-compose.yml up -d

# Konfigurieren
export RESEARCH_BRIDGE_KIMI_API_KEY="sk-kimi-..."

# Starten
python -m src.main

📡 API-Nutzung

Health Check

curl http://localhost:8000/health

Suche (Passthrough)

curl "http://localhost:8000/search?q=python+async+best+practices"

Recherche mit Synthese

curl -X POST http://localhost:8000/research \
  -H "Content-Type: application/json" \
  -d '{
    "query": "neue rust web frameworks 2024",
    "depth": "shallow",
    "max_results": 10
  }'

🏗️ Architektur

┌─────────────────┐     ┌──────────────┐     ┌─────────────────┐
│   Client        │────▶│  FastAPI     │────▶│  SearXNG        │
│   Request       │     │  Research    │     │  (Suche)        │
└─────────────────┘     │  Bridge      │     └─────────────────┘
                        └──────┬───────┘              │
                               │                      │
                               ▼                      │
                        ┌──────────────┐              │
                        │  Kimi for    │◄─────────────┘
                        │  Coding      │   Rohdaten
                        │  Synthese    │
                        └──────┬───────┘
                               │
                               ▼
                        ┌──────────────┐
                        │  Synthetisierte│
                        │  Antwort     │
                        └──────────────┘

🔧 Konfiguration

Umgebungsvariablen:

Variable Beschreibung Standard
RESEARCH_BRIDGE_KIMI_API_KEY Kimi for Coding API-Key -
RESEARCH_BRIDGE_SEARXNG_URL SearXNG Instanz-URL http://searxng:8080
RESEARCH_BRIDGE_RATE_LIMIT_RPM Rate-Limit (Anfragen/Min) 60
RESEARCH_BRIDGE_LOG_LEVEL Log-Level info

📁 Projektstruktur

research-bridge/
├── src/
│   ├── api/           # FastAPI Routen und Middleware
│   ├── search/        # SearXNG Client
│   ├── llm/           # Kimi for Coding Synthese
│   ├── models/        # Pydantic Modelle
│   └── middleware/    # Rate-Limiting, Auth
├── tests/             # Tests (Unit, Integration, E2E)
├── config/            # Docker und Einstellungen
├── docs/              # Dokumentation
├── Containerfile      # Podman/Docker Build
└── podman-compose.yml # Vollständiger Stack

🧪 Tests

# Alle Tests ausführen
pytest

# Mit Coverage
pytest --cov=src --cov-report=html

# Spezifische Test-Kategorien
pytest tests/unit/          # Schnell, gemockt
pytest tests/integration/   # Mit echtem SearXNG
pytest tests/e2e/           # Komplette Pipeline

📚 Dokumentation


🤝 Warum Research Bridge?

Service Kosten pro 1K Anfragen Self-hosted Datenschutz
Perplexity Pro ~$20/Monat
OpenAI GPT-4 ~$10-30
Research Bridge $0

📜 Lizenz

MIT © 2024 Florian Hartmann / Insight-IT GmbH