feat: support Azure dall-e

This commit is contained in:
CaIon
2024-01-09 15:46:45 +08:00
parent fb95216b5a
commit 75b6327f4f
4 changed files with 55 additions and 8 deletions

View File

@@ -301,3 +301,12 @@ func getFullRequestURL(baseURL string, requestURL string, channelType int) strin
}
return fullRequestURL
}
func GetAPIVersion(c *gin.Context) string {
query := c.Request.URL.Query()
apiVersion := query.Get("api-version")
if apiVersion == "" {
apiVersion = c.GetString("api_version")
}
return apiVersion
}