The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
langchain_community: updated query constructor for Databricks Vector Search due to LangChainDeprecationWarning: `filters` was deprecated since langchain-community 0.2.11 and will be removed in 0.3. Please use `filter` instead. (#27974)
William Smith15e735316841
diff --git a/libs/community/langchain_community/query_constructors/databricks_vector_search.py b/libs/community/langchain_community/query_constructors/databricks_vector_search.pyindex 03e7de8efa..f79a690c9b 100644--- a/libs/community/langchain_community/query_constructors/databricks_vector_search.py+++ b/libs/community/langchain_community/query_constructors/databricks_vector_search.py@@ -90,5 +90,5 @@ class DatabricksVectorSearchTranslator(Visitor):if structured_query.filter is None:kwargs = {}else:- kwargs = {"filters": structured_query.filter.accept(self)}+ kwargs = {"filter": structured_query.filter.accept(self)}return structured_query.query, kwargsdiff --git a/libs/community/tests/unit_tests/query_constructors/test_databricks_vector_search.py b/libs/community/tests/unit_tests/query_constructors/test_databricks_vector_search.pyindex 1f38f3b1b6..e71e32c34e 100644--- a/libs/community/tests/unit_tests/query_constructors/test_databricks_vector_search.py+++ b/libs/community/tests/unit_tests/query_constructors/test_databricks_vector_search.py@@ -109,7 +109,7 @@ def test_visit_structured_query_with_one_arg_filter() -> None:filter=comp,)- expected = (query, {"filters": {"country": "France"}})+ expected = (query, {"filter": {"country": "France"}})actual = DEFAULT_TRANSLATOR.visit_structured_query(structured_query)assert expected == actual@@ -134,7 +134,7 @@ def test_visit_structured_query_with_multiple_arg_filter_and_operator() -> None:expected = (query,- {"filters": {"country": "France", "year >=": 1888, "year <=": 1900}},+ {"filter": {"country": "France", "year >=": 1888, "year <=": 1900}},)actual = DEFAULT_TRANSLATOR.visit_structured_query(structured_query)