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.

the three memory related commands memory_add, memory_del, memory_ovr are absent in the latest version of execute_command therefore the corresponding handlers commit_memory, delete_memory and overwrite_memory have been removed also because they assume a memory with a different interface than the proposed one.

cs0lar0ce0c553a604
diff --git a/scripts/commands.py b/scripts/commands.py
index 13037c3437..117f0e9df4 100644
--- a/scripts/commands.py
+++ b/scripts/commands.py
@@ -182,49 +182,6 @@ def get_hyperlinks(url):
return link_list
-def commit_memory(string):
- _text = f"""Committing memory with string "{string}" """
- mem.permanent_memory.append(string)
- return _text
-
-
-def delete_memory(key):
- if key >= 0 and key < len(mem.permanent_memory):
- _text = "Deleting memory with key " + str(key)
- del mem.permanent_memory[key]
- print(_text)
- return _text
- else:
- print("Invalid key, cannot delete memory.")
- return None
-
-
-def overwrite_memory(key, string):
- # Check if the key is a valid integer
- if is_valid_int(key):
- key_int = int(key)
- # Check if the integer key is within the range of the permanent_memory list
- if 0 <= key_int < len(mem.permanent_memory):
- _text = "Overwriting memory with key " + str(key) + " and string " + string
- # Overwrite the memory slot with the given integer key and string
- mem.permanent_memory[key_int] = string
- print(_text)
- return _text
- else:
- print(f"Invalid key '{key}', out of range.")
- return None
- # Check if the key is a valid string
- elif isinstance(key, str):
- _text = "Overwriting memory with key " + key + " and string " + string
- # Overwrite the memory slot with the given string key and string
- mem.permanent_memory[key] = string
- print(_text)
- return _text
- else:
- print(f"Invalid key '{key}', must be an integer or a string.")
- return None
-
-
def shutdown():
print("Shutting down...")
quit()