fix: get upstream models

This commit is contained in:
CalciumIon
2024-12-24 20:48:21 +08:00
parent 8129aa76f9
commit 3003d12a20

View File

@@ -115,8 +115,8 @@ func FetchUpstreamModels(c *gin.Context) {
// return
//}
baseURL := common.ChannelBaseURLs[channel.Type]
if channel.GetBaseURL() == "" {
channel.BaseURL = &baseURL
if channel.GetBaseURL() != "" {
baseURL = channel.GetBaseURL()
}
url := fmt.Sprintf("%s/v1/models", baseURL)
body, err := GetResponseBody("GET", url, channel, GetAuthHeader(channel.Key))