feat: add Xunfei V2 channel support and update related configurations

This commit is contained in:
JustSong
2025-02-09 18:31:54 +08:00
parent 44233d5c04
commit 57c1367ec8
5 changed files with 32 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ import (
"github.com/songquanpeng/one-api/relay/adaptor/stepfun"
"github.com/songquanpeng/one-api/relay/adaptor/togetherai"
"github.com/songquanpeng/one-api/relay/adaptor/xai"
"github.com/songquanpeng/one-api/relay/adaptor/xunfeiv2"
"github.com/songquanpeng/one-api/relay/channeltype"
)
@@ -36,6 +37,7 @@ var CompatibleChannels = []int{
channeltype.SiliconFlow,
channeltype.XAI,
channeltype.BaiduV2,
channeltype.XunfeiV2,
}
func GetCompatibleChannelMeta(channelType int) (string, []string) {
@@ -72,6 +74,8 @@ func GetCompatibleChannelMeta(channelType int) (string, []string) {
return "xai", xai.ModelList
case channeltype.BaiduV2:
return "baiduv2", baiduv2.ModelList
case channeltype.XunfeiV2:
return "xunfeiv2", xunfeiv2.ModelList
default:
return "openai", ModelList
}