Files
langchain-python/langchain
王斌(Bin Wang) b65102bdb2 fix: pgvector search_type of similarity_score_threshold not working (#7771)
- 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>
2023-07-19 07:20:52 -07:00
..
2023-07-18 02:23:24 -07:00
2023-07-18 18:25:27 -07:00
2023-07-18 18:25:27 -07:00
2023-07-18 01:50:14 -07:00
2023-07-11 10:11:21 -04:00
2023-07-07 02:42:28 -04:00
2023-07-18 07:58:22 -07:00
2023-07-17 17:50:19 -07:00
2023-07-02 22:38:59 -04:00
2023-06-08 21:15:14 -07:00
2023-06-03 16:48:48 -07:00
2022-11-12 11:22:32 -08:00