feat(web): multi_agent type app support collaboration type
This commit is contained in:
@@ -1131,10 +1131,10 @@ export const en = {
|
||||
promptEmpty: 'Describe your use case on the left, and the orchestration preview will be displayed here.',
|
||||
|
||||
master: 'Supervisor Mode',
|
||||
master_agent: 'Supervisor Mode',
|
||||
master_agentDesc: 'Unified scheduling and management by the main Agent, with sub-Agents executing tasks assigned by the supervisor, suitable for scenarios requiring centralized control.',
|
||||
handoffs: 'Collaboration Mode',
|
||||
handoffsDesc: 'Multiple Agents collaborate equally, autonomously coordinating according to task requirements, suitable for complex scenarios requiring flexible interaction.',
|
||||
supervisor: 'Supervisor Mode',
|
||||
supervisorDesc: 'Unified scheduling and management by the main Agent, with sub-Agents executing tasks assigned by the supervisor, suitable for scenarios requiring centralized control.',
|
||||
collaboration: 'Collaboration Mode',
|
||||
collaborationDesc: 'Multiple Agents collaborate equally, autonomously coordinating according to task requirements, suitable for complex scenarios requiring flexible interaction.',
|
||||
masterConfig: 'Supervisor Configuration',
|
||||
orchestrationMode: 'Task Assignment Strategy',
|
||||
conditional: 'Intelligent Assignment',
|
||||
|
||||
@@ -620,10 +620,10 @@ export const zh = {
|
||||
promptEmpty: '在左侧描述您的用例,编排预览将在此处显示。',
|
||||
|
||||
master: '主管模式',
|
||||
master_agent: '主管模式',
|
||||
master_agentDesc: '由主 Agent 统一调度和管理,子 Agent 按照主管分配的任务执行,适合需要集中控制的场景。',
|
||||
handoffs: '协作模式',
|
||||
handoffsDesc: '多个 Agent 平等协作,根据任务需求自主协调配合,适合需要灵活互动的复杂场景。',
|
||||
supervisor: '主管模式',
|
||||
supervisorDesc: '由主 Agent 统一调度和管理,子 Agent 按照主管分配的任务执行,适合需要集中控制的场景。',
|
||||
collaboration: '协作模式',
|
||||
collaborationDesc: '多个 Agent 平等协作,根据任务需求自主协调配合,适合需要灵活互动的复杂场景。',
|
||||
masterConfig: '主管配置',
|
||||
orchestrationMode: '任务分配策略',
|
||||
conditional: '智能分配',
|
||||
|
||||
@@ -42,7 +42,7 @@ const Cluster = forwardRef<ClusterRef>((_props, ref) => {
|
||||
|
||||
const handleSave = (flag = true) => {
|
||||
if (!data) return Promise.resolve()
|
||||
if (!values.default_model_config_id) {
|
||||
if (!values.default_model_config_id && values.orchestration_mode === 'supervisor') {
|
||||
message.warning(t('common.selectPlaceholder', { title: t('application.model') }))
|
||||
return Promise.resolve()
|
||||
}
|
||||
@@ -140,15 +140,14 @@ const Cluster = forwardRef<ClusterRef>((_props, ref) => {
|
||||
<Space size={20} direction="vertical" style={{width: '100%'}}>
|
||||
<Card title={t('application.handoffs')}>
|
||||
<Form.Item
|
||||
name={['execution_config', 'routing_mode']}
|
||||
name="orchestration_mode"
|
||||
noStyle
|
||||
>
|
||||
<RadioGroupCard
|
||||
options={['master_agent', 'handoffs'].map((type) => ({
|
||||
options={['supervisor', 'collaboration'].map((type) => ({
|
||||
value: type,
|
||||
label: t(`application.${type}`),
|
||||
labelDesc: t(`application.${type}Desc`),
|
||||
disabled: type === 'handoffs'
|
||||
}))}
|
||||
allowClear={false}
|
||||
/>
|
||||
@@ -192,7 +191,7 @@ const Cluster = forwardRef<ClusterRef>((_props, ref) => {
|
||||
))}
|
||||
</Card>
|
||||
|
||||
<Card title={t('application.masterConfig')}>
|
||||
{values?.orchestration_mode !== 'collaboration' && <Card title={t('application.masterConfig')}>
|
||||
<Form.Item
|
||||
label={t('application.model')}
|
||||
required={true}
|
||||
@@ -218,11 +217,11 @@ const Cluster = forwardRef<ClusterRef>((_props, ref) => {
|
||||
</Row>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="orchestration_mode"
|
||||
name={['execution_config',"sub_agent_execution_mode"]}
|
||||
label={t('application.orchestrationMode')}
|
||||
>
|
||||
<Select
|
||||
options={['conditional', 'sequential', 'parallel'].map((type) => ({
|
||||
options={['sequential', 'parallel'].map((type) => ({
|
||||
value: type,
|
||||
label: t(`application.${type}`),
|
||||
}))}
|
||||
@@ -239,7 +238,7 @@ const Cluster = forwardRef<ClusterRef>((_props, ref) => {
|
||||
}))}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Card>
|
||||
</Card>}
|
||||
</Space>
|
||||
</Form>
|
||||
</Col>
|
||||
|
||||
Reference in New Issue
Block a user