fix: #1054 Add model mapping to abilities

- Update Abilities model to include model mapping key
- Parse model mapping in Channel model and filter models by model mapping in Update function
This commit is contained in:
Laisky.Cai
2024-02-29 08:58:54 +00:00
parent b747cdbc6f
commit 90a039d325
4 changed files with 36 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ func Relay(c *gin.Context) {
for i := retryTimes; i > 0; i-- {
channel, err := dbmodel.CacheGetRandomSatisfiedChannel(group, originalModel)
if err != nil {
logger.Errorf(ctx, "CacheGetRandomSatisfiedChannel failed: %w", err)
logger.Errorf(ctx, "CacheGetRandomSatisfiedChannel failed: %v", err)
break
}
logger.Infof(ctx, "using channel #%d to retry (remain times %d)", channel.Id, i)