fix: backend edit format
This commit is contained in:
@@ -114,7 +114,7 @@ export const backendFields = [
|
||||
'health_check_path',
|
||||
'default_run_command',
|
||||
'version_configs',
|
||||
'default_backend_parameters'
|
||||
'default_backend_param'
|
||||
];
|
||||
export const frameworks = [
|
||||
{
|
||||
@@ -148,6 +148,8 @@ backend_name: SGLang
|
||||
description: SGLang backend
|
||||
default_version: v0.5.1
|
||||
health_check_path: /health
|
||||
default_backend_param:
|
||||
- --host
|
||||
default_run_command: run sglang
|
||||
version_configs:
|
||||
v0.0.1:
|
||||
@@ -158,6 +160,4 @@ version_configs:
|
||||
image_name: lm/sglang
|
||||
run_command:
|
||||
custom_framework:
|
||||
default_backend_parameters:
|
||||
- --host
|
||||
`;
|
||||
|
||||
@@ -14,6 +14,17 @@
|
||||
"type": "string",
|
||||
"description": "default backend version"
|
||||
},
|
||||
"is_built_in": {
|
||||
"type": "boolean",
|
||||
"description": "is built-in backend"
|
||||
},
|
||||
"default_backend_param": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "default backend parameter"
|
||||
},
|
||||
"default_run_command": {
|
||||
"type": ["string", "null"],
|
||||
"description": "default start command"
|
||||
@@ -48,12 +59,51 @@
|
||||
"additionalProperties": false,
|
||||
"description": "multiple backend versions"
|
||||
},
|
||||
"default_backend_parameters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
"built_in_version_configs": {
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^[a-zA-Z0-9._-]+$": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"image_name": {
|
||||
"type": "string",
|
||||
"description": "image name"
|
||||
},
|
||||
"run_command": {
|
||||
"type": ["string", "null"],
|
||||
"description": "start command"
|
||||
},
|
||||
"custom_framework": {
|
||||
"type": ["string", "null"],
|
||||
"description": "custom framework"
|
||||
},
|
||||
"built_in_frameworks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "built-in frameworks"
|
||||
}
|
||||
},
|
||||
"required": ["image_name", "run_command"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"description": "default backend parameters"
|
||||
"additionalProperties": false,
|
||||
"description": "multiple backend versions"
|
||||
},
|
||||
"framework_index_map": {
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^[a-zA-Z0-9._-]+$": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"description": "framework to version mapping"
|
||||
}
|
||||
},
|
||||
"required": ["backend_name", "default_version", "version_configs"],
|
||||
|
||||
@@ -5,6 +5,13 @@
|
||||
"type": ["string", "null"],
|
||||
"description": "backend description"
|
||||
},
|
||||
"default_backend_param": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "default backend parameter"
|
||||
},
|
||||
"default_run_command": {
|
||||
"type": ["string", "null"],
|
||||
"description": "default start command"
|
||||
@@ -38,13 +45,6 @@
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"description": "multiple backend versions"
|
||||
},
|
||||
"default_backend_parameters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "default backend parameters"
|
||||
}
|
||||
},
|
||||
"required": ["version_configs"],
|
||||
|
||||
@@ -9,6 +9,13 @@
|
||||
"type": "string",
|
||||
"description": "default backend version"
|
||||
},
|
||||
"default_backend_param": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "default backend parameter"
|
||||
},
|
||||
"default_run_command": {
|
||||
"type": ["string", "null"],
|
||||
"description": "default start command"
|
||||
@@ -42,13 +49,6 @@
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"description": "multiple backend versions"
|
||||
},
|
||||
"default_backend_parameters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "default backend parameters"
|
||||
}
|
||||
},
|
||||
"required": ["default_version", "version_configs"],
|
||||
|
||||
@@ -2,7 +2,7 @@ export interface VersionConfigs {
|
||||
image_name: string;
|
||||
run_command: string;
|
||||
is_default: boolean;
|
||||
build_in_frameworks?: string[];
|
||||
built_in_frameworks?: string[];
|
||||
custom_framework?: string;
|
||||
version_no?: string;
|
||||
is_built_in?: boolean;
|
||||
@@ -29,6 +29,6 @@ export interface ListItem extends FormData {
|
||||
is_built_in?: boolean;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
build_in_version_configs?: Record<string, VersionConfigs>;
|
||||
built_in_version_configs?: Record<string, VersionConfigs>;
|
||||
framework_index_map?: Record<string, string[]>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user