From 8b97ab70ff75952b426781496072a5cda6a1e9d2 Mon Sep 17 00:00:00 2001 From: srhinos <6531393+srhinos@users.noreply.github.com> Date: Wed, 30 Jul 2025 20:48:31 -0400 Subject: [PATCH 1/2] Enable Interruption Support for LLMUserResponseAggregator --- .../processors/aggregators/llm_response.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/pipecat/processors/aggregators/llm_response.py b/src/pipecat/processors/aggregators/llm_response.py index 568314f77..70073e4a3 100644 --- a/src/pipecat/processors/aggregators/llm_response.py +++ b/src/pipecat/processors/aggregators/llm_response.py @@ -1013,17 +1013,14 @@ class LLMUserResponseAggregator(LLMUserContextAggregator): """ super().__init__(context=OpenAILLMContext(messages), params=params, **kwargs) - async def push_aggregation(self): - """Push the aggregated user input as an LLMMessagesFrame.""" - if len(self._aggregation) > 0: - await self.handle_aggregation(self._aggregation) + async def _process_aggregation(self): + """Process the current aggregation and push it downstream.""" + aggregation = self._aggregation + await self.reset() + await self.handle_aggregation(aggregation) + frame = LLMMessagesFrame(self._context.messages) + await self.push_frame(frame) - # Reset the aggregation. Reset it before pushing it down, otherwise - # if the tasks gets cancelled we won't be able to clear things up. - await self.reset() - - frame = LLMMessagesFrame(self._context.messages) - await self.push_frame(frame) class LLMAssistantResponseAggregator(LLMAssistantContextAggregator): From 7553f670af14101c40de6382e829ca84ff33cb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 31 Jul 2025 10:41:11 -0700 Subject: [PATCH 2/2] fix formatting and update CHANGELOG --- CHANGELOG.md | 5 +++++ src/pipecat/processors/aggregators/llm_response.py | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 945503530..8bdc459da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,6 +97,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed a `LLMUserResponseAggregator` issue where interruptions were not being + handled properly. + +- Fixed `PiperTTSService` to work with newer Piper GPL. + - Fixed a race condition in `FastAPIWebsocketClient` that occurred when attempting to send a message while the client was disconnecting. diff --git a/src/pipecat/processors/aggregators/llm_response.py b/src/pipecat/processors/aggregators/llm_response.py index 70073e4a3..483b12059 100644 --- a/src/pipecat/processors/aggregators/llm_response.py +++ b/src/pipecat/processors/aggregators/llm_response.py @@ -1022,7 +1022,6 @@ class LLMUserResponseAggregator(LLMUserContextAggregator): await self.push_frame(frame) - class LLMAssistantResponseAggregator(LLMAssistantContextAggregator): """Assistant response aggregator that outputs LLMMessagesFrame instead of context frames.