-
- {t('分组')}
-
- {inputs.type === 18 && (
-
- {t('模型版本')}
- handleInputChange('other', value)}
- value={inputs.other}
- autoComplete='new-password'
+ showClear
/>
-
- )}
+ )}
- {inputs.type === 41 && (
-
- {t('部署地区')}
-
- )}
+ )}
- {inputs.type === 21 && (
-
- {t('知识库 ID')}
- handleInputChange('other', value)}
- value={inputs.other}
- autoComplete='new-password'
+ showClear
/>
-
- )}
+ )}
- {inputs.type === 39 && (
-
- Account ID
- handleInputChange('other', value)}
- value={inputs.other}
- autoComplete='new-password'
+ showClear
/>
-
- )}
+ )}
- {inputs.type === 49 && (
-
- {t('智能体ID')}
- handleInputChange('other', value)}
- value={inputs.other}
- autoComplete='new-password'
+ showClear
/>
-
- )}
+ )}
-
- {t('渠道标签')}
- handleInputChange('openai_organization', value)}
+ />
+ )}
+
+
handleInputChange('tag', value)}
- value={inputs.tag}
- autoComplete='new-password'
/>
-
-
- {t('渠道优先级')}
- {
- const number = parseInt(value);
- if (isNaN(number)) {
- handleInputChange('priority', value);
- } else {
- handleInputChange('priority', number);
- }
- }}
- value={inputs.priority}
- autoComplete='new-password'
+
+
+ handleInputChange('priority', value)}
+ style={{ width: '100%' }}
+ />
+
+
+ handleInputChange('weight', value)}
+ style={{ width: '100%' }}
+ />
+
+
+
+
setAutoBan(val)}
+ extraText={t('仅当自动禁用开启时有效,关闭后不会自动禁用该渠道')}
+ initValue={autoBan}
/>
-
-
- {t('渠道权重')}
- {
- const number = parseInt(value);
- if (isNaN(number)) {
- handleInputChange('weight', value);
- } else {
- handleInputChange('weight', number);
- }
- }}
- value={inputs.weight}
- autoComplete='new-password'
- />
-
-
-
-
-
- {t('参数覆盖')}
-
- {inputs.type === 1 && (
-
- {t('组织')}
- handleInputChange('openai_organization', value)}
- value={inputs.openai_organization}
- />
-
- {t('组织,可选,不填则为默认组织')}
-
-
- )}
-
-
- setAutoBan(!autoBan)}
- />
-
- {t('是否自动禁用(仅当自动禁用开启时有效),关闭后不会自动禁用该渠道')}
-
-
-
-
-
- {t('状态码复写(仅影响本地判断,不修改返回到上游的状态码)')}
-
-
+
+
handleInputChange('setting', value)}
+ extraText={(
+
+ handleInputChange('setting', JSON.stringify({ force_format: true }, null, 2))}
+ >
+ {t('填入模板')}
+
+ window.open('https://github.com/QuantumNous/new-api/blob/main/docs/channel/other_setting.md')}
+ >
+ {t('设置说明')}
+
+
+ )}
+ showClear
+ />
+
-