Skip to content

Commit

Permalink
sneak a logging fix in too for gallery debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-gray101 committed Oct 24, 2023
1 parent 140d751 commit f6523be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/gallery/gallery.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/go-skynet/LocalAI/pkg/utils"
"github.com/imdario/mergo"
"github.com/rs/zerolog/log"
"gopkg.in/yaml.v2"
)

Expand Down Expand Up @@ -166,7 +167,9 @@ func getGalleryModels(gallery Gallery, basePath string) ([]*GalleryModel, error)
return yaml.Unmarshal(d, &models)
})
if err != nil {

if yamlErr, ok := err.(*yaml.TypeError); ok {
log.Debug().Msgf("YAML errors: %s", strings.Join(yamlErr.Errors, "\n"))
}
return models, err
}

Expand Down

0 comments on commit f6523be

Please sign in to comment.