From af8663e95d839520c93530f8eb98a78562e4f081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Wed, 10 Apr 2024 21:46:16 -0700 Subject: [PATCH] aggregators: fix LLMUserResponseAggregator passs-through --- src/dailyai/pipeline/aggregators.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dailyai/pipeline/aggregators.py b/src/dailyai/pipeline/aggregators.py index 9edc87384..78b75afbe 100644 --- a/src/dailyai/pipeline/aggregators.py +++ b/src/dailyai/pipeline/aggregators.py @@ -133,8 +133,9 @@ async def process_frame(self, frame: Frame) -> AsyncGenerator[Frame, None]: self.aggregation = "" yield self._end_frame() yield LLMMessagesFrame(self.messages) - elif isinstance(frame, self._accumulator_frame) and self.aggregating: - self.aggregation += f" {frame.text}" + elif isinstance(frame, self._accumulator_frame): + if self.aggregating: + self.aggregation += f" {frame.text}" if self._pass_through: yield frame else: