From 65979cd6ae92fb525380603d076e8d60b561e52a Mon Sep 17 00:00:00 2001 From: InfernalDread <128119326+InfernalDread@users.noreply.github.com> Date: Sat, 15 Mar 2025 13:40:19 -0400 Subject: [PATCH] Update agent.py to fix decode error This is to fix a decode error that happens when running under a Windows 10 machine. --- sources/agents/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/agents/agent.py b/sources/agents/agent.py index af2559a..9e15b8b 100644 --- a/sources/agents/agent.py +++ b/sources/agents/agent.py @@ -58,7 +58,7 @@ class Agent(): def load_prompt(self, file_path: str) -> str: try: - with open(file_path, 'r') as f: + with open(file_path, 'r', encoding="utf-8") as f: return f.read() except FileNotFoundError: raise FileNotFoundError(f"Prompt file not found at path: {file_path}")