diff --git a/src/pipecat/frames/frames.py b/src/pipecat/frames/frames.py index 1506f7b94..115c41ff6 100644 --- a/src/pipecat/frames/frames.py +++ b/src/pipecat/frames/frames.py @@ -956,6 +956,10 @@ class StartFrame(SystemFrame): enable_tracing: Whether to enable OpenTelemetry tracing. enable_usage_metrics: Whether to enable usage metrics collection. interruption_strategies: List of interruption handling strategies. + + .. deprecated:: 0.0.99 + Use the `turn_start_strategies` instead. + report_only_initial_ttfb: Whether to report only initial time-to-first-byte. """ diff --git a/src/pipecat/processors/frame_processor.py b/src/pipecat/processors/frame_processor.py index ddb546ef7..84db66da1 100644 --- a/src/pipecat/processors/frame_processor.py +++ b/src/pipecat/processors/frame_processor.py @@ -359,7 +359,7 @@ class FrameProcessor(BaseObject): def interruption_strategies(self) -> Sequence[BaseInterruptionStrategy]: """Get the interruption strategies for this processor. - .. deprecated:: 0.0.98 + .. deprecated:: 0.0.99 This function is deprecated, use the new user and bot turn start strategies insted. diff --git a/src/pipecat/turns/bot/base_bot_turn_start_strategy.py b/src/pipecat/turns/bot/base_bot_turn_start_strategy.py index 3d5222169..10bd2de9b 100644 --- a/src/pipecat/turns/bot/base_bot_turn_start_strategy.py +++ b/src/pipecat/turns/bot/base_bot_turn_start_strategy.py @@ -43,10 +43,6 @@ class BaseBotTurnStartStrategy(BaseObject): raise RuntimeError(f"{self} bot turn start strategy was not properly setup") return self._task_manager - async def reset(self): - """Reset the strategy to its initial state.""" - pass - async def setup(self, task_manager: BaseTaskManager): """Initialize the strategy with the given task manager. @@ -59,6 +55,10 @@ class BaseBotTurnStartStrategy(BaseObject): """Cleanup the strategy.""" pass + async def reset(self): + """Reset the strategy to its initial state.""" + pass + async def process_frame(self, frame: Frame): """Process an incoming frame to decide whether the bot should speak. @@ -67,7 +67,6 @@ class BaseBotTurnStartStrategy(BaseObject): Args: frame: The frame to be analyzed. - """ pass diff --git a/src/pipecat/turns/user/base_user_turn_start_strategy.py b/src/pipecat/turns/user/base_user_turn_start_strategy.py index cb825320a..c1d49f6e8 100644 --- a/src/pipecat/turns/user/base_user_turn_start_strategy.py +++ b/src/pipecat/turns/user/base_user_turn_start_strategy.py @@ -43,10 +43,6 @@ class BaseUserTurnStartStrategy(BaseObject): raise RuntimeError(f"{self} user turn start strategy was not properly setup") return self._task_manager - async def reset(self): - """Reset the strategy to its initial state.""" - pass - async def setup(self, task_manager: BaseTaskManager): """Initialize the strategy with the given task manager. @@ -59,6 +55,10 @@ class BaseUserTurnStartStrategy(BaseObject): """Cleanup the strategy.""" pass + async def reset(self): + """Reset the strategy to its initial state.""" + pass + async def process_frame(self, frame: Frame): """Process an incoming frame. @@ -67,7 +67,6 @@ class BaseUserTurnStartStrategy(BaseObject): Args: frame: The frame to be processed. - """ pass