fix: ui conflicts in update of multiple evalute result

This commit is contained in:
jialin
2025-06-09 18:45:47 +08:00
parent f73e29937c
commit 5ef733729b
10 changed files with 128 additions and 82 deletions
+34 -29
View File
@@ -416,35 +416,6 @@ export const setbackendParameters = (data: any) => {
return result;
};
export const getVllmCliArgs = (inputString: string) => {
const arrayOutput = inputString
.split(/\s*\[\s*|\s*\]\s*/g) // Split by '[' or ']', removing extra spaces
.filter((item) => item) // Remove empty items
.map((item) => item.trim()); // Trim spaces around each item
const result = arrayOutput.map((item) => {
const parts = item.split(' ');
const label = parts[0].trim(); // Remove leading dashes
const value = parts[0].trim();
if (parts.length === 1) {
return { label, value, options: [] };
} else if (parts.length > 1) {
const optionPart = parts[1];
if (optionPart.startsWith('{') && optionPart.endsWith('}')) {
const options = optionPart
.slice(1, -1)
.split(',')
.map((opt) => opt.trim());
return { label, value, options };
}
}
return { label, value, options: [] }; // Fallback
});
return result;
};
export const modelLabels = [
{ label: 'Image', value: 'image_only' },
{ label: 'Text-to-speech', value: 'text_to_speech' },
@@ -519,3 +490,37 @@ export const formFields = [
'scheduleType',
'restart_on_error'
];
export const getBackendParamsTips = (backend: string) => {
if (backend === backendOptionsMap.llamaBox) {
return {
backend: 'llama-box',
releases: 'https://github.com/gpustack/llama-box/releases',
link: 'https://github.com/gpustack/llama-box?tab=readme-ov-file#usage',
version: 'v0.0.140'
};
}
if (backend === backendOptionsMap.vllm) {
return {
backend: 'vLLM',
releases: 'https://github.com/vllm-project/vllm/releases',
link: 'https://docs.vllm.ai/en/stable/serving/openai_compatible_server.html#cli-reference',
version: 'v0.8.5'
};
}
if (backend === backendOptionsMap.ascendMindie) {
return {
backend: 'Ascend MindIE',
releases: '',
link: 'http://docs.gpustack.ai/latest/user-guide/inference-backends/#parameters-reference_2',
version: '1.0.0'
};
}
return {
backend: 'vox-box',
releases: 'https://github.com/gpustack/vox-box/releases',
link: '',
version: 'v0.0.13'
};
};
@@ -11,10 +11,6 @@ const options = [
label: '--host',
value: '--host'
},
{
label: '--port',
value: '--port'
},
{
label: '--timeout',
value: '--timeout'