Self-hosted document library manager with BM25 keyword search and RAG chat with page-level citations
- app/services/retriever.py: hybrid BM25 + semantic Retriever with BM25-only fallback when llm=None - app/services/synthesizer.py: LLM answer synthesis with citation assembly over retrieved chunks - app/api/chat.py: POST /api/chat endpoint with 402 gate when PAGEPIPER_OLLAMA_URL is unset - tests/test_synthesizer.py: 3 TDD unit tests (mocked LLM, context building, system prompt) - tests/test_chat_api.py: 2 integration tests (402 without Ollama, 200 with mocked retriever+LLM) |
||
|---|---|---|
| app | ||
| config | ||
| docker/web | ||
| migrations | ||
| scripts | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| compose.override.yml.example | ||
| compose.yml | ||
| Dockerfile | ||
| environment.yml | ||
| manage.sh | ||
| pyproject.toml | ||