andreasmartin commited on
Commit
1435c22
·
unverified ·
1 Parent(s): 91bb24e
Files changed (1) hide show
  1. faq.py +6 -3
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.AwaDB
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
- vectordb.delete_collection()
125
- vectordb.persist()
 
 
 
 
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()