✨ feat: Azure OpenAI model name automatically removes dots.
This commit is contained in:
parent
3aef247fa9
commit
bf5ba315ee
@ -71,6 +71,12 @@ func (p *OpenAIProvider) GetFullRequestURL(requestURL string, modelName string)
|
|||||||
} else {
|
} else {
|
||||||
requestURL = fmt.Sprintf("/openai/deployments/%s%s?api-version=%s", modelName, requestURL, apiVersion)
|
requestURL = fmt.Sprintf("/openai/deployments/%s%s?api-version=%s", modelName, requestURL, apiVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 检测模型是是否包含 . 如果有则直接去掉
|
||||||
|
if strings.Contains(requestURL, ".") {
|
||||||
|
requestURL = strings.Replace(requestURL, ".", "", -1)
|
||||||
|
fmt.Println(requestURL)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasPrefix(baseURL, "https://gateway.ai.cloudflare.com") {
|
if strings.HasPrefix(baseURL, "https://gateway.ai.cloudflare.com") {
|
||||||
|
Loading…
Reference in New Issue
Block a user