Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Resolving Unicode encoding issues

莫尔索5e6d0b620a58
diff --git a/scripts/ai_config.py b/scripts/ai_config.py
index 4eb076ef2d..89a4e07eaa 100644
--- a/scripts/ai_config.py
+++ b/scripts/ai_config.py
@@ -70,8 +70,8 @@ class AIConfig:
"""
config = {"ai_name": self.ai_name, "ai_role": self.ai_role, "ai_goals": self.ai_goals}
- with open(config_file, "w") as file:
- yaml.dump(config, file)
+ with open(config_file, "w", encoding='utf-8') as file:
+ yaml.dump(config, file, allow_unicode=True)
def construct_full_prompt(self) -> str:
"""