Files
2025-11-11 11:47:15 +01:00

41 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RAG Crawler Vollversion (freundlich & getrennt vom RAG-Speicher)
Dieser Crawler läuft **separat** vom RAG/Memory-Stack. Er:
- respektiert `robots.txt`
- nutzt zufällige Delays (min/max), per-Domain-Quoten & Limitierung der Parallelität
- unterstützt zwei Modi: `update` (normal) und `drip` (sehr langsam/menschlich)
- speichert Texte/PDFs im Dateisystem (Corpus), optional „drippt“ er nur wenige Seiten je Lauf
- hat einen separaten **Ingest** nach deiner Memory-API (`/store`), kompatibel zu deiner `memory-api`
## Schnellstart
```bash
# 1) installieren
bash recipes/services/rag-crawler/install.sh
# 2) Quellen bearbeiten
nano /srv/ai/rag-crawler/crawler/sources.yml
# 3) Crawl (vollständig/regelmäßig)
source /srv/ai/rag-crawler/venv/bin/activate
python3 /srv/ai/rag-crawler/crawler/main.py --mode=update
# 4) „Drip“-Modus (z.B. stündlich je Domain nur 1 URL)
python3 /srv/ai/rag-crawler/crawler/main.py --mode=drip --budget 1
# 5) Ingest aller neuen/aktualisierten Texte in die Memory-API
python3 /srv/ai/rag-crawler/crawler/ingest.py --root /srv/ai/corpus --memory http://127.0.0.1:8085
```
## Scheduling (Beispiele)
- Crontab:
`@hourly source /srv/ai/rag-crawler/venv/bin/activate && python3 /srv/ai/rag-crawler/crawler/main.py --mode=drip --budget 1`
`*/10 * * * * source /srv/ai/rag-crawler/venv/bin/activate && python3 /srv/ai/rag-crawler/crawler/ingest.py --root /srv/ai/corpus --memory http://127.0.0.1:8085`
- systemd Timer (optional): siehe `EXTRAS.md`
## Ordner
- `/srv/ai/rag-crawler` Crawler + venv
- `/srv/ai/corpus` Rohdaten (Text/PDF) + `.crawler_state.json`
## Hinweis
- **Keine ENV notwendig** alle Werte werden interaktiv abgefragt oder in `sources.yml` gepflegt.