mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-18 20:27:58 +00:00
updated
This commit is contained in:
parent
0d63516549
commit
dbf4146300
@ -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:
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user