aucourt-ingest/aucourt_ingest/api/dependencies.py
slothitude 6374aea0a2 Stage 9: add read-only FastAPI query API for juror RAG queries
8 GET endpoints under /api/v1 for health, personas, cases, vector search,
juror context, and hybrid search. Includes QueryService composing SubgraphQuery
+ VectorIndex + GraphDB, Pydantic response models, error handlers, and
`serve` CLI mode via uvicorn. 20 new tests, 190 total, zero regressions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-30 12:08:55 +10:00

15 lines
385 B
Python

"""FastAPI dependency providers."""
from __future__ import annotations
from fastapi import Depends
from aucourt_ingest.api.service import QueryService
_query_service: QueryService | None = None
def get_query_service() -> QueryService:
if _query_service is None:
raise RuntimeError("QueryService not initialised — call create_app() first")
return _query_service