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