auto flush databases

This commit is contained in:
Jonas Braus
2024-12-12 13:21:43 +01:00
parent 948210d73c
commit ed5090110c
4 changed files with 33 additions and 2 deletions
+9 -1
View File
@@ -8,6 +8,8 @@ import json
import psycopg2
import pymongo
import mongo_conn
import pgvec_conn
import redis_conn
count = 0
@@ -91,7 +93,13 @@ def insert_data_mongo(id, filepath,pChunk):
def reload_files():
# path = input("Please provider path to folder: ")
contents = retrieve_file_contents("C:\\SoftwareEng")
pgvec_conn.flush_pg()
redis_conn.flush_redis()
mongo_conn.flush_mongo()
provided_path = input("Please Provide Full Qualified Path: ")
contents = retrieve_file_contents(provided_path)
create_embeddings(contents)