From 9e1b7fc3abfc45ea717517b3c125a8dac390a721 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 25 Dec 2024 14:13:01 +0800 Subject: [PATCH] fix: model params --- .../application/component/AIModeParamSettingDialog.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/src/views/application/component/AIModeParamSettingDialog.vue b/ui/src/views/application/component/AIModeParamSettingDialog.vue index 470959efa29..32a5c9ac46f 100644 --- a/ui/src/views/application/component/AIModeParamSettingDialog.vue +++ b/ui/src/views/application/component/AIModeParamSettingDialog.vue @@ -65,7 +65,13 @@ const reset_default = (model_id: string, application_id?: string) => { api.then((ok) => { model_form_field.value = ok.data const model_setting_data = ok.data - .map((item) => ({ [item.field]: item.default_value })) + .map((item) => { + if (item.show_default_value === false) { + return { [item.field]: undefined } + } else { + return { [item.field]: item.default_value } + } + }) .reduce((x, y) => ({ ...x, ...y }), {}) emit('refresh', model_setting_data)