mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-13 00:16:01 +00:00
Description: Fix TypeError in AzureSearch similarity_search_with_score by removing search_type from kwargs before passing to underlying requests. This resolves issue #29407 where search_type was being incorrectly passed through to Session.request(). Issue: #29407 --------- Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
parent
7b404fcd37
commit
aba1fd0bd4
@ -683,7 +683,8 @@ class AzureSearch(VectorStore):
|
||||
self, query: str, *, k: int = 4, **kwargs: Any
|
||||
) -> List[Tuple[Document, float]]:
|
||||
"""Run similarity search with distance."""
|
||||
search_type = kwargs.get("search_type", self.search_type)
|
||||
# Extract search_type from kwargs, defaulting to self.search_type
|
||||
search_type = kwargs.pop("search_type", self.search_type)
|
||||
if search_type == "similarity":
|
||||
return self.vector_search_with_score(query, k=k, **kwargs)
|
||||
elif search_type == "hybrid":
|
||||
|
Loading…
Reference in New Issue
Block a user