feat: Add Parameters Override

This commit is contained in:
JoeyLearnsToCode
2025-03-29 14:39:39 +08:00
parent a378665b8c
commit 1b07282153
6 changed files with 51 additions and 0 deletions

View File

@@ -1275,6 +1275,7 @@
"代理站地址": "Base URL",
"对于官方渠道new-api已经内置地址除非是第三方代理站点或者Azure的特殊接入地址否则不需要填写": "For official channels, the new-api has a built-in address. Unless it is a third-party proxy site or a special Azure access address, there is no need to fill it in",
"渠道额外设置": "Channel extra settings",
"参数覆盖": "Parameters override",
"模型请求速率限制": "Model request rate limit",
"启用用户模型请求速率限制(可能会影响高并发性能)": "Enable user model request rate limit (may affect high concurrency performance)",
"限制周期": "Limit period",

View File

@@ -983,6 +983,23 @@ const EditChannel = (props) => {
</Typography.Text>
</Space>
</>
<>
<div style={{ marginTop: 10 }}>
<Typography.Text strong>
{t('参数覆盖')}
</Typography.Text>
</div>
<TextArea
placeholder={t('此项可选,用于覆盖请求参数。不支持覆盖 stream 参数。为一个 JSON 字符串,例如:') + '\n{\n "temperature": 0\n}'}
name="setting"
onChange={(value) => {
handleInputChange('param_override', value);
}}
autosize
value={inputs.param_override}
autoComplete="new-password"
/>
</>
{inputs.type === 1 && (
<>
<div style={{ marginTop: 10 }}>