feat(relay): Add Xinference channel support
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
7
relay/channel/xinference/constant.go
Normal file
7
relay/channel/xinference/constant.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package xinference
|
||||
|
||||
var ModelList = []string{
|
||||
"bge-reranker-v2-m3",
|
||||
}
|
||||
|
||||
var ChannelName = "xinference"
|
||||
Reference in New Issue
Block a user