Update agent.py to fix decode error

This is to fix a decode error that happens when running under a Windows 10 machine.
This commit is contained in:
InfernalDread
2025-03-15 13:40:19 -04:00
committed by GitHub
parent ca6211c774
commit 65979cd6ae
+1 -1
View File
@@ -58,7 +58,7 @@ class Agent():
def load_prompt(self, file_path: str) -> str: def load_prompt(self, file_path: str) -> str:
try: try:
with open(file_path, 'r') as f: with open(file_path, 'r', encoding="utf-8") as f:
return f.read() return f.read()
except FileNotFoundError: except FileNotFoundError:
raise FileNotFoundError(f"Prompt file not found at path: {file_path}") raise FileNotFoundError(f"Prompt file not found at path: {file_path}")