mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: add model change handler to update AI mode parameters
This commit is contained in:
parent
2306f90048
commit
8b13174d9c
|
|
@ -54,6 +54,7 @@
|
|||
:options="modelOptions"
|
||||
showFooter
|
||||
:model-type="'LLM'"
|
||||
@change="modelChange"
|
||||
></ModelSelect>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('views.application.form.prompt.label')" prop="prompt">
|
||||
|
|
@ -172,6 +173,14 @@ const openAIParamSettingDialog = () => {
|
|||
}
|
||||
}
|
||||
|
||||
function modelChange() {
|
||||
if (form.value.model_id) {
|
||||
AIModeParamSettingDialogRef.value?.reset_default(form.value.model_id, id)
|
||||
} else {
|
||||
refreshForm({})
|
||||
}
|
||||
}
|
||||
|
||||
function refreshForm(data: any) {
|
||||
form.value.model_params_setting = data
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue