The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
fixed similarity search with score error #29407 (#29413)
Mohammad Anashaba1fd0bd466
diff --git a/libs/community/langchain_community/vectorstores/azuresearch.py b/libs/community/langchain_community/vectorstores/azuresearch.pyindex d0aa15e2ac..9b2d34fbd9 100644--- a/libs/community/langchain_community/vectorstores/azuresearch.py+++ b/libs/community/langchain_community/vectorstores/azuresearch.py@@ -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":