Spaces:
Running
Running
anekameni
commited on
Commit
·
17d309d
1
Parent(s):
ff93078
Fix: add metadata loaded from chroma db
Browse files
src/vector_store/vector_store.py
CHANGED
@@ -32,8 +32,12 @@ class VectorStoreManager:
|
|
32 |
)
|
33 |
all_documents = chroma_vs.get(include=["documents"])
|
34 |
documents = [
|
35 |
-
Document(page_content=content, id=doc_id)
|
36 |
-
for content, doc_id in zip(
|
|
|
|
|
|
|
|
|
37 |
]
|
38 |
bm25_vs: BM25Retriever = BM25Retriever.from_documents(documents=documents)
|
39 |
self.vector_stores["chroma"] = chroma_vs
|
|
|
32 |
)
|
33 |
all_documents = chroma_vs.get(include=["documents"])
|
34 |
documents = [
|
35 |
+
Document(page_content=content, id=doc_id, metadata=metadata)
|
36 |
+
for content, doc_id, metadata in zip(
|
37 |
+
all_documents["documents"],
|
38 |
+
all_documents["ids"],
|
39 |
+
all_documents["metadatas"]
|
40 |
+
)
|
41 |
]
|
42 |
bm25_vs: BM25Retriever = BM25Retriever.from_documents(documents=documents)
|
43 |
self.vector_stores["chroma"] = chroma_vs
|