This commit is contained in:
Saifeddine ALOUI 2023-06-14 23:51:07 +02:00
parent 5cbf46cf4e
commit 98c51e7388
5 changed files with 12 additions and 7 deletions

@ -1 +1 @@
Subproject commit 14c7cf244b1a78ea57e74370f46bd53f14b4e402 Subproject commit bd57a015b866bd6e250383eaa3467c3954a86a2f

View File

@ -150,13 +150,15 @@ class MainMenu:
if 1 <= choice <= len(personality_languages)-1: if 1 <= choice <= len(personality_languages)-1:
language = personality_languages[choice - 1] language = personality_languages[choice - 1]
print(f"You selected language: {ASCIIColors.color_green}{language}{ASCIIColors.color_reset}") print(f"You selected language: {ASCIIColors.color_green}{language}{ASCIIColors.color_reset}")
personality_categories = [p.stem for p in (self.conversation.lollms_paths.personalities_zoo_path/language).iterdir() if p.is_dir()]+["Back"] personality_categories = [p.stem for p in (self.conversation.lollms_paths.personalities_zoo_path/language).iterdir() if p.is_dir()]+["Custom","Back"]
print("Select category") print("Select category")
choice = self.show_menu(personality_categories) choice = self.show_menu(personality_categories)
if 1 <= choice <= len(personality_categories): if 1 <= choice <= len(personality_categories)-1:
category = personality_categories[choice - 1] category = personality_categories[choice - 1]
print(f"You selected category: {ASCIIColors.color_green}{category}{ASCIIColors.color_reset}") print(f"You selected category: {ASCIIColors.color_green}{category}{ASCIIColors.color_reset}")
if category=="Custom":
personality_names = [p.stem for p in self.conversation.lollms_paths.personal_personalities_path.iterdir() if p.is_dir()]+["Back"]
else:
personality_names = [p.stem for p in (self.conversation.lollms_paths.personalities_zoo_path/language/category).iterdir() if p.is_dir()]+["Back"] personality_names = [p.stem for p in (self.conversation.lollms_paths.personalities_zoo_path/language/category).iterdir() if p.is_dir()]+["Back"]
print("Select personality") print("Select personality")
choice = self.show_menu(personality_names) choice = self.show_menu(personality_names)

View File

@ -33,6 +33,8 @@ class LollmsPaths:
self.personal_data_path = personal_path / "data" self.personal_data_path = personal_path / "data"
self.personal_databases_path = personal_path / "databases" self.personal_databases_path = personal_path / "databases"
self.personal_models_path = personal_path / "models" self.personal_models_path = personal_path / "models"
self.personal_personalities_path = lollms_path / "personalities"
self.create_directories() self.create_directories()
self.copy_default_config() self.copy_default_config()
@ -46,6 +48,7 @@ class LollmsPaths:
self.personal_models_path.mkdir(parents=True, exist_ok=True) self.personal_models_path.mkdir(parents=True, exist_ok=True)
self.personal_data_path.mkdir(parents=True, exist_ok=True) self.personal_data_path.mkdir(parents=True, exist_ok=True)
self.personal_databases_path.mkdir(parents=True, exist_ok=True) self.personal_databases_path.mkdir(parents=True, exist_ok=True)
self.personal_personalities_path.mkdir(parents=True, exist_ok=True)
def copy_default_config(self): def copy_default_config(self):

@ -1 +1 @@
Subproject commit 097acadb9e22d5289aa597c1c5071b5c551c5e34 Subproject commit 94fa750d6d33e33233fdcfe6e925a28e1b13bbed

View File

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