feat: Add Baidu Qianfan V2 channel support #725

- Update channel constants to include Baidu V2 channel
- Create new Baidu V2 adaptor for relay
- Add Baidu V2 models and channel configuration
- Update relay adaptor to support Baidu V2 channel
- Modify web channel constants to include Baidu V2 option
This commit is contained in:
1808837298@qq.com
2025-02-12 00:07:02 +08:00
parent 28c13e5a0f
commit eceb6afcdd
8 changed files with 158 additions and 47 deletions

View File

@@ -29,6 +29,7 @@ const (
APITypeDeepSeek
APITypeMokaAI
APITypeVolcEngine
APITypeBaiduV2
APITypeDummy // this one is only for count, do not add any channel after this
)
@@ -83,6 +84,8 @@ func ChannelType2APIType(channelType int) (int, bool) {
apiType = APITypeMokaAI
case common.ChannelTypeVolcEngine:
apiType = APITypeVolcEngine
case common.ChannelTypeBaiduV2:
apiType = APITypeBaiduV2
}
if apiType == -1 {
return APITypeOpenAI, false