Skip to content

Commit e96b173

Browse files
authored
feat: 移除 azure model 的 TrimSuffix (songquanpeng#1193)
1 parent 4ae311e commit e96b173

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

relay/channel/openai/adaptor.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@ func (a *Adaptor) GetRequestURL(meta *util.RelayMeta) (string, error) {
3131
task := strings.TrimPrefix(requestURL, "/v1/")
3232
model_ := meta.ActualModelName
3333
model_ = strings.Replace(model_, ".", "", -1)
34-
// https://github.com/songquanpeng/one-api/issues/67
35-
model_ = strings.TrimSuffix(model_, "-0301")
36-
model_ = strings.TrimSuffix(model_, "-0314")
37-
model_ = strings.TrimSuffix(model_, "-0613")
38-
34+
//https://github.com/songquanpeng/one-api/issues/1191
35+
// {your endpoint}/openai/deployments/{your azure_model}/chat/completions?api-version={api_version}
3936
requestURL = fmt.Sprintf("/openai/deployments/%s/%s", model_, task)
4037
return util.GetFullRequestURL(meta.BaseURL, requestURL, meta.ChannelType), nil
4138
case common.ChannelTypeMinimax:

0 commit comments

Comments
 (0)