diff --git a/ui/src/views/template/component/CreateModelDialog.vue b/ui/src/views/template/component/CreateModelDialog.vue index a0872cd3e..8f4bf727d 100644 --- a/ui/src/views/template/component/CreateModelDialog.vue +++ b/ui/src/views/template/component/CreateModelDialog.vue @@ -100,7 +100,7 @@ { dialogVisible.value = true } -const list_base_model = (model_type: any) => { - form_data.value.model_name = '' +const list_base_model = (model_type: any, change?: boolean) => { + if (change) { + base_form_data.value.model_name = '' + } if (providerValue.value) { ModelApi.listBaseModel(providerValue.value.provider, model_type, base_model_loading).then( (ok) => { diff --git a/ui/src/views/template/component/EditModel.vue b/ui/src/views/template/component/EditModel.vue index 422eff720..333f8011f 100644 --- a/ui/src/views/template/component/EditModel.vue +++ b/ui/src/views/template/component/EditModel.vue @@ -80,7 +80,7 @@ { }) } } -const list_base_model = (model_type: any) => { +const list_base_model = (model_type: any, change?: boolean) => { + if (change) { + base_form_data.value.model_name = '' + } if (providerValue.value) { ModelApi.listBaseModel(providerValue.value.provider, model_type, base_model_loading).then( (ok) => {