mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
Implement redis memory backend.
This commit is contained in:
@@ -2,6 +2,7 @@ import json
|
||||
import random
|
||||
import commands as cmd
|
||||
from memory.pinecone import PineconeMemory
|
||||
from memory.redismem import RedisMemory
|
||||
import data
|
||||
import chat
|
||||
from colorama import Fore, Style
|
||||
@@ -283,8 +284,11 @@ user_input = "Determine which next command to use, and respond using the format
|
||||
|
||||
# Initialize memory and make sure it is empty.
|
||||
# this is particularly important for indexing and referencing pinecone memory
|
||||
memory = PineconeMemory(cfg)
|
||||
memory.clear()
|
||||
if cfg.memory_backend == "pinecone":
|
||||
memory = PineconeMemory(cfg)
|
||||
memory.clear()
|
||||
else:
|
||||
memory = RedisMemory(cfg)
|
||||
|
||||
print('Using memory of type: ' + memory.__class__.__name__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user