Skip to content

Commit

Permalink
feat(Qdrant): fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-science committed Mar 22, 2024
1 parent 125c123 commit 7cf1882
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ def documents_to_batch(
if embedding_field in payload and payload[embedding_field] is not None:
dense_vector = payload.pop(embedding_field) or []
vector[DENSE_VECTORS_NAME] = dense_vector
if sparse_embedding_field in payload and payload[sparse_embedding_field] is not None and payload[sparse_embedding_field] != "":
if (
sparse_embedding_field in payload
and payload[sparse_embedding_field] is not None
and payload[sparse_embedding_field] != ""
):
sparse_vector = payload.pop(sparse_embedding_field, {"indices": [], "values": []})
sparse_vector_instance = rest.SparseVector(**sparse_vector)
vector[SPARSE_VECTORS_NAME] = sparse_vector_instance
Expand Down

0 comments on commit 7cf1882

Please sign in to comment.