diff --git a/go.mod b/go.mod index e5baca0e..d7878223 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,6 @@ go 1.23.4 toolchain go1.23.6 -//toolchain go1.21.1 - require ( github.com/eolinker/ap-account v1.0.15 github.com/eolinker/eosc v0.18.3 @@ -83,6 +81,7 @@ require ( // github.com/eolinker/eosc => ../../eolinker/eosc //) -//replace github.com/eolinker/ap-account => ../aoaccount +//replace github.com/eolinker/ap-account => ../../eolinker/ap-account + // //replace github.com/eolinker/go-common => ../../eolinker/go-common diff --git a/module/ai-local/iml.go b/module/ai-local/iml.go index d3dcabeb..913c8ef5 100644 --- a/module/ai-local/iml.go +++ b/module/ai-local/iml.go @@ -354,6 +354,15 @@ func (i *imlLocalModel) SaveCache(ctx context.Context, model string, target stri func (i *imlLocalModel) CancelDeploy(ctx context.Context, model string) error { return i.transaction.Transaction(ctx, func(txCtx context.Context) error { + item, err := i.localModelCacheService.GetByTarget(ctx, ai_local.CacheTypeService, model) + if err != nil { + if !errors.Is(err, gorm.ErrRecordNotFound) { + return err + } + + } else { + model = item.Model + } list, err := i.localModelCacheService.List(ctx, model, ai_local.CacheTypeService) if err != nil { return err