diff --git a/changelog/3292.added.md b/changelog/3292.added.md new file mode 100644 index 000000000..936d927d8 --- /dev/null +++ b/changelog/3292.added.md @@ -0,0 +1,29 @@ +- Introducing user mute strategies. User mute strategies indicate when user input should be muted based on the current system state. + + In conversational agents, user mute strategies are used to prevent user input from interrupting bot speech, tool execution, or other critical system operations. + + A list of strategies can be specified; all strategies are evaluated for every frame so that each strategy can maintain its internal state. A user frame is muted if any of the configured strategies indicates it should be muted. + + Available user mute strategies: + + * `FirstSpeechUserMuteStrategy` + * `MuteUntilFirstBotCompleteUserMuteStrategy` + * `AlwaysUserMuteStrategy` + * `FunctionCallUserMuteStrategy` + + User mute strategies replace the legacy `STTMuteFilter` and provide a more flexible and composable approach to muting user input. + + User mute strategies are configured when setting up the `LLMContextAggregatorPair`. For example: + + ```python + context_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams( + user_mute_strategies=[ + FirstSpeechUserMuteStrategy(), + ] + ), + ) + ``` + + In order to use user mute strategies you should update to the new universal `LLMContext` and `LLMContextAggregatorPair`.