15 lines
473 B
Python
15 lines
473 B
Python
"""Protected generation-history inventory."""
|
|
from __future__ import annotations
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from core.database import generation_history_list
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/api/generation-history")
|
|
async def list_generation_history(target_id: str = "", limit: int = 100):
|
|
"""Return bounded generation metadata without prompts, source text or keys."""
|
|
return {"history": generation_history_list(target_id=target_id.strip(), limit=limit)}
|