mirror of
https://github.com/mudler/LocalAI.git
synced 2026-05-06 18:49:23 -05:00
feat(gallery): support model deletion (#2173)
* feat(gallery): op now supports deletion of models Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Wire things with WebUI(WIP) Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * minor improvements Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
committed by
GitHub
parent
a24cd4fda0
commit
e8d44447ad
+7
-1
@@ -96,7 +96,13 @@ func (ml *ModelLoader) ListModels() ([]string, error) {
|
||||
models := []string{}
|
||||
for _, file := range files {
|
||||
// Skip templates, YAML, .keep, .json, and .DS_Store files - TODO: as this list grows, is there a more efficient method?
|
||||
if strings.HasSuffix(file.Name(), ".tmpl") || strings.HasSuffix(file.Name(), ".keep") || strings.HasSuffix(file.Name(), ".yaml") || strings.HasSuffix(file.Name(), ".yml") || strings.HasSuffix(file.Name(), ".json") || strings.HasSuffix(file.Name(), ".DS_Store") {
|
||||
if strings.HasSuffix(file.Name(), ".tmpl") ||
|
||||
strings.HasSuffix(file.Name(), ".keep") ||
|
||||
strings.HasSuffix(file.Name(), ".yaml") ||
|
||||
strings.HasSuffix(file.Name(), ".yml") ||
|
||||
strings.HasSuffix(file.Name(), ".json") ||
|
||||
strings.HasSuffix(file.Name(), ".DS_Store") ||
|
||||
strings.HasPrefix(file.Name(), ".") {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user