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_tracing: Whether to enable OpenTelemetry tracing.
|
||||||
enable_usage_metrics: Whether to enable usage metrics collection.
|
enable_usage_metrics: Whether to enable usage metrics collection.
|
||||||
interruption_strategies: List of interruption handling strategies.
|
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.
|
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]:
|
def interruption_strategies(self) -> Sequence[BaseInterruptionStrategy]:
|
||||||
"""Get the interruption strategies for this processor.
|
"""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
|
This function is deprecated, use the new user and bot turn start
|
||||||
strategies insted.
|
strategies insted.
|
||||||
|
|
||||||
|
|||||||
@@ -43,10 +43,6 @@ class BaseBotTurnStartStrategy(BaseObject):
|
|||||||
raise RuntimeError(f"{self} bot turn start strategy was not properly setup")
|
raise RuntimeError(f"{self} bot turn start strategy was not properly setup")
|
||||||
return self._task_manager
|
return self._task_manager
|
||||||
|
|
||||||
async def reset(self):
|
|
||||||
"""Reset the strategy to its initial state."""
|
|
||||||
pass
|
|
||||||
|
|
||||||
async def setup(self, task_manager: BaseTaskManager):
|
async def setup(self, task_manager: BaseTaskManager):
|
||||||
"""Initialize the strategy with the given task manager.
|
"""Initialize the strategy with the given task manager.
|
||||||
|
|
||||||
@@ -59,6 +55,10 @@ class BaseBotTurnStartStrategy(BaseObject):
|
|||||||
"""Cleanup the strategy."""
|
"""Cleanup the strategy."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
async def reset(self):
|
||||||
|
"""Reset the strategy to its initial state."""
|
||||||
|
pass
|
||||||
|
|
||||||
async def process_frame(self, frame: Frame):
|
async def process_frame(self, frame: Frame):
|
||||||
"""Process an incoming frame to decide whether the bot should speak.
|
"""Process an incoming frame to decide whether the bot should speak.
|
||||||
|
|
||||||
@@ -67,7 +67,6 @@ class BaseBotTurnStartStrategy(BaseObject):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
frame: The frame to be analyzed.
|
frame: The frame to be analyzed.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -43,10 +43,6 @@ class BaseUserTurnStartStrategy(BaseObject):
|
|||||||
raise RuntimeError(f"{self} user turn start strategy was not properly setup")
|
raise RuntimeError(f"{self} user turn start strategy was not properly setup")
|
||||||
return self._task_manager
|
return self._task_manager
|
||||||
|
|
||||||
async def reset(self):
|
|
||||||
"""Reset the strategy to its initial state."""
|
|
||||||
pass
|
|
||||||
|
|
||||||
async def setup(self, task_manager: BaseTaskManager):
|
async def setup(self, task_manager: BaseTaskManager):
|
||||||
"""Initialize the strategy with the given task manager.
|
"""Initialize the strategy with the given task manager.
|
||||||
|
|
||||||
@@ -59,6 +55,10 @@ class BaseUserTurnStartStrategy(BaseObject):
|
|||||||
"""Cleanup the strategy."""
|
"""Cleanup the strategy."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
async def reset(self):
|
||||||
|
"""Reset the strategy to its initial state."""
|
||||||
|
pass
|
||||||
|
|
||||||
async def process_frame(self, frame: Frame):
|
async def process_frame(self, frame: Frame):
|
||||||
"""Process an incoming frame.
|
"""Process an incoming frame.
|
||||||
|
|
||||||
@@ -67,7 +67,6 @@ class BaseUserTurnStartStrategy(BaseObject):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
frame: The frame to be processed.
|
frame: The frame to be processed.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user