llm_response
LLM response aggregator for collecting complete LLM responses.
- class pipecat.processors.aggregators.llm_response.LLMFullResponseAggregator(**kwargs)[source]
Bases:
FrameProcessorAggregates complete LLM responses between start and end frames.
This aggregator collects LLM text frames (tokens) received between LLMFullResponseStartFrame and LLMFullResponseEndFrame and provides the complete response via an event handler.
The aggregator provides an “on_completion” event that fires when a full completion is available:
@aggregator.event_handler("on_completion") async def on_completion( aggregator: LLMFullResponseAggregator, completion: str, completed: bool, ): # Handle the completion pass
- __init__(**kwargs)[source]
Initialize the LLM full response aggregator.
- Parameters:
**kwargs – Additional arguments passed to parent FrameProcessor.
- async process_frame(frame: Frame, direction: FrameDirection)[source]
Process incoming frames and aggregate LLM text content.
- Parameters:
frame – The frame to process.
direction – The direction of frame flow in the pipeline.