Spaces:
Running
Running
fix regression
Browse files
document_qa/document_qa_engine.py
CHANGED
@@ -252,7 +252,7 @@ class DocumentQAEngine:
|
|
252 |
hash = metadata[0]['hash']
|
253 |
|
254 |
if hash not in self.embeddings_dict.keys() and (
|
255 |
-
'documents' in self.embeddings_dict.get() and len(self.embeddings_dict.get()['documents']) == 0):
|
256 |
self.embeddings_dict[hash] = Chroma.from_texts(texts,
|
257 |
embedding=self.embedding_function,
|
258 |
metadatas=metadata,
|
|
|
252 |
hash = metadata[0]['hash']
|
253 |
|
254 |
if hash not in self.embeddings_dict.keys() and (
|
255 |
+
'documents' in self.embeddings_dict[hash].get() and len(self.embeddings_dict[hash].get()['documents']) == 0):
|
256 |
self.embeddings_dict[hash] = Chroma.from_texts(texts,
|
257 |
embedding=self.embedding_function,
|
258 |
metadatas=metadata,
|