transcription/scripts/README.md
keboss-m eee8f4c8a4 Replace LightRAG with native Python RAG engine + add deploy tooling
- New: src/rag/engine/ — in-process hybrid search (FTS5 BM25 + sqlite-vec + LLM rerank)
- New: src/rag/qmd/ — compatibility layer (qmd_query, qmd_chat, qmd_chat_stream, qmd_index_*)
- New: src/ingest/stub_writer.py — .md stubs for binary files (videos, archives)
- New: scripts/deploy.sh + scripts/pull_models.sh + Makefile + .env.example
- Removed: LightRAG, sentence-transformers embedding via separate package, rag_standalone/
- Removed: @nousresearch/qmd npm dep (package not published); Node.js from Dockerfile
- Updated: tests/ (46 passed), docker-compose, .dockerignore, config.yaml, README

Engine: in-process Python (no daemon, no npm), sentence-transformers 384-dim,
RRF fusion (k=60), BM25 + vector with numpy fallback. WebSocket API unchanged.

Deploy: 'git clone' + 'make init' + 'make pull-models MODELS_SOURCE=...' + 'make up'.
Models (5.83 GB) live outside git; pulled via rsync from dev host.
2026-06-10 14:24:01 +03:00

32 lines
1.1 KiB
Markdown
Raw 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.

# scripts/
Утилиты для миграции и обслуживания.
## migrate_lightrag_to_qmd.py
Переиндексирует существующие ``.md`` (протоколы совещаний, извлечённые из
документов) в qmd-коллекции. Используется при переезде с LightRAG.
```bash
# dry-run: посмотреть, что будет сделано
python scripts/migrate_lightrag_to_qmd.py --org merakom --dry-run
# реальная миграция
python scripts/migrate_lightrag_to_qmd.py --org merakom
```
**Снапшот перед запуском в проде (обязательно):**
```bash
cd transcription
tar -czf ../processed-pre-qmd.tar.gz processed
```
Скрипт идемпотентен: повторный запуск не дублирует данные (qmd content-hash
+ маркер ``.migrated_to_qmd`` в каждой обработанной папке).
## Другие скрипты
Существующие утилиты (`backfill_summaries.py`, `download_models.py` и т.д.)
работают без изменений.