feat(relay): Add Xinference channel support

This commit is contained in:
1808837298@qq.com
2025-03-12 17:53:46 +08:00
parent 1a2bf8df1f
commit a981e10712
6 changed files with 28 additions and 5 deletions

View File

@@ -18,6 +18,7 @@ import (
"one-api/relay/channel/lingyiwanwu"
"one-api/relay/channel/minimax"
"one-api/relay/channel/moonshot"
"one-api/relay/channel/xinference"
relaycommon "one-api/relay/common"
"one-api/relay/constant"
"strings"
@@ -251,6 +252,8 @@ func (a *Adaptor) GetModelList() []string {
return lingyiwanwu.ModelList
case common.ChannelTypeMiniMax:
return minimax.ModelList
case common.ChannelTypeXinference:
return xinference.ModelList
default:
return ModelList
}
@@ -266,6 +269,8 @@ func (a *Adaptor) GetChannelName() string {
return lingyiwanwu.ChannelName
case common.ChannelTypeMiniMax:
return minimax.ChannelName
case common.ChannelTypeXinference:
return xinference.ChannelName
default:
return ChannelName
}

View File

@@ -0,0 +1,7 @@
package xinference
var ModelList = []string{
"bge-reranker-v2-m3",
}
var ChannelName = "xinference"