Merge branch 'Calcium-Ion:main' into main

This commit is contained in:
GuoRuqiang
2024-08-28 10:44:14 +08:00
committed by GitHub
19 changed files with 465 additions and 47 deletions

View File

@@ -198,6 +198,9 @@ func AddChannel(c *gin.Context) {
}
channel.CreatedTime = common.GetTimestamp()
keys := strings.Split(channel.Key, "\n")
if channel.Type == common.ChannelTypeVertexAi {
keys = []string{channel.Key}
}
channels := make([]model.Channel, 0, len(keys))
for _, key := range keys {
if key == "" {