mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(feat) proxy add pagination on /user/info endpoint
This commit is contained in:
parent
7d26eaf481
commit
432ce90a9a
2 changed files with 16 additions and 2 deletions
|
@ -613,6 +613,10 @@ class PrismaClient:
|
|||
query_type: Literal["find_unique", "find_all"] = "find_unique",
|
||||
expires: Optional[datetime] = None,
|
||||
reset_at: Optional[datetime] = None,
|
||||
offset: Optional[int] = None, # pagination, what row number to start from
|
||||
limit: Optional[
|
||||
int
|
||||
] = None, # pagination, number of rows to getch when find_all==True
|
||||
):
|
||||
try:
|
||||
response: Any = None
|
||||
|
@ -748,7 +752,7 @@ class PrismaClient:
|
|||
)
|
||||
else:
|
||||
response = await self.db.litellm_usertable.find_many( # type: ignore
|
||||
order={"spend": "desc"},
|
||||
order={"spend": "desc"}, take=limit, skip=offset
|
||||
)
|
||||
return response
|
||||
elif table_name == "spend":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue