fix: When switching application models, the model parameters should be set to the default values of the current model (#2826)

This commit is contained in:
shaohuzhang1 2025-04-08 16:43:22 +08:00 committed by GitHub
parent 7a3a975645
commit 43702e42b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,6 +97,7 @@ const props = defineProps<{
const emit = defineEmits(['update:modelValue', 'change', 'submitModel'])
const modelValue = computed({
set: (item) => {
emit('change', item)
emit('update:modelValue', item)
},
get: () => {
@ -127,7 +128,6 @@ const openCreateModel = (provider?: Provider, model_type?: string) => {
if (provider && provider.provider) {
createModelRef.value?.open(provider, model_type)
} else {
console.log(model_type)
selectProviderRef.value?.open(model_type)
}
}