upgraded lollms

This commit is contained in:
Saifeddine ALOUI 2023-07-19 19:40:50 +02:00
parent 4033e39935
commit fb226cfbbd
3 changed files with 6 additions and 4 deletions

View File

@ -46,6 +46,7 @@ class LollmsApplication:
except Exception as ex:
ASCIIColors.error(f"Failed to load binding.\nReturned exception: {ex}")
trace_exception(ex)
self.binding = None
if self.binding is not None:
ASCIIColors.success(f"Binding {self.config.binding_name} loaded successfully.")
@ -74,17 +75,18 @@ class LollmsApplication:
def load_binding(self):
try:
binding = BindingBuilder().build_binding(self.config, self.lollms_paths)
return binding
except Exception as ex:
print(ex)
print(f"Couldn't find binding. Please verify your configuration file at {self.configuration_path} or use the next menu to select a valid binding")
print(f"Couldn't find binding. Please verify your configuration file at {self.lollms_paths.personal_configuration_path}/local_configs.yaml or use the next menu to select a valid binding")
print(f"Trying to reinstall binding")
try:
binding = BindingBuilder().build_binding(self.config, self.lollms_paths,installation_option=InstallOption.FORCE_INSTALL)
except Exception as ex:
ASCIIColors.error("Couldn't reinstall model")
trace_exception(ex)
return None
return binding
def load_model(self):
try:

View File

@ -232,7 +232,7 @@ class MainMenu(Menu):
if 1 <= choice <= len(bindings_list)-1:
print(f"You selected binding: {ASCIIColors.color_green}{self.binding_infs[choice - 1]['name']}{ASCIIColors.color_reset}")
self.lollms_app.config['binding_name']=self.binding_infs[choice - 1]['name']
self.lollms_app.load_binding()
self.lollms_app.binding = self.lollms_app.load_binding()
self.lollms_app.config['model_name']=None
self.lollms_app.config.save_config()
elif choice <= len(bindings_list):

View File

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