🐛 fix: unable to submit creating azure speech

This commit is contained in:
Martial BE 2024-04-24 02:57:47 +08:00
parent 628df97f96
commit 9c8943eea3
No known key found for this signature in database
GPG Key ID: D06C32DF0EDB9084

View File

@ -50,7 +50,7 @@ const validationSchema = Yup.object().shape({
models: Yup.array().min(1, '模型 不能为空'),
groups: Yup.array().min(1, '用户组 不能为空'),
base_url: Yup.string().when('type', {
is: (value) => [3, 24, 8].includes(value),
is: (value) => [3, 8].includes(value),
then: Yup.string().required('渠道API地址 不能为空'), // base_url 是必需的
otherwise: Yup.string() // 在其他情况下base_url 可以是任意字符串
}),