Skip to content

Commit 4d03ba4

Browse files
authored
langchain_qdrant: fix showing the missing sparse vector name (#30701)
**Description:** The error message was supposed to display the missing vector name, but instead, it includes only the existing collection configs. This simple PR just includes the correct variable name, so that the user knows the requested vector does not exist in the collection. Additional guidelines: - Make sure optional dependencies are imported within a function. - Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests. - Most PRs should not touch more than one package. - Changes should be backwards compatible. - If you are adding something to community, do not re-import it in langchain. If no one reviews your PR within a few days, please @-mention one of baskaryan, eyurtsev, ccurme, vbarda, hwchase17. Signed-off-by: Tin Lai <[email protected]>
1 parent 30af9b8 commit 4d03ba4

File tree

1 file changed

+1
-1
lines changed
  • libs/partners/qdrant/langchain_qdrant

1 file changed

+1
-1
lines changed

libs/partners/qdrant/langchain_qdrant/qdrant.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ def _validate_collection_for_sparse(
11781178
):
11791179
raise QdrantVectorStoreError(
11801180
f"Existing Qdrant collection {collection_name} does not "
1181-
f"contain sparse vectors named {sparse_vector_config}. "
1181+
f"contain sparse vectors named {sparse_vector_name}. "
11821182
f"If you want to recreate the collection, set `force_recreate` "
11831183
f"parameter to `True`."
11841184
)

0 commit comments

Comments
 (0)