mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Merge pull request #2255 from BerriAI/litellm_admin_ui_user_panel_load_time_high
[FEAT] proxy add pagination on /user/info endpoint (Admin UI does not load all users)
This commit is contained in:
commit
e044d6332f
4 changed files with 91 additions and 8 deletions
|
@ -641,6 +641,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
|
||||
|
@ -776,7 +780,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