mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
use litellm mapping
This commit is contained in:
parent
b361329e07
commit
747894864c
1 changed files with 22 additions and 0 deletions
|
@ -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, EndpointType> = {
|
||||||
|
[ModelMode.IMAGE_GENERATION]: EndpointType.IMAGE,
|
||||||
|
[ModelMode.CHAT]: EndpointType.CHAT,
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue