fix: model source error in catalog

This commit is contained in:
jialin
2025-11-17 15:24:22 +08:00
parent d1c3edfd9b
commit 906f59a566
6 changed files with 85 additions and 303 deletions
+6 -6
View File
@@ -7,17 +7,17 @@ export const modalConfig: Record<
string,
{ show: boolean; width: string | number; source: any; isGGUF?: boolean }
> = {
huggingface: {
[modelSourceMap.huggingface_value]: {
show: true,
width: 'calc(100vw - 220px)',
source: modelSourceMap.huggingface_value
},
modelscope: {
[modelSourceMap.modelscope_value]: {
show: true,
width: 'calc(100vw - 220px)',
source: modelSourceMap.modelscope_value
},
local_path: {
[modelSourceMap.local_path_value]: {
show: true,
width: 600,
source: modelSourceMap.local_path_value
@@ -105,21 +105,21 @@ export const onLineSourceOptions = [
label: 'Hugging Face',
locale: false,
value: modelSourceMap.huggingface_value,
key: 'huggingface',
key: modelSourceMap.huggingface_value,
icon: icons.HF
},
{
label: 'ModelScope',
locale: false,
value: modelSourceMap.modelscope_value,
key: 'modelscope',
key: modelSourceMap.modelscope_value,
icon: icons.ModelScope
},
{
label: 'models.form.localPath',
locale: true,
value: modelSourceMap.local_path_value,
key: 'local_path',
key: modelSourceMap.local_path_value,
icon: icons.LocalPath
}
];
+2 -2
View File
@@ -32,8 +32,8 @@ interface CatalogFormContextProps {
quantizationOptions: Global.BaseOption<string>[];
modeList: Global.BaseOption<string, { isBuiltIn: boolean; tips: string }>[];
onModeChange: (val: string) => void;
onSizeChange: (val: number) => void;
onQuantizationChange: (val: string) => void;
onSizeChange?: (val: number) => void;
onQuantizationChange?: (val: string) => void;
}
interface FormOuterContextProps {