mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
feat(lens): take an index cursor on the reviews endpoint
This commit is contained in:
parent
8ffe1222e0
commit
ccc7a1b2ac
1 changed files with 3 additions and 5 deletions
|
|
@ -34,7 +34,7 @@ from litellm.proxy.lens.models import (
|
|||
ModelResult,
|
||||
Progress,
|
||||
Result,
|
||||
Review,
|
||||
ReviewPage,
|
||||
RunRequest,
|
||||
Sample,
|
||||
Scope,
|
||||
|
|
@ -353,10 +353,8 @@ async def read_run(lens_id: str, job_id: str, auth: Auth) -> Job:
|
|||
return job
|
||||
|
||||
|
||||
@router.get("/{lens_id}/runs/{job_id}/reviews", response_model=tuple[Review, ...])
|
||||
async def read_reviews(
|
||||
lens_id: str, job_id: str, auth: Auth, after: Annotated[AwareDatetime | None, Query()] = None
|
||||
) -> tuple[Review, ...]:
|
||||
@router.get("/{lens_id}/runs/{job_id}/reviews", response_model=ReviewPage)
|
||||
async def read_reviews(lens_id: str, job_id: str, auth: Auth, after: int = Query(default=0, ge=0)) -> ReviewPage:
|
||||
return reviews_after(await read_run(lens_id, job_id, auth), after)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue