feat: enhance Gemini API to support image response modalities and update model ratios

This commit is contained in:
Laisky.Cai
2025-03-17 01:22:33 +00:00
parent c893672635
commit 34c7523f01
4 changed files with 66 additions and 13 deletions

View File

@@ -7,6 +7,7 @@ import (
"gorm.io/gorm"
"github.com/pkg/errors"
"github.com/songquanpeng/one-api/common"
"github.com/songquanpeng/one-api/common/utils"
)
@@ -42,7 +43,7 @@ func GetRandomSatisfiedChannel(group string, model string, ignoreFirstPriority b
err = channelQuery.Order("RAND()").First(&ability).Error
}
if err != nil {
return nil, err
return nil, errors.Wrap(err, "get random satisfied channel")
}
channel := Channel{}
channel.Id = ability.ChannelId