diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index 63ef4bf80..7bd286602 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -956,6 +956,7 @@ func ShowOneVersionOtherModel(ctx *context.Context) { } func SetModelCount(ctx *context.Context) { + isQueryPrivate := isQueryPrivateModel(ctx) repoId := ctx.Repo.Repository.ID Type := -1 _, count, _ := models.QueryModel(&models.AiModelQueryOptions{ @@ -968,6 +969,7 @@ func SetModelCount(ctx *context.Context) { New: MODEL_LATEST, IsOnlyThisRepo: true, Status: -1, + IsQueryPrivate: isQueryPrivate, }) ctx.Data["MODEL_COUNT"] = count } @@ -1224,6 +1226,7 @@ func QueryModelListForPredict(ctx *context.Context) { if pageSize <= 0 { pageSize = -1 } + isQueryPrivate := isQueryPrivateModel(ctx) //IsOnlyThisRepo := ctx.QueryBool("isOnlyThisRepo") modelResult, count, err := models.QueryModel(&models.AiModelQueryOptions{ ListOptions: models.ListOptions{ @@ -1235,6 +1238,7 @@ func QueryModelListForPredict(ctx *context.Context) { New: -1, Status: 0, IsOnlyThisRepo: true, + IsQueryPrivate: isQueryPrivate, }) if err != nil { ctx.ServerError("Cloudbrain", err)