diff --git a/lollms/binding.py b/lollms/binding.py index 294ebfa..14e790c 100644 --- a/lollms/binding.py +++ b/lollms/binding.py @@ -44,7 +44,7 @@ class LLMBinding: self.config = config self.binding_config = binding_config self.file_extension = file_extension - + self.seed = config["seed"] self.configuration_file_path = lollms_paths.personal_configuration_path/f"binding_{self.binding_folder_name}.yaml" self.binding_config.config.file_path = self.configuration_file_path @@ -97,7 +97,9 @@ class LLMBinding: return model_path - + def get_current_seed(self): + return self.seed + def load_binding_config(self): """ Load the content of local_config.yaml file. diff --git a/lollms/bindings_zoo b/lollms/bindings_zoo index dc6d1ea..17b672f 160000 --- a/lollms/bindings_zoo +++ b/lollms/bindings_zoo @@ -1 +1 @@ -Subproject commit dc6d1eab85b1236ed25c320ce5df93de5a7d21b4 +Subproject commit 17b672f71e91af7ef441402510331935df4743a6 diff --git a/lollms/config.py b/lollms/config.py index fac3f33..22be9d2 100644 --- a/lollms/config.py +++ b/lollms/config.py @@ -239,11 +239,11 @@ class BaseConfig: self.file_path = file_path @staticmethod - def from_template(template:ConfigTemplate, exceptional_keys: list = []): + def from_template(template:ConfigTemplate, exceptional_keys: list = [], file_path: Path | str = None): config = {} for entry in template.template: config[entry["name"]]=entry["value"] - return BaseConfig(exceptional_keys, config) + return BaseConfig(exceptional_keys, config, file_path) def to_dict(self): """ @@ -419,6 +419,10 @@ class TypedConfig: # Fill the template values from the config values self.sync() + + def update_template(self, new_template): + self.config_template.template = new_template + self.config = BaseConfig.from_template(self.config_template,self.config.exceptional_keys, self.config.file_path) def get(self, key, default_value=None): if self.config is None: diff --git a/lollms/personalities_zoo b/lollms/personalities_zoo index c3eca2e..25fdbb8 160000 --- a/lollms/personalities_zoo +++ b/lollms/personalities_zoo @@ -1 +1 @@ -Subproject commit c3eca2e574f174c47749ccc02fa26aca8b3f0ca2 +Subproject commit 25fdbb84a84cd64699fa01dc97aab4ede0d2b950 diff --git a/setup.py b/setup.py index 9537e93..9145425 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def get_all_files(path): setuptools.setup( name="lollms", - version="2.0.8", + version="2.0.10", author="Saifeddine ALOUI", author_email="aloui.saifeddine@gmail.com", description="A python library for AI personality definition",