Commit 5d4ff852 authored by Firat Birlik's avatar Firat Birlik
Browse files

recreate rag collection instead of falling back to stale version

parent eb51ad14
......@@ -118,6 +118,10 @@ def store_data_in_vector_db(data, collection_name) -> bool:
metadatas = [doc.metadata for doc in docs]
try:
for collection in CHROMA_CLIENT.list_collections():
if collection_name == collection.name:
CHROMA_CLIENT.delete_collection(name=collection_name)
collection = CHROMA_CLIENT.create_collection(
name=collection_name,
embedding_function=app.state.sentence_transformer_ef,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment