mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-19 06:54:22 +01:00
Import NoMemory and add it as a memory_backend option in get_memory function
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
from memory.local import LocalCache
|
from memory.local import LocalCache
|
||||||
|
from memory.no_memory import NoMemory
|
||||||
|
|
||||||
# List of supported memory backends
|
# List of supported memory backends
|
||||||
# Add a backend to this list if the import attempt is successful
|
# Add a backend to this list if the import attempt is successful
|
||||||
@@ -34,6 +35,8 @@ def get_memory(cfg, init=False):
|
|||||||
" use Redis as a memory backend.")
|
" use Redis as a memory backend.")
|
||||||
else:
|
else:
|
||||||
memory = RedisMemory(cfg)
|
memory = RedisMemory(cfg)
|
||||||
|
elif cfg.memory_backend == "no_memory":
|
||||||
|
memory = NoMemory(cfg)
|
||||||
|
|
||||||
if memory is None:
|
if memory is None:
|
||||||
memory = LocalCache(cfg)
|
memory = LocalCache(cfg)
|
||||||
@@ -50,4 +53,5 @@ __all__ = [
|
|||||||
"LocalCache",
|
"LocalCache",
|
||||||
"RedisMemory",
|
"RedisMemory",
|
||||||
"PineconeMemory",
|
"PineconeMemory",
|
||||||
|
"NoMemory"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user