mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-14 06:20:27 +00:00
feat: support specific default api version now (#57)
This commit is contained in:
@@ -65,6 +65,9 @@ func Distribute() func(c *gin.Context) {
|
||||
c.Request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", channel.Key))
|
||||
if channel.Type == common.ChannelTypeCustom || channel.Type == common.ChannelTypeAzure {
|
||||
c.Set("base_url", channel.BaseURL)
|
||||
if channel.Type == common.ChannelTypeAzure {
|
||||
c.Set("api_version", channel.Other)
|
||||
}
|
||||
}
|
||||
c.Next()
|
||||
}
|
||||
|
Reference in New Issue
Block a user