mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-20 21:54:31 +01:00
fixes "Error: content" when calling write_to_file command
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user