Spaces:
Running
Running
The vector store shouldn't expect a "filename" in the metadata.
Browse files- repo2vec/vector_store.py +3 -2
- setup.py +1 -1
repo2vec/vector_store.py
CHANGED
|
@@ -86,8 +86,9 @@ class MarqoVectorStore(VectorStore):
|
|
| 86 |
# the result, and instead take the "filename" directly from the result.
|
| 87 |
def patched_method(self, results):
|
| 88 |
documents: List[Document] = []
|
| 89 |
-
for
|
| 90 |
-
|
|
|
|
| 91 |
return documents
|
| 92 |
|
| 93 |
vectorstore._construct_documents_from_results_without_score = patched_method.__get__(
|
|
|
|
| 86 |
# the result, and instead take the "filename" directly from the result.
|
| 87 |
def patched_method(self, results):
|
| 88 |
documents: List[Document] = []
|
| 89 |
+
for result in results["hits"]:
|
| 90 |
+
content = result.pop("text")
|
| 91 |
+
documents.append(Document(page_content=content, metadata=result))
|
| 92 |
return documents
|
| 93 |
|
| 94 |
vectorstore._construct_documents_from_results_without_score = patched_method.__get__(
|
setup.py
CHANGED
|
@@ -6,7 +6,7 @@ def readfile(filename):
|
|
| 6 |
|
| 7 |
setup(
|
| 8 |
name="repo2vec",
|
| 9 |
-
version="0.1.
|
| 10 |
packages=find_packages(),
|
| 11 |
include_package_data=True,
|
| 12 |
package_data={
|
|
|
|
| 6 |
|
| 7 |
setup(
|
| 8 |
name="repo2vec",
|
| 9 |
+
version="0.1.5",
|
| 10 |
packages=find_packages(),
|
| 11 |
include_package_data=True,
|
| 12 |
package_data={
|