mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-07-21 00:35:23 -04:00
b65102bdb2
- Description: VectorStoreRetriever->similarity_score_threshold with search_type of "similarity_score_threshold" not working with the following two minor issues, - Issue: 1. In line 237 of `vectorstores/base.py`, "score_threshold" is passed to `_similarity_search_with_relevance_scores` as in the kwargs, while score_threshold is not a valid argument of this method. As a fix, before calling `_similarity_search_with_relevance_scores`, score_threshold is popped from kwargs. 2. In line 596 to 607 of `vectorstores/pgvector.py`, it's checking the distance_strategy against the string in Enum. However, self.distance_strategy will get the property of distance_strategy from line 316, where the callable function is passed. To solve this issue, self.distance_strategy is changed to self._distance_strategy to avoid calling the property method., - Dependencies: No, - Tag maintainer: @rlancemartin, @eyurtsev, - Twitter handle: No --------- Co-authored-by: Bin Wang <bin@arcanum.ai>