Merge remote-tracking branch 'origin/upstream/main'

This commit is contained in:
Laisky.Cai
2024-11-20 02:09:28 +00:00
42 changed files with 490 additions and 350 deletions

View File

@@ -30,6 +30,7 @@ export const CHANNEL_OPTIONS = [
{ key: 42, text: 'VertexAI', value: 42, color: 'blue' },
{ key: 43, text: 'Proxy', value: 43, color: 'blue' },
{ key: 44, text: 'SiliconFlow', value: 44, color: 'blue' },
{ key: 45, text: 'xAI', value: 45, color: 'blue' },
{ key: 8, text: '自定义渠道', value: 8, color: 'pink' },
{ key: 22, text: '知识库FastGPT', value: 22, color: 'blue' },
{ key: 21, text: '知识库AI Proxy', value: 21, color: 'purple' },

View File

@@ -43,6 +43,7 @@ const EditChannel = () => {
base_url: '',
other: '',
model_mapping: '',
system_prompt: '',
models: [],
groups: ['default']
};
@@ -425,7 +426,7 @@ const EditChannel = () => {
)
}
{
inputs.type !== 43 && (
inputs.type !== 43 && (<>
<Form.Field>
<Form.TextArea
label='模型重定向'
@@ -437,6 +438,18 @@ const EditChannel = () => {
autoComplete='new-password'
/>
</Form.Field>
<Form.Field>
<Form.TextArea
label='系统提示词'
placeholder={`此项可选,用于强制设置给定的系统提示词,请配合自定义模型 & 模型重定向使用,首先创建一个唯一的自定义模型名称并在上面填入,之后将该自定义模型重定向映射到该渠道一个原生支持的模型`}
name='system_prompt'
onChange={handleInputChange}
value={inputs.system_prompt}
style={{ minHeight: 150, fontFamily: 'JetBrains Mono, Consolas' }}
autoComplete='new-password'
/>
</Form.Field>
</>
)
}
{