Commit d1f590aa by huanghejian

pref: 优化代码

parent 690d1030
...@@ -9,6 +9,7 @@ import ( ...@@ -9,6 +9,7 @@ import (
"mime/multipart" "mime/multipart"
"net/http" "net/http"
"net/textproto" "net/textproto"
channelconstant "one-api/constant"
"one-api/dto" "one-api/dto"
"one-api/relay/channel" "one-api/relay/channel"
"one-api/relay/channel/openai" "one-api/relay/channel/openai"
...@@ -191,7 +192,7 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) { ...@@ -191,7 +192,7 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
// 支持自定义域名,如果未设置则使用默认域名 // 支持自定义域名,如果未设置则使用默认域名
baseUrl := info.ChannelBaseUrl baseUrl := info.ChannelBaseUrl
if baseUrl == "" { if baseUrl == "" {
baseUrl = "https://ark.cn-beijing.volces.com" baseUrl = channelconstant.ChannelBaseURLs[channelconstant.ChannelTypeVolcEngine]
} }
switch info.RelayMode { switch info.RelayMode {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment