diff --git a/changelog/3045.deprecated.2.md b/changelog/3045.deprecated.2.md index d141655cf..7f03ff54a 100644 --- a/changelog/3045.deprecated.2.md +++ b/changelog/3045.deprecated.2.md @@ -1 +1 @@ -- ⚠️ `TransportParams.turn_analyzer` is deprecated and might result in unexpected behavior, use `LLMUserAggregator`'s new `turn_start_strategies` parameter instead. +- ⚠️ `TransportParams.turn_analyzer` is deprecated and might result in unexpected behavior, use `LLMUserAggregator`'s new `user_turn_strategies` parameter instead. diff --git a/changelog/3045.deprecated.3.md b/changelog/3045.deprecated.3.md index 43a34d86e..594950603 100644 --- a/changelog/3045.deprecated.3.md +++ b/changelog/3045.deprecated.3.md @@ -1 +1 @@ -- `FrameProcessor.interruption_strategies` is deprecated, use `LLMUserAggregator`'s new `turn_start_strategies` parameter instead. +- `FrameProcessor.interruption_strategies` is deprecated, use `LLMUserAggregator`'s new `user_turn_strategies` parameter instead. diff --git a/changelog/3045.deprecated.md b/changelog/3045.deprecated.md index 471126f58..c58f1a4e2 100644 --- a/changelog/3045.deprecated.md +++ b/changelog/3045.deprecated.md @@ -1 +1 @@ -- `pipecat.audio.interruptions.MinWordsInterruptionStrategy` is deprecated. Use `pipecat.turns.user_start.MinWordsUserTurnStartStrategy` with `LLMUserAggregator`'s new `turn_start_strategies` parameter instead. +- `pipecat.audio.interruptions.MinWordsInterruptionStrategy` is deprecated. Use `pipecat.turns.user_start.MinWordsUserTurnStartStrategy` with `LLMUserAggregator`'s new `user_turn_strategies` parameter instead. diff --git a/changelog/3297.deprecated.md b/changelog/3297.deprecated.md index 79da04814..d29a8a020 100644 --- a/changelog/3297.deprecated.md +++ b/changelog/3297.deprecated.md @@ -1,4 +1,4 @@ -- `PipelineParams.allow_interruptions` is now deprecated, use `LLMUserAggregator`'s new parameter `turn_start_strategies` instead. For example, to disable interruptions but still get user turns you can do: +- `PipelineParams.allow_interruptions` is now deprecated, use `LLMUserAggregator`'s new parameter `user_turn_strategies` instead. For example, to disable interruptions but still get user turns you can do: ```python context_aggregator = LLMContextAggregatorPair( diff --git a/src/pipecat/audio/interruptions/min_words_interruption_strategy.py b/src/pipecat/audio/interruptions/min_words_interruption_strategy.py index 4d41a8855..c3ac5e4be 100644 --- a/src/pipecat/audio/interruptions/min_words_interruption_strategy.py +++ b/src/pipecat/audio/interruptions/min_words_interruption_strategy.py @@ -22,7 +22,7 @@ class MinWordsInterruptionStrategy(BaseInterruptionStrategy): This class is deprecated, use `pipecat.turns.user_start.MinWordsUserTurnStartStrategy` with `PipelineTask`'s - new `turn_start_strategies` parameter instead. + new `user_turn_strategies` parameter instead. """ @@ -43,7 +43,7 @@ class MinWordsInterruptionStrategy(BaseInterruptionStrategy): warnings.warn( "'pipecat.audio.interruptions' is deprecated. " "Use `pipecat.turns.user_start.MinWordsUserTurnStartStrategy` with `PipelineTask`'s " - "new `turn_start_strategies` parameter instead.", + "new `user_turn_strategies` parameter instead.", DeprecationWarning, ) diff --git a/src/pipecat/frames/frames.py b/src/pipecat/frames/frames.py index 52b7ef896..11263624e 100644 --- a/src/pipecat/frames/frames.py +++ b/src/pipecat/frames/frames.py @@ -961,7 +961,7 @@ class StartFrame(SystemFrame): interruption_strategies: List of interruption handling strategies. .. deprecated:: 0.0.99 - Use `LLMUserAggregator`'s new `turn_start_strategies` parameter instead. + Use `LLMUserAggregator`'s new `user_turn_strategies` parameter instead. report_only_initial_ttfb: Whether to report only initial time-to-first-byte. """ diff --git a/src/pipecat/pipeline/task.py b/src/pipecat/pipeline/task.py index 0c534a006..f2b2c1e53 100644 --- a/src/pipecat/pipeline/task.py +++ b/src/pipecat/pipeline/task.py @@ -108,7 +108,7 @@ class PipelineParams(BaseModel): allow_interruptions: Whether to allow pipeline interruptions. .. deprecated:: 0.0.99 - Use `LLMUserAggregator`'s new `turn_start_strategies` parameter instead. + Use `LLMUserAggregator`'s new `user_turn_strategies` parameter instead. audio_in_sample_rate: Input audio sample rate in Hz. audio_out_sample_rate: Output audio sample rate in Hz. @@ -119,7 +119,7 @@ class PipelineParams(BaseModel): interruption_strategies: [deprecated] Strategies for bot interruption behavior. .. deprecated:: 0.0.99 - Use `LLMUserAggregator`'s new `turn_start_strategies` parameter instead. + Use `LLMUserAggregator`'s new `user_turn_strategies` parameter instead. observers: [deprecated] Use `observers` arg in `PipelineTask` class. diff --git a/src/pipecat/processors/aggregators/llm_response_universal.py b/src/pipecat/processors/aggregators/llm_response_universal.py index 339b52553..29ca75f10 100644 --- a/src/pipecat/processors/aggregators/llm_response_universal.py +++ b/src/pipecat/processors/aggregators/llm_response_universal.py @@ -463,9 +463,9 @@ class LLMUserAggregator(LLMContextAggregator): return logger.warning( - f"{self}: `turn_analyzer` in base input transport is deprecated and " - "might result in unexpected behavior. Use `LLMUserAggregator`'s new `turn_start_strategies` " - "parameter with `TurnAnalyzerUserTurnStopStrategy` instead:\n" + f"{self}: `turn_analyzer` in base input transport is deprecated. " + "Use `LLMUserAggregator`'s new `user_turn_strategies` parameter with " + "`TurnAnalyzerUserTurnStopStrategy` instead:\n" "\n" " context_aggregator = LLMContextAggregatorPair(\n" " context,\n" @@ -483,7 +483,7 @@ class LLMUserAggregator(LLMContextAggregator): ) await self._cleanup_user_turn_strategies() - self._turn_strategies = ExternalUserTurnStrategies() + self._user_turn_strategies = ExternalUserTurnStrategies() await self._setup_user_turn_strategies() async def _handle_vad_user_started_speaking(self, frame: VADUserStartedSpeakingFrame): diff --git a/src/pipecat/transports/base_input.py b/src/pipecat/transports/base_input.py index b34eadfb8..f53dff3ee 100644 --- a/src/pipecat/transports/base_input.py +++ b/src/pipecat/transports/base_input.py @@ -134,7 +134,7 @@ class BaseInputTransport(FrameProcessor): warnings.simplefilter("always") warnings.warn( "Parameter 'turn_analyzer' is deprecated, use `LLMUserAggregator`'s new " - "`turn_start_strategies` parameter instead.", + "`user_turn_strategies` parameter instead.", DeprecationWarning, ) @@ -178,7 +178,7 @@ class BaseInputTransport(FrameProcessor): .. deprecated:: 0.0.99 This method is deprecated and will be removed in a future version. - Use `LLMUserAggregator`'s new `turn_start_strategies` parameter instead. + Use `LLMUserAggregator`'s new `user_turn_strategies` parameter instead. Returns: The turn analyzer instance if configured, None otherwise. @@ -189,7 +189,7 @@ class BaseInputTransport(FrameProcessor): warnings.simplefilter("always") warnings.warn( "Method 'turn_analyzer' is deprecated. Use `LLMUserAggregator`'s new " - " `turn_start_strategies` parameter instead.", + "`user_turn_strategies` parameter instead.", DeprecationWarning, ) diff --git a/src/pipecat/transports/base_transport.py b/src/pipecat/transports/base_transport.py index 2859ccfcb..f2ed4a26e 100644 --- a/src/pipecat/transports/base_transport.py +++ b/src/pipecat/transports/base_transport.py @@ -116,7 +116,7 @@ class TransportParams(BaseModel): .. deprecated:: 0.0.99 The `turn_analyzer` parameter is deprecated, use `LLMUSerAggregator`'s - new `turn_start_strategies` parameter instead. + new `user_turn_strategies` parameter instead. """ model_config = ConfigDict(arbitrary_types_allowed=True) diff --git a/tests/test_context_aggregators_universal.py b/tests/test_context_aggregators_universal.py index edcd1c0ef..1d1a05f2a 100644 --- a/tests/test_context_aggregators_universal.py +++ b/tests/test_context_aggregators_universal.py @@ -137,7 +137,7 @@ class TestUserAggregator(unittest.IsolatedAsyncioTestCase): ) assert context.messages[0]["content"] == "Hi there!" - async def test_default_turn_start_strategies(self): + async def test_default_user_turn_strategies(self): context = LLMContext() user_aggregator = LLMUserAggregator(context)