From 081b001c8b8af41dfd57fb779b88e21fb843dca6 Mon Sep 17 00:00:00 2001 From: Kwindla Hultman Kramer Date: Sat, 7 Sep 2024 16:42:52 -0700 Subject: [PATCH] fix for leading space in context aggregator strings --- src/pipecat/processors/aggregators/llm_response.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipecat/processors/aggregators/llm_response.py b/src/pipecat/processors/aggregators/llm_response.py index 7c38e62ad..ab0552578 100644 --- a/src/pipecat/processors/aggregators/llm_response.py +++ b/src/pipecat/processors/aggregators/llm_response.py @@ -109,7 +109,7 @@ class LLMResponseAggregator(FrameProcessor): await self.push_frame(frame, direction) elif isinstance(frame, self._accumulator_frame): if self._aggregating: - self._aggregation += f" {frame.text}" + self._aggregation += f" {frame.text}" if self._aggregation else frame.text # We have recevied a complete sentence, so if we have seen the # end frame and we were still aggregating, it means we should # send the aggregation.