feat: set API version for Azure and Vertex AI channel types
This commit is contained in:
@@ -138,6 +138,13 @@ func (info *RelayInfo) InitChannelMeta(c *gin.Context) {
|
||||
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)
|
||||
if ok {
|
||||
channelMeta.ChannelSetting = channelSetting
|
||||
|
||||
Reference in New Issue
Block a user