mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-01-21 03:55:01 +00:00
fixed translation
This commit is contained in:
parent
7c74f6a6c8
commit
21384fc34b
@ -590,8 +590,8 @@ class LollmsApplication(LoLLMsCom):
|
||||
if not language_path.exists():
|
||||
self.ShowBlockingMessage(f"This is the first time this personality speaks {language}\nLollms is reconditionning the persona in that language.\nThis will be done just once. Next time, the personality will speak {language} out of the box")
|
||||
language_path.parent.mkdir(exist_ok=True, parents=True)
|
||||
conditionning = "!@>system: "+self.personality.fast_gen(f"!@>instruction: Translate the following text to {language}:\n{self.personality.personality_conditioning.replace('!@>system:','')}\n!@>translation:\n")
|
||||
welcome_message = self.personality.fast_gen(f"!@>instruction: Translate the following text to {language}:\n{self.personality.welcome_message}\n!@>translation:\n")
|
||||
conditionning = "!@>system: "+self.personality.fast_gen(f"!@>instruction: Translate the following text to {language}:\n{self.personality.personality_conditioning.replace('!@>system:','')}\n!@>translation:\n", callback=self.personality.sink)
|
||||
welcome_message = self.personality.fast_gen(f"!@>instruction: Translate the following text to {language}:\n{self.personality.welcome_message}\n!@>translation:\n", callback=self.personality.sink)
|
||||
with open(language_path,"w",encoding="utf-8", errors="ignore") as f:
|
||||
yaml.safe_dump({"conditionning":conditionning,"welcome_message":welcome_message}, f)
|
||||
self.HideBlockingMessage()
|
||||
@ -659,10 +659,10 @@ class LollmsApplication(LoLLMsCom):
|
||||
if self.config.current_language and current_language!= default_language:
|
||||
language_path = self.lollms_paths.personal_configuration_path/"personalities"/self.personality.name/f"languages_{current_language}.yaml"
|
||||
if not language_path.exists():
|
||||
self.info(f"This is the first time this personality pseaks {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")
|
||||
self.info(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: "+self.personality.fast_gen(f"!@>instruction: Translate the following text to {current_language}:\n{self.personality.personality_conditioning.replace('!@>system:','')}\n!@>translation:\n")
|
||||
welcome_message = self.personality.fast_gen(f"!@>instruction: Translate the following text to {current_language}:\n{self.personality.welcome_message}\n!@>translation:\n")
|
||||
conditionning = "!@>system: "+self.personality.fast_gen(f"!@>instruction: Translate the following text to {current_language}:\n{self.personality.personality_conditioning.replace('!@>system:','')}\n!@>translation:\n", callback=self.personality.sink)
|
||||
welcome_message = self.personality.fast_gen(f"!@>instruction: Translate the following text to {current_language}:\n{self.personality.welcome_message}\n!@>translation:\n", callback=self.personality.sink)
|
||||
with open(language_path,"w",encoding="utf-8", errors="ignore") as f:
|
||||
yaml.safe_dump({"conditionning":conditionning,"welcome_message":welcome_message}, f)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user