Browse Source

pref: 优化代码

huanghejian 5 months ago
parent
commit
e0c6900195
1 changed files with 2 additions and 1 deletions
  1. 2 1
      relay/channel/volcengine/adaptor.go

+ 2 - 1
relay/channel/volcengine/adaptor.go

@@ -9,6 +9,7 @@ import (
 	"mime/multipart"
 	"net/http"
 	"net/textproto"
+	channelconstant "one-api/constant"
 	"one-api/dto"
 	"one-api/relay/channel"
 	"one-api/relay/channel/openai"
@@ -191,7 +192,7 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
 	// 支持自定义域名,如果未设置则使用默认域名
 	baseUrl := info.ChannelBaseUrl
 	if baseUrl == "" {
-		baseUrl = "https://ark.cn-beijing.volces.com"
+		baseUrl = channelconstant.ChannelBaseURLs[channelconstant.ChannelTypeVolcEngine]
 	}
 
 	switch info.RelayMode {