diff --git a/libs/langchain/langchain/retrievers/self_query/myscale.py b/libs/langchain/langchain/retrievers/self_query/myscale.py index a951272471e55..99a0f3be90e68 100644 --- a/libs/langchain/langchain/retrievers/self_query/myscale.py +++ b/libs/langchain/langchain/retrievers/self_query/myscale.py @@ -117,9 +117,9 @@ def visit_comparison(self, comparison: Comparison) -> Dict: def visit_structured_query( self, structured_query: StructuredQuery ) -> Tuple[str, dict]: - print(structured_query) - if structured_query.filter is None: - kwargs = {} - else: - kwargs = {"where_str": structured_query.filter.accept(self)} + kwargs = ( + {"where_str": structured_query.filter.accept(self)} + if structured_query.filter is not None + else {} + ) return structured_query.query, kwargs