lfoppiano commited on
Commit
ab8bc0b
·
1 Parent(s): cbf04c6

fix regression

Browse files

(cherry picked from commit 8c1f07c06e91ba79e2b9adf41f9b602e647dce3e)

Files changed (1) hide show
  1. document_qa/document_qa_engine.py +1 -1
document_qa/document_qa_engine.py CHANGED
@@ -254,7 +254,7 @@ class DocumentQAEngine:
254
  hash = metadata[0]['hash']
255
 
256
  if hash not in self.embeddings_dict.keys() and (
257
- 'documents' in self.embeddings_dict.get() and len(self.embeddings_dict.get()['documents']) == 0):
258
  self.embeddings_dict[hash] = Chroma.from_texts(texts,
259
  embedding=self.embedding_function,
260
  metadatas=metadata,
 
254
  hash = metadata[0]['hash']
255
 
256
  if hash not in self.embeddings_dict.keys() and (
257
+ 'documents' in self.embeddings_dict[hash].get() and len(self.embeddings_dict[hash].get()['documents']) == 0):
258
  self.embeddings_dict[hash] = Chroma.from_texts(texts,
259
  embedding=self.embedding_function,
260
  metadatas=metadata,