feat: support cloudflare gateway for azure (#666)

* 🐛 Fix cloudflare gateway request failure

* 🐛 fix channel test url error
This commit is contained in:
Buer
2023-11-19 15:52:35 +08:00
committed by GitHub
parent 34d517cfa2
commit 54e5f8ecd2
3 changed files with 17 additions and 8 deletions

View File

@@ -147,7 +147,9 @@ func relayTextHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
model_ = strings.TrimSuffix(model_, "-0301")
model_ = strings.TrimSuffix(model_, "-0314")
model_ = strings.TrimSuffix(model_, "-0613")
fullRequestURL = fmt.Sprintf("%s/openai/deployments/%s/%s", baseURL, model_, task)
requestURL = fmt.Sprintf("/openai/deployments/%s/%s", model_, task)
fullRequestURL = getFullRequestURL(baseURL, requestURL, channelType)
}
case APITypeClaude:
fullRequestURL = "https://api.anthropic.com/v1/complete"