s/DisplayLongest/String/

This commit is contained in:
Michael Yang 2024-05-01 10:34:39 -07:00
parent d245460362
commit f5e8b207fb

View file

@ -23,15 +23,15 @@ type layerWithGGML struct {
} }
func parseFromModel(ctx context.Context, name model.Name, fn func(api.ProgressResponse)) (layers []*layerWithGGML, err error) { func parseFromModel(ctx context.Context, name model.Name, fn func(api.ProgressResponse)) (layers []*layerWithGGML, err error) {
modelpath := ParseModelPath(name.DisplayLongest()) modelpath := ParseModelPath(name.String())
manifest, _, err := GetManifest(modelpath) manifest, _, err := GetManifest(modelpath)
switch { switch {
case errors.Is(err, os.ErrNotExist): case errors.Is(err, os.ErrNotExist):
if err := PullModel(ctx, name.DisplayLongest(), &registryOptions{}, fn); err != nil { if err := PullModel(ctx, name.String(), &registryOptions{}, fn); err != nil {
return nil, err return nil, err
} }
modelpath = ParseModelPath(name.DisplayLongest()) modelpath = ParseModelPath(name.String())
manifest, _, err = GetManifest(modelpath) manifest, _, err = GetManifest(modelpath)
if err != nil { if err != nil {
return nil, err return nil, err