feat: support vertex ai #377

This commit is contained in:
CalciumIon
2024-08-27 20:19:51 +08:00
parent 46e03683ce
commit ac4262c542
18 changed files with 609 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 == "" {