From 19deca47f9834c3a01d87f4f586d0e1a808f587e Mon Sep 17 00:00:00 2001 From: Andrew White Date: Tue, 16 May 2023 23:48:15 -0400 Subject: [PATCH] Hotfix more zip bugs --- paperqa/docs.py | 3 ++- paperqa/version.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/paperqa/docs.py b/paperqa/docs.py index 921cde0e..a3e8204e 100644 --- a/paperqa/docs.py +++ b/paperqa/docs.py @@ -171,11 +171,12 @@ def add_texts( for metadata in metadatas: metadata["dockey"] = new_key metadata["key"] = metadata["key"].replace(key, new_key) + key = new_key if text_embeddings is None: text_embeddings = self.embeddings.embed_documents(texts) if self._faiss_index is not None: self._faiss_index.add_embeddings( - zip(texts, text_embeddings), metadatas=metadatas + list(zip(texts, text_embeddings)), metadatas=metadatas ) elif self._doc_index is not None: self._doc_index.add_texts([citation], metadatas=[{"key": key}]) diff --git a/paperqa/version.py b/paperqa/version.py index e4adfb83..f49459c7 100644 --- a/paperqa/version.py +++ b/paperqa/version.py @@ -1 +1 @@ -__version__ = "1.6.0" +__version__ = "1.6.1"