From 2a8f6abce8e40d4c463d7634ad0f1fda53820266 Mon Sep 17 00:00:00 2001 From: Torantulino Date: Thu, 30 Mar 2023 12:50:21 +0100 Subject: [PATCH] fixes "Error: content" when calling write_to_file command --- AutonomousAI/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AutonomousAI/commands.py b/AutonomousAI/commands.py index 5bde01adf..92a8453b9 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)