feat: persist single evaluation history
This commit is contained in:
@@ -1554,6 +1554,27 @@ def create_app(state: AgentState) -> FastAPI:
|
||||
except EvaluationError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
|
||||
@app.get('/api/evaluations/analyses')
|
||||
async def list_evaluation_analyses(
|
||||
account_id: str,
|
||||
) -> list[dict[str, Any]]:
|
||||
return state.evaluation_runtime.list_single_analyses(
|
||||
_safe_account_id(account_id)
|
||||
)
|
||||
|
||||
@app.get('/api/evaluations/analyses/{analysis_id}')
|
||||
async def get_evaluation_analysis(
|
||||
analysis_id: str,
|
||||
account_id: str,
|
||||
) -> dict[str, Any]:
|
||||
try:
|
||||
return state.evaluation_runtime.get_single_analysis(
|
||||
analysis_id,
|
||||
_safe_account_id(account_id),
|
||||
)
|
||||
except EvaluationError as exc:
|
||||
raise HTTPException(status_code=404, detail=str(exc)) from exc
|
||||
|
||||
@app.get('/api/evaluations/datasets')
|
||||
async def list_evaluation_datasets(account_id: str) -> list[dict[str, Any]]:
|
||||
return state.evaluation_runtime.list_datasets(_safe_account_id(account_id))
|
||||
|
||||
Reference in New Issue
Block a user