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