Spaces:
Sleeping
Sleeping
Daryna Vasylashko commited on
Commit ·
9f71ebf
1
Parent(s): 95f9304
bug: fix the qdrant search method
Browse files
.pre-commit-config.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# See https://pre-commit.com for more information
|
| 2 |
# See https://pre-commit.com/hooks.html for more hooks
|
| 3 |
-
default_language_version:
|
| 4 |
-
python: python3.11
|
| 5 |
repos:
|
| 6 |
# Git & Filesystem checks
|
| 7 |
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
|
|
| 1 |
# See https://pre-commit.com for more information
|
| 2 |
# See https://pre-commit.com/hooks.html for more hooks
|
| 3 |
+
# default_language_version:
|
| 4 |
+
# python: python3.11
|
| 5 |
repos:
|
| 6 |
# Git & Filesystem checks
|
| 7 |
- repo: https://github.com/pre-commit/pre-commit-hooks
|
src/scientific_rag/infrastructure/qdrant.py
CHANGED
|
@@ -84,9 +84,9 @@ class QdrantService:
|
|
| 84 |
) -> list[PaperChunk]:
|
| 85 |
query_filter = self._build_filters(filters) if filters else None
|
| 86 |
|
| 87 |
-
results = self.client.
|
| 88 |
collection_name=self.collection_name,
|
| 89 |
-
|
| 90 |
limit=limit,
|
| 91 |
score_threshold=score_threshold,
|
| 92 |
query_filter=query_filter,
|
|
@@ -98,7 +98,7 @@ class QdrantService:
|
|
| 98 |
score=hit.score,
|
| 99 |
embedding=None,
|
| 100 |
)
|
| 101 |
-
for hit in results
|
| 102 |
]
|
| 103 |
|
| 104 |
def _build_filters(self, filters: QueryFilters) -> Filter | None:
|
|
|
|
| 84 |
) -> list[PaperChunk]:
|
| 85 |
query_filter = self._build_filters(filters) if filters else None
|
| 86 |
|
| 87 |
+
results = self.client.query_points(
|
| 88 |
collection_name=self.collection_name,
|
| 89 |
+
query=query_vector,
|
| 90 |
limit=limit,
|
| 91 |
score_threshold=score_threshold,
|
| 92 |
query_filter=query_filter,
|
|
|
|
| 98 |
score=hit.score,
|
| 99 |
embedding=None,
|
| 100 |
)
|
| 101 |
+
for hit in results.points
|
| 102 |
]
|
| 103 |
|
| 104 |
def _build_filters(self, filters: QueryFilters) -> Filter | None:
|