Commit 11ce48be by CaIon

feat: set API version for Azure and Vertex AI channel types

parent 1d878e5e
...@@ -138,6 +138,13 @@ func (info *RelayInfo) InitChannelMeta(c *gin.Context) { ...@@ -138,6 +138,13 @@ func (info *RelayInfo) InitChannelMeta(c *gin.Context) {
SupportStreamOptions: false, SupportStreamOptions: false,
} }
if channelType == constant.ChannelTypeAzure {
channelMeta.ApiVersion = GetAPIVersion(c)
}
if channelType == constant.ChannelTypeVertexAi {
channelMeta.ApiVersion = c.GetString("region")
}
channelSetting, ok := common.GetContextKeyType[dto.ChannelSettings](c, constant.ContextKeyChannelSetting) channelSetting, ok := common.GetContextKeyType[dto.ChannelSettings](c, constant.ContextKeyChannelSetting)
if ok { if ok {
channelMeta.ChannelSetting = channelSetting channelMeta.ChannelSetting = channelSetting
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment