minor turn start strategies cleanup
This commit is contained in:
@@ -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.
|
||||
"""
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user