resolved latest conflicts

This commit is contained in:
cs0lar
2023-04-12 19:54:56 +01:00
14 changed files with 316 additions and 116 deletions

View File

@@ -1,12 +1,19 @@
from memory.local import LocalCache
# List of supported memory backends
# Add a backend to this list if the import attempt is successful
supported_memory = ['local']
try:
from memory.redismem import RedisMemory
supported_memory.append('redis')
except ImportError:
print("Redis not installed. Skipping import.")
RedisMemory = None
try:
from memory.pinecone import PineconeMemory
supported_memory.append('pinecone')
except ImportError:
print("Pinecone not installed. Skipping import.")
PineconeMemory = None
@@ -46,6 +53,8 @@ def get_memory(cfg, init=False):
memory.clear()
return memory
def get_supported_memory_backends():
return supported_memory
__all__ = [
"get_memory",