fix: fix gemini

This commit is contained in:
CaIon
2024-03-08 20:29:04 +08:00
parent 889c15b7bd
commit 124369073a
5 changed files with 8 additions and 14 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ func GenRelayInfo(c *gin.Context) *RelayInfo {
info.BaseUrl = common.ChannelBaseURLs[channelType]
}
if info.ChannelType == common.ChannelTypeAzure {
info.ApiVersion = GetAzureAPIVersion(c)
info.ApiVersion = GetAPIVersion(c)
}
return info
}
-9
View File
@@ -66,12 +66,3 @@ func GetAPIVersion(c *gin.Context) string {
}
return apiVersion
}
func GetAzureAPIVersion(c *gin.Context) string {
query := c.Request.URL.Query()
apiVersion := query.Get("api-version")
if apiVersion == "" {
apiVersion = c.GetString("api_version")
}
return apiVersion
}