fix: chat filter#1280
Merged
Merged
Conversation
Parse and apply the component's filter_expression (same JSON parsing as search()) when handling raw_search queries in the multimodal multi-embedding OpenSearch component. The change: - JSON-decode filter_expression and raise a ValueError on parse errors. - Coerce filter object into ES filter clauses via _coerce_filter_clauses and wrap the existing query into a bool query with those filter clauses (or use match_all if no original query). - If a filter object is present, apply its limit to query_body.size when not already set, and map score_threshold / scoreThreshold to query_body.min_score if not already set and > 0. This ensures consistent filtering, sizing, and min_score behavior for raw_search like the search() path.
Change the default value of the auth_mode DropdownInput from 'basic' to 'jwt' in OpenSearchVectorStoreComponentMultimodalMultiEmbedding (flows/components/opensearch_multimodal.py). This makes JWT the default authentication method while keeping the available options ['basic', 'jwt'].
edwinjosechittilappilly
left a comment
Collaborator
There was a problem hiding this comment.
Please set brearer prefix as false as per last discussions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request removes the OpenSearch filter merge utility and its related test suite from the codebase. These utilities were previously used to merge chat/knowledge filter clauses into OpenSearch search request bodies, but are no longer needed in this repository. The Dockerfile is also updated to stop copying the OpenRAG utils source directory and setting the PYTHONPATH environment variable.
The most important changes are:
Removal of OpenSearch filter merge utilities:
Deleted the src/utils/opensearch_filter_merge.py file, which contained all logic for merging chat filter expressions, applying limits, and integrating filters into OpenSearch request bodies.
Removed the corresponding test suite tests/unit/test_opensearch_filter_merge.py, which included comprehensive unit tests for the filter merge utilities.
Dockerfile update:
Updated Dockerfile.langflow to stop copying the OpenRAG utils source (src) into the image and removed the PYTHONPATH environment variable, since the OpenSearch filter merge code is no longer present or required.