mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-28 06:25:00 +00:00
feat(gallery): uniform download from CLI (#2559)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
f183fec232
commit
7b205510f9
7 changed files with 89 additions and 51 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue