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

@@ -31,6 +31,7 @@ const (
APITypeVolcEngine
APITypeBaiduV2
APITypeOpenRouter
APITypeXinference
APITypeDummy // this one is only for count, do not add any channel after this
)
@@ -89,6 +90,8 @@ func ChannelType2APIType(channelType int) (int, bool) {
apiType = APITypeBaiduV2
case common.ChannelTypeOpenRouter:
apiType = APITypeOpenRouter
case common.ChannelTypeXinference:
apiType = APITypeXinference
}
if apiType == -1 {
return APITypeOpenAI, false