lfoppiano commited on
Commit
8c1f07c
1 Parent(s): ba399dc

fix regression

Browse files
Files changed (1) hide show
  1. document_qa/document_qa_engine.py +1 -1
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,