Spaces:
Sleeping
Sleeping
andreasmartin
commited on
Update
Browse files
faq.py
CHANGED
@@ -15,7 +15,7 @@ EMBEDDING_MODEL_FOLDER = ".embedding-model"
|
|
15 |
VECTORDB_FOLDER = ".vectordb"
|
16 |
EMBEDDING_MODEL = "sentence-transformers/all-mpnet-base-v2"
|
17 |
VECTORDB_TYPES = Enum("VECTORDB_TYPES", ["AwaDB", "Chroma"])
|
18 |
-
VECTORDB_TYPE = VECTORDB_TYPES.
|
19 |
|
20 |
|
21 |
def create_documents(df: pd.DataFrame, page_content_column: str) -> pd.DataFrame:
|
@@ -121,5 +121,8 @@ def delete_vectordb() -> None:
|
|
121 |
|
122 |
|
123 |
def delete_vectordb_current_collection(vectordb: VectorStore) -> None:
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
15 |
VECTORDB_FOLDER = ".vectordb"
|
16 |
EMBEDDING_MODEL = "sentence-transformers/all-mpnet-base-v2"
|
17 |
VECTORDB_TYPES = Enum("VECTORDB_TYPES", ["AwaDB", "Chroma"])
|
18 |
+
VECTORDB_TYPE = VECTORDB_TYPES.Chroma
|
19 |
|
20 |
|
21 |
def create_documents(df: pd.DataFrame, page_content_column: str) -> pd.DataFrame:
|
|
|
121 |
|
122 |
|
123 |
def delete_vectordb_current_collection(vectordb: VectorStore) -> None:
|
124 |
+
if VECTORDB_TYPE is VECTORDB_TYPES.Chroma:
|
125 |
+
vectordb.delete_collection()
|
126 |
+
vectordb.persist()
|
127 |
+
if VECTORDB_TYPE is VECTORDB_TYPES.AwaDB:
|
128 |
+
delete_vectordb()
|