feat: 移除 azure model 的 TrimSuffix (#1193)
This commit is contained in:
parent
4ae311e964
commit
e96b173abe
@ -31,11 +31,8 @@ func (a *Adaptor) GetRequestURL(meta *util.RelayMeta) (string, error) {
|
|||||||
task := strings.TrimPrefix(requestURL, "/v1/")
|
task := strings.TrimPrefix(requestURL, "/v1/")
|
||||||
model_ := meta.ActualModelName
|
model_ := meta.ActualModelName
|
||||||
model_ = strings.Replace(model_, ".", "", -1)
|
model_ = strings.Replace(model_, ".", "", -1)
|
||||||
// https://github.com/songquanpeng/one-api/issues/67
|
//https://github.com/songquanpeng/one-api/issues/1191
|
||||||
model_ = strings.TrimSuffix(model_, "-0301")
|
// {your endpoint}/openai/deployments/{your azure_model}/chat/completions?api-version={api_version}
|
||||||
model_ = strings.TrimSuffix(model_, "-0314")
|
|
||||||
model_ = strings.TrimSuffix(model_, "-0613")
|
|
||||||
|
|
||||||
requestURL = fmt.Sprintf("/openai/deployments/%s/%s", model_, task)
|
requestURL = fmt.Sprintf("/openai/deployments/%s/%s", model_, task)
|
||||||
return util.GetFullRequestURL(meta.BaseURL, requestURL, meta.ChannelType), nil
|
return util.GetFullRequestURL(meta.BaseURL, requestURL, meta.ChannelType), nil
|
||||||
case common.ChannelTypeMinimax:
|
case common.ChannelTypeMinimax:
|
||||||
|
Loading…
Reference in New Issue
Block a user