Upgraded binding

This commit is contained in:
Saifeddine ALOUI 2023-12-10 22:24:03 +01:00
parent 54591d660a
commit 35a00a1514
4 changed files with 6 additions and 6 deletions

View File

@ -308,7 +308,7 @@ class LollmsApplication(LoLLMsCom):
self.info("Trying to reinstall binding")
trace_exception(ex)
try:
binding = BindingBuilder().build_binding(self.config, self.lollms_paths,installation_option=InstallOption.FORCE_INSTALL, app=self)
binding = BindingBuilder().build_binding(self.config, self.lollms_paths,installation_option=InstallOption.FORCE_INSTALL, lollmsCom=self)
except Exception as ex:
self.error("Couldn't reinstall binding")
trace_exception(ex)

View File

@ -215,7 +215,7 @@ class LoLLMsServer(LollmsApplication):
for per in self.mounted_personalities:
per.model = None
gc.collect()
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths, app=self)
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths, lollmsCom=self)
self.model = self.binding.build_model()
for per in self.mounted_personalities:
per.model = self.model

View File

@ -226,13 +226,13 @@ def main():
if args.install_binding:
settings_app.config.binding_name= args.install_binding
settings_app.binding = BindingBuilder().build_binding(settings_app.config, settings_app.lollms_paths,InstallOption.FORCE_INSTALL, app=settings_app)
settings_app.binding = BindingBuilder().build_binding(settings_app.config, settings_app.lollms_paths,InstallOption.FORCE_INSTALL, lollmsCom=settings_app)
settings_app.config.save_config()
if args.install_model:
if not settings_app.binding:
settings_app.binding = BindingBuilder().build_binding(settings_app.config, settings_app.lollms_paths,InstallOption.FORCE_INSTALL, app=settings_app)
settings_app.binding = BindingBuilder().build_binding(settings_app.config, settings_app.lollms_paths,InstallOption.FORCE_INSTALL, lollmsCom=settings_app)
def progress_callback(blocks, block_size, total_size):
tqdm_bar.total=total_size
@ -249,7 +249,7 @@ def main():
if args.select_model:
settings_app.config.model_name = args.select_model
if not settings_app.binding:
settings_app.binding = BindingBuilder().build_binding(settings_app.config, settings_app.lollms_paths,InstallOption.FORCE_INSTALL, app=settings_app)
settings_app.binding = BindingBuilder().build_binding(settings_app.config, settings_app.lollms_paths,InstallOption.FORCE_INSTALL, lollmsCom=settings_app)
settings_app.model = settings_app.binding.build_model()
settings_app.config.save_config()

View File

@ -425,7 +425,7 @@ class MainMenu(Menu):
self.lollms_app.config['binding_name']=self.binding_infs[choice - 1]['name']
try:
lollms_app.binding = BindingBuilder().build_binding(lollms_app.config, lollms_app.lollms_paths,InstallOption.FORCE_INSTALL, app=self)
lollms_app.binding = BindingBuilder().build_binding(lollms_app.config, lollms_app.lollms_paths,InstallOption.FORCE_INSTALL, lollmsCom=self)
except Exception as ex:
print(ex)
print(f"Couldn't find binding. Please verify your configuration file at {lollms_app.config.file_path} or use the next menu to select a valid binding")