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>
15 lines
385 B
Python
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
|