mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-24 06:46:40 +00:00
bugfix
This commit is contained in:
parent
f46463b57a
commit
9fe9d4e9c7
@ -95,8 +95,8 @@ class LOLLMSConfig(BaseConfig):
|
||||
cfg_path = config_path
|
||||
|
||||
if cfg_path.exists():
|
||||
original_config = LOLLMSConfig(original_cfg_path,lollms_paths)
|
||||
config = LOLLMSConfig(cfg_path,lollms_paths)
|
||||
original_config = LOLLMSConfig(original_cfg_path, lollms_paths)
|
||||
config = LOLLMSConfig(cfg_path, lollms_paths)
|
||||
if "version" not in config or int(config["version"])<int(original_config["version"]):
|
||||
#Upgrade old configuration files to new format
|
||||
ASCIIColors.error("Configuration file is very old.\nReplacing with default configuration")
|
||||
@ -104,7 +104,7 @@ class LOLLMSConfig(BaseConfig):
|
||||
print(f"Added entries : {added}, removed entries:{removed}")
|
||||
config.save_config(cfg_path)
|
||||
else:
|
||||
config = LOLLMSConfig()
|
||||
config = LOLLMSConfig(lollms_paths=lollms_paths)
|
||||
|
||||
return config
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Settings:
|
||||
shutil.copy(original, local)
|
||||
self.cfg_path = local
|
||||
|
||||
self.config = LOLLMSConfig(self.cfg_path)
|
||||
self.config = LOLLMSConfig(self.cfg_path, self.lollms_paths)
|
||||
# load binding
|
||||
self.load_binding()
|
||||
|
||||
@ -105,7 +105,7 @@ class Settings:
|
||||
if Path(file_name).is_absolute():
|
||||
self.log_file_path = Path(file_name)
|
||||
else:
|
||||
home_dir = Path.home()/"Documents/lollms/logs"
|
||||
home_dir = self.lollms_paths.personal_path/"logs"
|
||||
home_dir.mkdir(parents=True, exist_ok=True)
|
||||
self.log_file_path = home_dir/file_name
|
||||
if self.log_file_path.exists():
|
||||
|
Loading…
Reference in New Issue
Block a user