llm_turn_completion_user_turn_stop_strategy
User turn stop strategy gated on the LLM’s turn-completion verdict.
- class pipecat.turns.user_stop.llm_turn_completion_user_turn_stop_strategy.LLMTurnCompletionUserTurnStopStrategy(*, config: UserTurnCompletionConfig | None = None, **kwargs)[source]
Bases:
ExternalUserTurnCompletionStopStrategyLLM-gated stop strategy.
Extends
ExternalUserTurnCompletionStopStrategywith the LLM-specific setup needed for the marker-based completion protocol: onStartFrame, pushes anLLMUpdateSettingsFrameupstream that enablesfilter_incomplete_user_turnson the LLM and seeds theUserTurnCompletionConfig.Finalization itself is inherited: when the LLM service’s
UserTurnCompletionLLMServiceMixindetects a✓marker, it broadcasts aUserTurnInferenceCompletedFrameand the base class fireson_user_turn_stopped. Onincomplete_short/incomplete_longmarkers the mixin re-prompts internally and no completion frame is emitted, so the public stop event stays deferred.Install alongside one or more
deferred(...)-wrapped detector strategies that driveon_user_turn_inference_triggeredbut leave finalization to this strategy. The aggregator’s deprecation path forfilter_incomplete_user_turnsdoes this rewiring automatically.- __init__(*, config: UserTurnCompletionConfig | None = None, **kwargs)[source]
Initialize the LLM turn-completion stop strategy.
- Parameters:
config – Configuration applied to the LLM via the
filter_incomplete_user_turnssetting onStartFrame. Defaults toUserTurnCompletionConfig().**kwargs – Additional keyword arguments forwarded to the base class.
- property config: UserTurnCompletionConfig
Return the configured
UserTurnCompletionConfig.
- async process_frame(frame: Frame) ProcessFrameResult[source]
Configure the LLM on start and delegate completion handling to the base.