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.

fixes "Error: content" when calling write_to_file command

Torantulino2a8f6abce8e4
diff --git a/AutonomousAI/commands.py b/AutonomousAI/commands.py
index 5bde01adf9..92a8453b90 100644
--- a/AutonomousAI/commands.py
+++ b/AutonomousAI/commands.py
@@ -127,10 +127,10 @@ def overwrite_memory(key, string):
print("Invalid key, cannot overwrite memory.")
return None
-def write_to_file(filename, content):
+def write_to_file(filename, text):
try:
f = open(filename, "w")
- f.write(content)
+ f.write(text)
f.close()
except Exception as e:
return "Error: " + str(e)