enhanced encoding

This commit is contained in:
saloui 2023-07-04 11:29:25 +02:00
parent 7544c3a454
commit 6378bcc650
3 changed files with 3 additions and 5 deletions

View File

@ -122,8 +122,6 @@ Participating personalities:
def stop_log(self): def stop_log(self):
self.is_logging = False self.is_logging = False
def reset_context(self): def reset_context(self):
if self.personality.include_welcome_message_in_disucssion: if self.personality.include_welcome_message_in_disucssion:
full_discussion = ( full_discussion = (

View File

@ -180,12 +180,12 @@ Date: {{date}}
if not config_file.exists(): if not config_file.exists():
raise ValueError(f"The provided folder {package_path} does not exist.") raise ValueError(f"The provided folder {package_path} does not exist.")
with open(config_file, "r") as f: with open(config_file, "r", encoding='utf-8') as f:
config = yaml.safe_load(f) config = yaml.safe_load(f)
secret_file = package_path / "secret.yaml" secret_file = package_path / "secret.yaml"
if secret_file.exists(): if secret_file.exists():
with open(secret_file, "r") as f: with open(secret_file, "r", encoding='utf-8') as f:
self._secret_cfg = yaml.safe_load(f) self._secret_cfg = yaml.safe_load(f)
else: else:
self._secret_cfg = None self._secret_cfg = None

View File

@ -26,7 +26,7 @@ def get_all_files(path):
setuptools.setup( setuptools.setup(
name="lollms", name="lollms",
version="2.1.17", version="2.1.18",
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",