fix: channel issue

This commit is contained in:
ckt1031
2023-07-24 22:05:21 +08:00
parent 30187cebe8
commit 13b3bfee2a
3 changed files with 16 additions and 10 deletions

View File

@@ -2,6 +2,7 @@ package middleware
import (
"fmt"
"log"
"net/http"
"one-api/common"
"one-api/model"
@@ -85,6 +86,7 @@ func Distribute() func(c *gin.Context) {
modelRequest.Model = "dall-e"
}
}
log.Print(modelRequest.Stream)
channel, err = model.CacheGetRandomSatisfiedChannel(userGroup, modelRequest.Model, modelRequest.Stream)
if err != nil {
message := fmt.Sprintf("当前分组 %s 下对于模型 %s 无可用渠道", userGroup, modelRequest.Model)