diff --git a/changelog/4405.added.2.md b/changelog/4405.added.2.md new file mode 100644 index 000000000..30f49e576 --- /dev/null +++ b/changelog/4405.added.2.md @@ -0,0 +1 @@ +- Added `LLMTurnCompletionUserTurnStopStrategy` in `pipecat.turns.user_stop`. When installed, the strategy gates `on_user_turn_stopped` on a `UserTurnCompletedFrame` (a new fieldless system frame emitted by any component that can judge turn completeness — e.g. the `UserTurnCompletionLLMServiceMixin` on `✓`). A `finalization_timeout` provides a safety net if no completion frame ever arrives. diff --git a/changelog/4405.added.3.md b/changelog/4405.added.3.md new file mode 100644 index 000000000..8b048a219 --- /dev/null +++ b/changelog/4405.added.3.md @@ -0,0 +1 @@ +- Added `deferred(strategy)` and `DeferredUserTurnStopStrategy` in `pipecat.turns.user_stop`. Wraps a stop strategy so it fires only the inference-triggered event and suppresses `on_user_turn_stopped`, leaving finalization to another strategy in the chain such as `LLMTurnCompletionUserTurnStopStrategy`. diff --git a/changelog/4405.added.4.md b/changelog/4405.added.4.md new file mode 100644 index 000000000..9cc5246ed --- /dev/null +++ b/changelog/4405.added.4.md @@ -0,0 +1 @@ +- Added `llm_completion_user_turn_stop_strategies()` in `pipecat.turns.user_turn_strategies` — a one-call helper that pairs default (or user-supplied) stop strategies, each wrapped with `deferred(...)`, with `LLMTurnCompletionUserTurnStopStrategy`. Common case: `stop=llm_completion_user_turn_stop_strategies()`. diff --git a/changelog/4405.added.5.md b/changelog/4405.added.5.md new file mode 100644 index 000000000..1b8eadea2 --- /dev/null +++ b/changelog/4405.added.5.md @@ -0,0 +1 @@ +- Added `ExternalUserTurnCompletionStopStrategy` in `pipecat.turns.user_stop` — a generic stop strategy that finalizes the user turn whenever a `UserTurnCompletedFrame` arrives, regardless of which component produced it. `LLMTurnCompletionUserTurnStopStrategy` now extends this base; future producers (Flux, custom end-of-turn classifiers, etc.) can use the base directly or subclass it to add producer-specific setup. diff --git a/changelog/4405.added.md b/changelog/4405.added.md new file mode 100644 index 000000000..0cd8859b0 --- /dev/null +++ b/changelog/4405.added.md @@ -0,0 +1 @@ +- Added `on_user_turn_inference_triggered`, a new event on the user turn controller, processor, aggregator and stop strategies that fires when a strategy has enough signal to start LLM inference. By default it fires together with `on_user_turn_stopped`; a gating strategy can fire only the inference-triggered event and defer finalization to a peer. diff --git a/changelog/4405.deprecated.md b/changelog/4405.deprecated.md new file mode 100644 index 000000000..eb7aede5e --- /dev/null +++ b/changelog/4405.deprecated.md @@ -0,0 +1 @@ +- Deprecated `LLMUserAggregatorParams.filter_incomplete_user_turns`. Add `LLMTurnCompletionUserTurnStopStrategy` to `user_turn_strategies.stop` instead (typically via `llm_completion_user_turn_stop_strategies()`). Setting the legacy flag still works for one release: the aggregator emits a `DeprecationWarning`, wraps existing stop strategies with `deferred(...)`, and appends the new finalizer strategy. diff --git a/changelog/4405.fixed.md b/changelog/4405.fixed.md new file mode 100644 index 000000000..65a9d42bf --- /dev/null +++ b/changelog/4405.fixed.md @@ -0,0 +1 @@ +- Fixed `on_user_turn_stopped` firing prematurely when `filter_incomplete_user_turns` was enabled. The event now fires only after the LLM confirms the user turn is complete (`✓`); previously the smart-turn detector's tentative stop was bubbling up before the LLM had a chance to veto it, causing observers, transcript appenders and UI indicators to receive an early — and sometimes duplicated — signal.