Skip to content

API Reference

Rendered from the package's Google-style docstrings by mkdocstrings — docstring presence and format are machine-enforced (ruff pydocstyle, google convention), so these pages are generated from the same text a reader sees in the source.

One page per package:

  • Configuration & logging — config, logging_setup, tokens
  • Model clients — the llama.cpp / infinity clients (chat, embeddings, rerank), the streaming <think> splitter, and the factory
  • Ingestion — discovery, parsers (text, PDF/OCR, office, web, image — over a shared Docling core), the loader
  • Chunking — strategy registry + the five strategies (recursive_character, token_based, markdown_aware, docling_hybrid, semantic)
  • Contextual Retrieval — situate_context()
  • Stores — ChunkRecord, pgvector, Elasticsearch BM25, conversation persistence, app settings, the migration runner
  • Backups — the backup bundle (manifest, all-or-nothing writer, listing and verdicts), and the export and restore of both corpora
  • Retrieval — semantic / bm25 / hybrid + fusion, and the reranked composition over them
  • Chat engines — the PreparedQuery two-string split, the registry, and the simple / condense_context engines
  • GraphRAG — the message-source family (iMessage chat.db), the GraphEngine seam, message rendering, and the ADR-017 bake-off adapters
  • Generation — context prompt & grounded answers
  • Orchestration — the Prefect flows
  • HTTP API — the FastAPI service: SSE chat, conversations, settings, documents/corpus, ingest, backups, health
  • Page preview — evidence-panel page previews: locate (trigram scoring + pdfium rects), render, source resolution, PPTX conversion
  • Observability — the Prometheus metric catalog and its recording helpers
  • Evaluation — golden set, metrics, OCR benchmark, testcontainers
  • CLI & debug output — subcommands and the v_<name> renderers