PipelineTask: deprecate allow_interruptions parameter
This commit is contained in:
1
changelog/3297.deprecated.md
Normal file
1
changelog/3297.deprecated.md
Normal file
@@ -0,0 +1 @@
|
||||
- `PipelineParams.allow_interruptions` is now deprecated, use `LLMUserAggregator`'s new parameter `user_mute_strategies` instead.
|
||||
@@ -180,7 +180,6 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
task = PipelineTask(
|
||||
pipeline,
|
||||
params=PipelineParams(
|
||||
allow_interruptions=True,
|
||||
enable_metrics=True,
|
||||
enable_usage_metrics=True,
|
||||
),
|
||||
|
||||
@@ -951,6 +951,10 @@ class StartFrame(SystemFrame):
|
||||
audio_in_sample_rate: Input audio sample rate in Hz.
|
||||
audio_out_sample_rate: Output audio sample rate in Hz.
|
||||
allow_interruptions: Whether to allow user interruptions.
|
||||
|
||||
.. deprecated:: 0.0.99
|
||||
Use `LLMUserAggregator`'s new `user_mute_strategies` parameter instead.
|
||||
|
||||
enable_metrics: Whether to enable performance metrics collection.
|
||||
enable_tracing: Whether to enable OpenTelemetry tracing.
|
||||
enable_usage_metrics: Whether to enable usage metrics collection.
|
||||
|
||||
@@ -105,6 +105,10 @@ class PipelineParams(BaseModel):
|
||||
|
||||
Parameters:
|
||||
allow_interruptions: Whether to allow pipeline interruptions.
|
||||
|
||||
.. deprecated:: 0.0.99
|
||||
Use `LLMUserAggregator`'s new `user_mute_strategies` parameter instead.
|
||||
|
||||
audio_in_sample_rate: Input audio sample rate in Hz.
|
||||
audio_out_sample_rate: Output audio sample rate in Hz.
|
||||
enable_heartbeats: Whether to enable heartbeat monitoring.
|
||||
|
||||
@@ -190,10 +190,11 @@ class FrameProcessor(BaseObject):
|
||||
self._observer: Optional[BaseObserver] = None
|
||||
|
||||
# Other properties
|
||||
self._allow_interruptions = False
|
||||
self._enable_metrics = False
|
||||
self._enable_usage_metrics = False
|
||||
self._report_only_initial_ttfb = False
|
||||
# Other properties (deprecated)
|
||||
self._allow_interruptions = False
|
||||
self._interruption_strategies: List[BaseInterruptionStrategy] = []
|
||||
|
||||
# Indicates whether we have received the StartFrame.
|
||||
|
||||
@@ -709,11 +709,10 @@ class ElevenLabsTTSService(AudioContextWordTTSService):
|
||||
self._partial_word = ""
|
||||
self._partial_word_start_time = 0.0
|
||||
# If a context ID does not exist, create a new one and
|
||||
# register it. If an ID exists, that means the Pipeline is
|
||||
# configured for allow_interruptions=False, so continue
|
||||
# using the current ID. When interruptions are enabled
|
||||
# (e.g. allow_interruptions=True), user speech results in
|
||||
# an interruption, which resets the context ID.
|
||||
# register it. If an ID exists, that means the Pipeline
|
||||
# doesn't allow user interruptions, so continue using the
|
||||
# current ID. When interruptions are allowed, user speech
|
||||
# results in an interruption, which resets the context ID.
|
||||
if not self._context_id:
|
||||
self._context_id = str(uuid.uuid4())
|
||||
if not self.audio_context_available(self._context_id):
|
||||
|
||||
Reference in New Issue
Block a user