Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions relay/adaptor/openai/compatible.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/songquanpeng/one-api/relay/adaptor/moonshot"
"github.com/songquanpeng/one-api/relay/adaptor/novita"
"github.com/songquanpeng/one-api/relay/adaptor/openrouter"
"github.com/songquanpeng/one-api/relay/adaptor/qiniu"
"github.com/songquanpeng/one-api/relay/adaptor/siliconflow"
"github.com/songquanpeng/one-api/relay/adaptor/stepfun"
"github.com/songquanpeng/one-api/relay/adaptor/togetherai"
Expand All @@ -41,6 +42,7 @@ var CompatibleChannels = []int{
channeltype.XAI,
channeltype.BaiduV2,
channeltype.XunfeiV2,
channeltype.Qiniu,
}

func GetCompatibleChannelMeta(channelType int) (string, []string) {
Expand Down Expand Up @@ -85,6 +87,8 @@ func GetCompatibleChannelMeta(channelType int) (string, []string) {
return "alibailian", alibailian.ModelList
case channeltype.GeminiOpenAICompatible:
return "geminiv2", geminiv2.ModelList
case channeltype.Qiniu:
return "qiniu", qiniu.ModelList
default:
return "openai", ModelList
}
Expand Down
7 changes: 7 additions & 0 deletions relay/adaptor/qiniu/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package qiniu

// https://api.qnaigc.com OpenAI-compatible gateway; model names follow the console.

var ModelList = []string{
"deepseek-v3",
}
1 change: 1 addition & 0 deletions relay/channeltype/define.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ const (
AliBailian
OpenAICompatible
GeminiOpenAICompatible
Qiniu
Dummy
)
1 change: 1 addition & 0 deletions relay/channeltype/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var ChannelBaseURLs = []string{
"", // 50

"https://generativelanguage.googleapis.com/v1beta/openai/", // 51
"https://api.qnaigc.com", // 52
}

func init() {
Expand Down
1 change: 1 addition & 0 deletions web/air/src/constants/channel.constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const CHANNEL_OPTIONS = [
{ key: 44, text: 'SiliconFlow', value: 44, color: 'blue' },
{ key: 45, text: 'xAI', value: 45, color: 'blue' },
{ key: 46, text: 'Replicate', value: 46, color: 'blue' },
{ key: 52, text: '七牛云', value: 52, 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' },
Expand Down
3 changes: 3 additions & 0 deletions web/air/src/pages/Channel/EditChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ const EditChannel = (props) => {
'mj_pan',
];
break;
case 52:
localModels = ['deepseek-v3'];
break;
}
setInputs((inputs) => ({...inputs, models: localModels}));
}
Expand Down
6 changes: 6 additions & 0 deletions web/berry/src/constants/ChannelConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ export const CHANNEL_OPTIONS = {
value: 44,
color: 'primary'
},
52: {
key: 52,
text: '七牛云',
value: 52,
color: 'primary'
},
45: {
key: 45,
text: 'xAI',
Expand Down
6 changes: 6 additions & 0 deletions web/berry/src/views/Channel/type/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ const typeConfig = {
45: {
modelGroup: 'xai'
},
52: {
input: {
models: ['deepseek-v3']
},
modelGroup: 'qiniu'
},
};

export { defaultConfig, typeConfig };
6 changes: 6 additions & 0 deletions web/default/src/constants/channel.constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ export const CHANNEL_OPTIONS = [
{ key: 44, text: 'SiliconFlow', value: 44, color: 'blue' },
{ key: 45, text: 'xAI', value: 45, color: 'blue' },
{ key: 46, text: 'Replicate', value: 46, color: 'blue' },
{
key: 52,
text: '七牛云',
value: 52,
color: 'blue',
},
{
key: 8,
text: '自定义渠道',
Expand Down
Loading