mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-04-08 03:14:13 +00:00
upgraded
This commit is contained in:
parent
6917c4427e
commit
71184871e2
@ -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.
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit dc6d1eab85b1236ed25c320ce5df93de5a7d21b4
|
||||
Subproject commit 17b672f71e91af7ef441402510331935df4743a6
|
@ -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:
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit c3eca2e574f174c47749ccc02fa26aca8b3f0ca2
|
||||
Subproject commit 25fdbb84a84cd64699fa01dc97aab4ede0d2b950
|
Loading…
x
Reference in New Issue
Block a user