mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-16 13:13:41 +08:00
✨ feat: support Ollama (#168)
This commit is contained in:
@@ -144,27 +144,34 @@ export const CHANNEL_OPTIONS = {
|
||||
text: 'Cloudflare AI',
|
||||
value: 35,
|
||||
color: 'orange',
|
||||
url: ''
|
||||
url: 'https://ai.cloudflare.com/'
|
||||
},
|
||||
36: {
|
||||
key: 36,
|
||||
text: 'Cohere',
|
||||
value: 36,
|
||||
color: 'default',
|
||||
url: ''
|
||||
url: 'https://cohere.com/'
|
||||
},
|
||||
37: {
|
||||
key: 37,
|
||||
text: 'Stability AI',
|
||||
value: 37,
|
||||
color: 'default',
|
||||
url: ''
|
||||
url: 'https://platform.stability.ai/account/credits'
|
||||
},
|
||||
38: {
|
||||
key: 38,
|
||||
text: 'Coze',
|
||||
value: 38,
|
||||
color: 'primary',
|
||||
url: 'https://www.coze.com/open/docs/chat?_lang=zh'
|
||||
},
|
||||
39: {
|
||||
key: 39,
|
||||
text: 'Ollama',
|
||||
value: 39,
|
||||
color: 'orange',
|
||||
url: ''
|
||||
},
|
||||
24: {
|
||||
|
||||
@@ -636,6 +636,7 @@ const EditModal = ({ open, channelId, onCancel, onOk, groupOptions }) => {
|
||||
<>
|
||||
<Divider sx={{ ...theme.typography.otherInput }} />
|
||||
<Typography variant="h3">{plugin.name}</Typography>
|
||||
<Typography variant="caption">{plugin.description}</Typography>
|
||||
{Object.keys(plugin.params).map((paramId) => {
|
||||
const param = plugin.params[paramId];
|
||||
const name = `plugin.${pluginId}.${paramId}`;
|
||||
|
||||
@@ -315,6 +315,15 @@ const typeConfig = {
|
||||
'模型名称映射, 你可以取一个容易记忆的名字来代替coze-{bot_id},例如:{"coze-translate": "coze-xxxxx"},注意:如果使用了模型映射,那么上面的模型名称必须使用映射前的名称,上述例子中,你应该在模型中填入coze-translate(如果已经使用了coze-*,可以忽略)。'
|
||||
},
|
||||
modelGroup: 'Coze'
|
||||
},
|
||||
39: {
|
||||
input: {
|
||||
models: ['phi3', 'llama3']
|
||||
},
|
||||
prompt: {
|
||||
base_url: '请输入你部署的Ollama地址,例如:http://127.0.0.1:11434,如果你使用了cloudflare Zero Trust,可以在下方插件填入授权信息',
|
||||
key: '请随意填写'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -88,5 +88,25 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"39": {
|
||||
"headers": {
|
||||
"name": "Header 配置",
|
||||
"description": "本配置主要是用于使用cloudflare Zero Trust将端口暴露到公网时,需要配置的header",
|
||||
"params": {
|
||||
"CF-Access-Client-Id": {
|
||||
"name": "CF-Access-Client-Id",
|
||||
"description": "CF-Access-Client-Id",
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"CF-Access-Client-Secret": {
|
||||
"name": "CF-Access-Client-Secret",
|
||||
"description": "CF-Access-Client-Secret",
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user