feat: 自定义渠道功能变更 (#262)

This commit is contained in:
CaIon
2024-05-18 16:06:12 +08:00
parent 98a991306d
commit 84da88506f
2 changed files with 15 additions and 11 deletions

View File

@@ -41,10 +41,10 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
return relaycommon.GetFullRequestURL(info.BaseUrl, requestURL, info.ChannelType), nil
case common.ChannelTypeMiniMax:
return minimax.GetRequestURL(info)
//case common.ChannelTypeCustom:
// url := info.BaseUrl
// url = strings.Replace(url, "{model}", info.UpstreamModelName, -1)
// return url, nil
case common.ChannelTypeCustom:
url := info.BaseUrl
url = strings.Replace(url, "{model}", info.UpstreamModelName, -1)
return url, nil
default:
return relaycommon.GetFullRequestURL(info.BaseUrl, info.RequestURLPath, info.ChannelType), nil
}