feat: add xai channel

feat: add xai channel

feat: add xai channel
This commit is contained in:
HynoR
2025-04-10 12:26:48 +08:00
parent 3f58fcb4f3
commit 4622c17c83
7 changed files with 118 additions and 0 deletions

View File

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