diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index d65482b8f..a05b3848e 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -786,7 +786,9 @@ export const adminTopKeysCall = async (accessToken: String) => { export const adminTopEndUsersCall = async ( accessToken: String, - keyToken: String | null + keyToken: String | null, + startTime: String | undefined, + endTime: String | undefined ) => { try { let url = proxyBaseUrl @@ -796,7 +798,10 @@ export const adminTopEndUsersCall = async ( let body = ""; if (keyToken) { body = JSON.stringify({ api_key: keyToken }); + } else { + body = JSON.stringify({ startTime: startTime, endTime: endTime }); } + //message.info("Making top end users request"); // Define requestOptions with body as an optional property @@ -815,9 +820,7 @@ export const adminTopEndUsersCall = async ( }, }; - if (keyToken) { - requestOptions.body = JSON.stringify({ api_key: keyToken }); - } + requestOptions.body = body; const response = await fetch(url, requestOptions); if (!response.ok) {