Create an abstract MemoryProviderSingleton class. Pass config instead of instantiating a new one where used.

This commit is contained in:
BillSchumacher
2023-04-06 22:25:17 -05:00
parent 3f106963a8
commit 6819799ebe
7 changed files with 48 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
import json
import random
import commands as cmd
from memory import PineconeMemory
from memory.pinecone import PineconeMemory
import data
import chat
from colorama import Fore, Style
@@ -283,7 +283,7 @@ 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()
memory = PineconeMemory(cfg)
memory.clear()
print('Using memory of type: ' + memory.__class__.__name__)