redis cache
This commit is contained in:
@@ -8,6 +8,8 @@ import json
|
||||
import psycopg2
|
||||
import pymongo
|
||||
|
||||
import redis_conn
|
||||
|
||||
count = 0
|
||||
|
||||
def retrieve_file_contents(path):
|
||||
@@ -101,7 +103,10 @@ def add_files():
|
||||
def prompt_cycle():
|
||||
while True:
|
||||
prompt = input("Please enter prompt: ")
|
||||
lib.prompt_embedding(prompt)
|
||||
|
||||
response = redis_conn.load_response_from_redis(prompt.lower().strip())
|
||||
|
||||
lib.prompt_embedding(prompt) if response is None else print("Cached Response:", response)
|
||||
|
||||
|
||||
def get_user_action():
|
||||
|
||||
Reference in New Issue
Block a user