mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-02-01 08:48:19 +00:00
added personality language selection
This commit is contained in:
parent
ed4da43b8b
commit
0582fb3d01
@ -1,5 +1,5 @@
|
||||
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
|
||||
version: 87
|
||||
version: 88
|
||||
binding_name: null
|
||||
model_name: null
|
||||
model_variant: null
|
||||
@ -178,7 +178,7 @@ pdf_latex_path: null
|
||||
# boosting information
|
||||
positive_boost: null
|
||||
negative_boost: null
|
||||
current_language: null
|
||||
current_language: english
|
||||
fun_mode: false
|
||||
|
||||
|
||||
|
@ -562,9 +562,7 @@ class LollmsApplication(LoLLMsCom):
|
||||
languages_dir = self.lollms_paths.personal_configuration_path / "personalities" / self.personality.name
|
||||
default_language = self.personality.language.lower().strip().split()[0]
|
||||
# Vérifier si le dossier existe
|
||||
if not languages_dir.exists():
|
||||
print(f"Le dossier {languages_dir} n'existe pas.")
|
||||
return languages
|
||||
languages_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Itérer sur chaque fichier YAML dans le dossier
|
||||
for language_file in languages_dir.glob("languages_*.yaml"):
|
||||
|
@ -1,5 +1,5 @@
|
||||
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
|
||||
version: 87
|
||||
version: 88
|
||||
binding_name: null
|
||||
model_name: null
|
||||
model_variant: null
|
||||
@ -178,7 +178,7 @@ pdf_latex_path: null
|
||||
# boosting information
|
||||
positive_boost: null
|
||||
negative_boost: null
|
||||
current_language: null
|
||||
current_language: english
|
||||
fun_mode: false
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
|
||||
version: 87
|
||||
version: 88
|
||||
binding_name: null
|
||||
model_name: null
|
||||
model_variant: null
|
||||
@ -178,7 +178,7 @@ pdf_latex_path: null
|
||||
# boosting information
|
||||
positive_boost: null
|
||||
negative_boost: null
|
||||
current_language: null
|
||||
current_language: english
|
||||
fun_mode: false
|
||||
|
||||
|
||||
|
@ -567,7 +567,15 @@ def select_personality(data:PersonalitySelectionInfos):
|
||||
if lollmsElfServer.personality.processor:
|
||||
lollmsElfServer.personality.processor.selected()
|
||||
ASCIIColors.success("ok")
|
||||
|
||||
print(f"Selected {lollmsElfServer.personality.name}")
|
||||
|
||||
language = lollmsElfServer.config.current_language
|
||||
default_language = lollmsElfServer.personality.language.lower().strip().split()[0]
|
||||
|
||||
if language != default_language:
|
||||
lollmsElfServer.set_personality_language(language)
|
||||
|
||||
if lollmsElfServer.config.auto_save:
|
||||
ASCIIColors.info("Saving configuration")
|
||||
lollmsElfServer.config.save_config()
|
||||
|
Loading…
x
Reference in New Issue
Block a user