feat: 创建智能体时模型设置必填
parent
18debfb0fe
commit
85b3ce480a
|
|
@ -150,6 +150,17 @@ export default function CapabilitySettings({
|
|||
<Form.Item
|
||||
name="model"
|
||||
label="模型"
|
||||
rules={[
|
||||
{
|
||||
validator: async (_rule, value) => {
|
||||
const selected = parseModelSelections(value);
|
||||
if (selected.length > 0) {
|
||||
return;
|
||||
}
|
||||
throw new Error('请选择至少一个模型');
|
||||
},
|
||||
},
|
||||
]}
|
||||
className="mb-0"
|
||||
getValueProps={(value) => ({ value: parseModelSelections(value) })}
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in New Issue