From b85bd91d084c9cd2aff988a911fe2cf078b1a25b Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Tue, 1 Apr 2025 23:35:09 -0400 Subject: [PATCH] LLMAssistantContextAggregator should push BotStoppedSpeakingFrames --- CHANGELOG.md | 7 +++++++ src/pipecat/processors/aggregators/llm_response.py | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43fecda29..aec1ec0fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to **Pipecat** will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Fixed an issue where `LLMAssistantContextAggregator` would prevent a + `BotStoppedSpeakingFrame` from moving through the pipeline. + ## [0.0.62] - 2025-04-01 "An April Fools' release" ### Added diff --git a/src/pipecat/processors/aggregators/llm_response.py b/src/pipecat/processors/aggregators/llm_response.py index e40ad266b..dccceea1f 100644 --- a/src/pipecat/processors/aggregators/llm_response.py +++ b/src/pipecat/processors/aggregators/llm_response.py @@ -149,7 +149,8 @@ class BaseLLMResponseAggregator(FrameProcessor): @abstractmethod def reset(self): """Reset the internals of this aggregator. This should not modify the - internal messages.""" + internal messages. + """ pass @abstractmethod @@ -446,6 +447,7 @@ class LLMAssistantContextAggregator(LLMContextResponseAggregator): await self._handle_user_image_frame(frame) elif isinstance(frame, BotStoppedSpeakingFrame): await self.push_aggregation() + await self.push_frame(frame, direction) else: await self.push_frame(frame, direction)