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

@@ -6,6 +6,7 @@ import (
"one-api/relay/channel/ali"
"one-api/relay/channel/aws"
"one-api/relay/channel/baidu"
"one-api/relay/channel/baidu_v2"
"one-api/relay/channel/claude"
"one-api/relay/channel/cloudflare"
"one-api/relay/channel/cohere"
@@ -80,6 +81,8 @@ func GetAdaptor(apiType int) channel.Adaptor {
return &mokaai.Adaptor{}
case constant.APITypeVolcEngine:
return &volcengine.Adaptor{}
case constant.APITypeBaiduV2:
return &baidu_v2.Adaptor{}
}
return nil
}