mirror of
https://github.com/mudler/LocalAI.git
synced 2026-04-04 23:14:41 -04:00
fix(api)!: Stop model prior to deletion (#8422)
* Unload model prior to deletion Signed-off-by: Andres Smith <andressmithdev@pm.me> * Fix LFM model in gallery Signed-off-by: Andres Smith <andressmithdev@pm.me> * Remove mistakenly added files Signed-off-by: Andres Smith <andressmithdev@pm.me> --------- Signed-off-by: Andres Smith <andressmithdev@pm.me>
This commit is contained in:
@@ -197,6 +197,9 @@ func processModelOperation(
|
||||
|
||||
switch {
|
||||
case op.Delete:
|
||||
if err := modelLoader.ShutdownModel(op.GalleryElementName); err != nil {
|
||||
xlog.Warn("Failed to unload model during deletion", "model", op.GalleryElementName, "error", err)
|
||||
}
|
||||
return gallery.DeleteModelFromSystem(systemState, op.GalleryElementName)
|
||||
case op.GalleryElement != nil:
|
||||
installedModel, err := gallery.InstallModel(
|
||||
|
||||
Reference in New Issue
Block a user