from fastapi import APIRouter, HTTPException from app.services.batch import get_batch router = APIRouter() @router.get("/results/{batch_id}") async def get_results(batch_id: str): batch = get_batch(batch_id) if batch is None: raise HTTPException(404, "Batch not found") return batch.to_dict()