From 747894864c78cc598c9a1ff7b7cd03f09c7b2414 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 3 Apr 2025 20:05:11 -0700 Subject: [PATCH] use litellm mapping --- .../chat_ui/mode_endpoint_mapping.tsx | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ui/litellm-dashboard/src/components/chat_ui/mode_endpoint_mapping.tsx diff --git a/ui/litellm-dashboard/src/components/chat_ui/mode_endpoint_mapping.tsx b/ui/litellm-dashboard/src/components/chat_ui/mode_endpoint_mapping.tsx new file mode 100644 index 00000000000..a86fb4119b8 --- /dev/null +++ b/ui/litellm-dashboard/src/components/chat_ui/mode_endpoint_mapping.tsx @@ -0,0 +1,22 @@ +// litellmMapping.ts + +// Define an enum for the modes as returned in model_info +export enum ModelMode { + IMAGE_GENERATION = "image_generation", + CHAT = "chat", + // add additional modes as needed + } + + // Define an enum for the endpoint types your UI calls + export enum EndpointType { + IMAGE = "image", + CHAT = "chat", + // add additional endpoint types if required + } + + // Create a mapping between the model mode and the corresponding endpoint type + export const litellmModeMapping: Record = { + [ModelMode.IMAGE_GENERATION]: EndpointType.IMAGE, + [ModelMode.CHAT]: EndpointType.CHAT, + }; + \ No newline at end of file