mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-12 09:03:42 +08:00
feat: support Azure dall-e
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user