Skip to content

Commit

Permalink
feat(Qdrant): missing comma
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-science committed Mar 14, 2024
1 parent c9a571a commit 3824e8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def to_dict(self) -> Dict[str, Any]:
document_store=self._document_store,
filters=self._filters,
top_k_dense=self._top_k_dense,
top_k_sparse=self._top_k_sparse
top_k_sparse=self._top_k_sparse,
scale_score=self._scale_score,
return_embedding=self._return_embedding,
)
Expand Down Expand Up @@ -335,7 +335,8 @@ def run(
query_sparse_embedding: Dict[str, Union[List[int], List[float]]],
query_embedding: List[float],
filters: Optional[Dict[str, Any]] = None,
top_k: Optional[int] = None,
top_k_dense: Optional[int] = None,
top_k_sparse: Optional[int] = None,
scale_score: Optional[bool] = None,
return_embedding: Optional[bool] = None,
):
Expand All @@ -353,7 +354,7 @@ def run(
"""
docs = self._document_store.query_hybrid(
query_sparse_embedding=query_sparse_embedding,
query_embedding=query_embedding
query_embedding=query_embedding,
filters=filters or self._filters,
top_k_dense=top_k_dense or self._top_k_dense,
top_k_sparse=top_k_sparse or self._top_k_sparse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ def query_hybrid(
rest.SearchRequest(
vector=rest.NamedVector(
name="text-dense",
vector=query_dense_vector,
vector=query_embedding,
),
query_filter=qdrant_filters
query_filter=qdrant_filters,
limit=top_k_dense,
with_vectors=return_embedding
),
Expand All @@ -336,7 +336,7 @@ def query_hybrid(
values=query_values,
),
),
query_filter=qdrant_filters
query_filter=qdrant_filters,
limit=top_k_sparse,
with_vectors=return_embedding
),
Expand Down Expand Up @@ -423,7 +423,7 @@ def query_by_embedding(
collection_name=self.index,
query_vector=rest.NamedVector(
name="text-dense",
vector=query_dense_vector,
vector=query_embedding,
),
query_filter=qdrant_filters,
limit=top_k,
Expand Down Expand Up @@ -530,7 +530,7 @@ def _recreate_collection(self, collection_name: str, distance, embedding_dim: in
on_disk=on_disk,
distance=distance,
),
}
},
sparse_vectors_config={
"text-sparse": rest.SparseVectorParams(
index=rest.SparseIndexParams(
Expand Down

0 comments on commit 3824e8c

Please sign in to comment.