feat: able to set default test model (#138)

This commit is contained in:
CaIon
2024-04-04 17:28:56 +08:00
parent cdf2087952
commit 660b9b3c99
4 changed files with 20 additions and 4 deletions

View File

@@ -163,7 +163,7 @@ func SetupContextForSelectedChannel(c *gin.Context, channel *model.Channel, mode
if channel.AutoBan != nil && *channel.AutoBan == 0 {
ban = false
}
if nil != channel.OpenAIOrganization {
if nil != channel.OpenAIOrganization && "" != *channel.OpenAIOrganization {
c.Set("channel_organization", *channel.OpenAIOrganization)
}
c.Set("auto_ban", ban)