Skip to content

fix: pass user_query to parent class in PruningContentFilter#1809

Open
jnMetaCode wants to merge 1 commit intounclecode:mainfrom
jnMetaCode:fix/pruning-user-query-passthrough
Open

fix: pass user_query to parent class in PruningContentFilter#1809
jnMetaCode wants to merge 1 commit intounclecode:mainfrom
jnMetaCode:fix/pruning-user-query-passthrough

Conversation

@jnMetaCode
Copy link

Summary

PruningContentFilter.__init__() accepts a user_query parameter but passes None to the parent RelevantContentFilter.__init__() instead of forwarding it:

super().__init__(None)  # user_query is silently dropped

This means self.user_query is always None in PruningContentFilter, even when the caller explicitly provides a query. Any downstream logic that relies on self.user_query (inherited from RelevantContentFilter) will not work as expected.

Changes

  • content_filter_strategy.py line 574: super().__init__(None)super().__init__(user_query=user_query)

Impact

Users passing user_query to PruningContentFilter would expect query-aware filtering, but the query was silently discarded. This fix ensures the parameter is properly forwarded to the base class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant