diff --git a/internal/logic/inference/deployinstancelistlogic.go b/internal/logic/inference/deployinstancelistlogic.go index 6f17c7cd..434dd72f 100644 --- a/internal/logic/inference/deployinstancelistlogic.go +++ b/internal/logic/inference/deployinstancelistlogic.go @@ -38,6 +38,14 @@ func (l *DeployInstanceListLogic) DeployInstanceList(req *types.DeployInstanceLi return nil, tx.Error } + if len(tasklist) == 0 { + resp.List = nil + resp.PageSize = req.PageSize + resp.PageNum = req.PageNum + resp.Total = 0 + return + } + //count total var total int64 err = tx.Count(&total).Error diff --git a/internal/logic/inference/getdeploytasksbytypelogic.go b/internal/logic/inference/getdeploytasksbytypelogic.go index f1cd5268..54d9fbe6 100644 --- a/internal/logic/inference/getdeploytasksbytypelogic.go +++ b/internal/logic/inference/getdeploytasksbytypelogic.go @@ -70,12 +70,6 @@ func removeItem(items *[]*models.AiDeployInstanceTask, id int64) { if len(*items) == 0 { return } - if len(*items) == 1 { - if (*items)[0].Id == id { - (*items) = nil - return - } - } for i := len(*items) - 1; i >= 0; i-- { if (*items)[i].Id == id { *items = append((*items)[:i], (*items)[i+1:]...) diff --git a/internal/storeLink/storeLink.go b/internal/storeLink/storeLink.go index 8c7dc042..70ce291b 100644 --- a/internal/storeLink/storeLink.go +++ b/internal/storeLink/storeLink.go @@ -80,7 +80,7 @@ var ( } ModelTypeMap = map[string][]string{ "image_classification": {"imagenet_resnet50"}, - "text_to_text": {"chatGLM_6B"}, + "text_to_text": {"ChatGLM-6B"}, "image_to_text": {"blip-image-captioning-base"}, "text_to_image": {"stable-diffusion-xl-base-1.0"}, }