gated_llm_context

Gated LLM context aggregator for controlled message flow.

class pipecat.processors.aggregators.gated_llm_context.GatedLLMContextAggregator(*, notifier: BaseNotifier, start_open: bool = False, **kwargs)[source]

Bases: FrameProcessor

Aggregator that gates LLM context frames until notified.

This aggregator captures LLM context frames and holds them until a notifier signals that they can be released. This is useful for controlling the flow of context frames based on external conditions or timing.

__init__(*, notifier: BaseNotifier, start_open: bool = False, **kwargs)[source]

Initialize the gated context aggregator.

Parameters:
  • notifier – The notifier that controls when frames are released.

  • start_open – If True, the first context frame passes through immediately.

  • **kwargs – Additional arguments passed to the parent FrameProcessor.

async process_frame(frame: Frame, direction: FrameDirection)[source]

Process incoming frames, gating LLM context frames.

Parameters:
  • frame – The frame to process.

  • direction – The direction of frame flow in the pipeline.