Save redis memory state, with the default being to wipe on start still.

This commit is contained in:
BillSchumacher
2023-04-07 00:48:27 -05:00
parent 5a1d9e6d0a
commit cce79695fa
2 changed files with 11 additions and 4 deletions

View File

@@ -64,8 +64,9 @@ class Config(metaclass=Singleton):
self.redis_host = os.getenv("REDIS_HOST")
self.redis_port = os.getenv("REDIS_PORT")
self.redis_password = os.getenv("REDIS_PASSWORD")
self.wipe_redis_on_start = os.getenv("WIPE_REDIS_ON_START", "True") == 'True'
# Note that indexes must be created on db 0 in redis, this is not configureable.
self.memory_backend = os.getenv("MEMORY_BACKEND", 'pinecone')
# Initialize the OpenAI API client
openai.api_key = self.openai_api_key