set fixed utf-8 encoding for llm history log

This commit is contained in:
muravvv 2025-05-28 12:29:02 +03:00
parent 484b8a3603
commit 395188043b

View file

@ -749,7 +749,7 @@ class InputOutput:
if not self.llm_history_file:
return
timestamp = datetime.now().isoformat(timespec="seconds")
with open(self.llm_history_file, "a", encoding=self.encoding) as log_file:
with open(self.llm_history_file, "a", encoding="utf-8") as log_file:
log_file.write(f"{role.upper()} {timestamp}\n")
log_file.write(content + "\n")