This commit is contained in:
Saifeddine ALOUI 2023-10-16 00:08:35 +02:00
parent 0d63516549
commit dbf4146300
3 changed files with 6 additions and 5 deletions

View File

@ -134,7 +134,7 @@ class LollmsApplication:
def mount_extension(self, id:int, callback=None):
try:
extension = ExtensionBuilder(self.lollms_paths, self.config, self.model, self, callback=callback).build_extension(self.config["extensions"][id], self.lollms_paths, self)
extension = ExtensionBuilder().build_extension(self.config["extensions"][id], self.lollms_paths, self)
self.mounted_extensions.append(extension)
return extension
except Exception as ex:
@ -205,7 +205,8 @@ class LollmsApplication:
def unmount_extension(self, id:int)->bool:
if id<len(self.config.extensions):
del self.config.extensions[id]
del self.mounted_extensions[id]
if id>=0 and id<len(self.mounted_extensions):
del self.mounted_extensions[id]
self.config.save_config()
return True
else:

View File

@ -71,7 +71,7 @@ class ExtensionBuilder:
app
)->LOLLMSExtension:
extension, script_path = self.getBinding(extension_path, lollms_paths, app)
extension, script_path = self.getExtension(extension_path, lollms_paths, app)
return extension(
extension_path.split[1],
script_path,
@ -86,7 +86,7 @@ class ExtensionBuilder:
app
)->LOLLMSExtension:
extension_path = lollms_paths.bindings_zoo_path / extension_path
extension_path = lollms_paths.extensions_zoo_path / extension_path
# define the full absolute path to the module
absolute_path = extension_path.resolve()

View File

@ -26,7 +26,7 @@ def get_all_files(path):
setuptools.setup(
name="lollms",
version="5.7.7",
version="5.7.8",
author="Saifeddine ALOUI",
author_email="aloui.saifeddine@gmail.com",
description="A python library for AI personality definition",