mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-28 04:04:31 +00:00
fix adminGlobalActivityExceptions
This commit is contained in:
parent
e981f342bc
commit
d78492b050
2 changed files with 107 additions and 0 deletions
|
@ -49,6 +49,8 @@ import {
|
|||
getCallbacksCall,
|
||||
setCallbacksCall,
|
||||
modelSettingsCall,
|
||||
adminGlobalActivityExceptions,
|
||||
adminGlobalActivityExceptionsPerDeployment,
|
||||
} from "./networking";
|
||||
import { BarChart, AreaChart } from "@tremor/react";
|
||||
import {
|
||||
|
@ -109,6 +111,13 @@ interface RetryPolicyObject {
|
|||
[key: string]: { [retryPolicyKey: string]: number } | undefined;
|
||||
}
|
||||
|
||||
|
||||
interface GlobalExceptionActivityData {
|
||||
sum_num_exceptions: number;
|
||||
daily_data: { date: string; num_exceptions: number; }[];
|
||||
}
|
||||
|
||||
|
||||
//["OpenAI", "Azure OpenAI", "Anthropic", "Gemini (Google AI Studio)", "Amazon Bedrock", "OpenAI-Compatible Endpoints (Groq, Together AI, Mistral AI, etc.)"]
|
||||
|
||||
interface ProviderFields {
|
||||
|
@ -301,6 +310,8 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
|||
useState<RetryPolicyObject | null>(null);
|
||||
const [defaultRetry, setDefaultRetry] = useState<number>(0);
|
||||
|
||||
const [globalExceptionData, setGlobalExceptionData] = useState<GlobalExceptionActivityData[]>([]);
|
||||
|
||||
function formatCreatedAt(createdAt: string | null) {
|
||||
if (createdAt) {
|
||||
const date = new Date(createdAt);
|
||||
|
@ -643,6 +654,13 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
|||
dateValue.to?.toISOString()
|
||||
);
|
||||
|
||||
const dailExceptions = await adminGlobalActivityExceptions(
|
||||
accessToken,
|
||||
dateValue.from?.toISOString(),
|
||||
dateValue.to?.toISOString()
|
||||
);
|
||||
|
||||
|
||||
console.log("slowResponses:", slowResponses);
|
||||
|
||||
setSlowResponsesData(slowResponses);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue