Update lollms_personalities_infos.py

This commit is contained in:
Saifeddine ALOUI 2024-02-08 11:24:11 +01:00 committed by GitHub
parent 2769acff3b
commit 43b347b308
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,6 +85,7 @@ def get_all_personalities():
scripts_path = personality_folder / 'scripts'
personality_info['has_scripts'] = scripts_path.exists()
with open(config_path) as config_file:
try:
config_data = yaml.load(config_file, Loader=yaml.FullLoader)
personality_info['name'] = config_data.get('name',"No Name")
personality_info['description'] = config_data.get('personality_description',"")
@ -95,7 +96,8 @@ def get_all_personalities():
personality_info['installed'] = (lollmsElfServer.lollms_paths.personal_configuration_path/f"personality_{personality_folder.stem}.yaml").exists() or personality_info['has_scripts']
personality_info['help'] = config_data.get('help', '')
personality_info['commands'] = config_data.get('commands', '')
except Exception as ex:
trace_exception(ex)
languages_path = personality_folder/ 'languages'
real_assets_path = personality_folder/ 'assets'