diff --git a/document_qa/document_qa_engine.py b/document_qa/document_qa_engine.py index 91a2648..81c0e8b 100644 --- a/document_qa/document_qa_engine.py +++ b/document_qa/document_qa_engine.py @@ -259,8 +259,9 @@ def create_memory_embeddings(self, pdf_path, doc_id=None, chunk_size=500, perc_o metadatas=metadata, collection_name=hash) else: - if 'documents' in self.embeddings_dict[hash].get() and len(self.embeddings_dict[hash].get()['documents']) == 0: - self.embeddings_dict[hash].delete(ids=self.embeddings_dict[hash].get()['ids']) + # if 'documents' in self.embeddings_dict[hash].get() and len(self.embeddings_dict[hash].get()['documents']) == 0: + # self.embeddings_dict[hash].delete(ids=self.embeddings_dict[hash].get()['ids']) + self.embeddings_dict[hash].delete_collection() self.embeddings_dict[hash] = Chroma.from_texts(texts, embedding=self.embedding_function, metadatas=metadata,