diff --git a/events/lollms_discussion_events.py b/events/lollms_discussion_events.py index 81c2ecad..c40093f0 100644 --- a/events/lollms_discussion_events.py +++ b/events/lollms_discussion_events.py @@ -73,8 +73,11 @@ def add_events(sio:socketio): if not language_path.exists(): lollmsElfServer.ShowBlockingMessage(f"This is the first time this personality speaks {current_language}\nLollms is reconditionning the persona in that language.\nThis will be done just once. Next time, the personality will speak {current_language} out of the box") language_path.parent.mkdir(exist_ok=True, parents=True) - conditionning = "!@>system: "+lollmsElfServer.personality.fast_gen(f"!@>instruction: Translate the following text to {current_language}:\n{lollmsElfServer.personality.personality_conditioning.replace('!@>system:','')}\n!@>translation:\n", callback=lollmsElfServer.personality.sink) - welcome_message = lollmsElfServer.personality.fast_gen(f"!@>instruction: Translate the following text to {current_language}:\n{lollmsElfServer.personality.welcome_message}\n!@>translation:\n", callback=lollmsElfServer.personality.sink) + + conditionning = lollmsElfServer.tasks_library.translate_conditionning(lollmsElfServer.personality._personality_conditioning, lollmsElfServer.personality.language, current_language) + welcome_message = lollmsElfServer.tasks_library.translate_message(lollmsElfServer.personality.welcome_message, lollmsElfServer.personality.language, current_language) + + with open(language_path,"w",encoding="utf-8", errors="ignore") as f: yaml.safe_dump({"conditionning":conditionning,"welcome_message":welcome_message}, f) lollmsElfServer.HideBlockingMessage() diff --git a/lollms_core b/lollms_core index 87e4580d..c5dd6073 160000 --- a/lollms_core +++ b/lollms_core @@ -1 +1 @@ -Subproject commit 87e4580d244409308ca56a2f40a1439a1822fa58 +Subproject commit c5dd60732def7a91f7cf97c905c08cd5eef8a099