pref: 优化代码
This commit is contained in:
parent
690d103021
commit
d1f590aa7b
@ -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) {
|
|||||||
// 支持自定义域名,如果未设置则使用默认域名
|
// 支持自定义域名,如果未设置则使用默认域名
|
||||||
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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user