feat(gallery): uniform download from CLI (#2559)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2024-06-13 16:12:46 +02:00 committed by GitHub
parent f183fec232
commit 7b205510f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 89 additions and 51 deletions

View file

@ -18,7 +18,7 @@ type Gallery struct {
Name string `json:"name" yaml:"name"`
}
// Installs a model from the gallery (galleryname@modelname)
// Installs a model from the gallery
func InstallModelFromGallery(galleries []Gallery, name string, basePath string, req GalleryModel, downloadStatus func(string, string, string, float64)) error {
applyModel := func(model *GalleryModel) error {
@ -114,11 +114,6 @@ func FindModel(models []*GalleryModel, name string, basePath string) *GalleryMod
return model
}
// InstallModelFromGalleryByName is planned for deprecation
func InstallModelFromGalleryByName(galleries []Gallery, name string, basePath string, req GalleryModel, downloadStatus func(string, string, string, float64)) error {
return InstallModelFromGallery(galleries, name, basePath, req, downloadStatus)
}
// List available models
// Models galleries are a list of yaml files that are hosted on a remote server (for example github).
// Each yaml file contains a list of models that can be downloaded and optionally overrides to define a new model setting.