From b9a2ed5b586b0999a6d5745d006f447c0afc104b Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Wed, 2 Apr 2025 20:55:39 -0400 Subject: [PATCH] Fix: GeminiMultimodalLiveLLMService, add spaces between words in assistant context messages --- CHANGELOG.md | 3 +++ src/pipecat/services/gemini_multimodal_live/gemini.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ba5558ef..67ad784f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 `TransportParams.audio_out_10ms_chunks`. Previously, it only worked with 20ms chunks. +- Fixed an issue with `GeminiMultimodalLiveLLMService` where the assistant + context messages had no space between words. + - Fixed an issue where `LLMAssistantContextAggregator` would prevent a `BotStoppedSpeakingFrame` from moving through the pipeline. diff --git a/src/pipecat/services/gemini_multimodal_live/gemini.py b/src/pipecat/services/gemini_multimodal_live/gemini.py index 27d7d8a76..1051d2f60 100644 --- a/src/pipecat/services/gemini_multimodal_live/gemini.py +++ b/src/pipecat/services/gemini_multimodal_live/gemini.py @@ -898,7 +898,7 @@ class GeminiMultimodalLiveLLMService(LLMService): GeminiMultimodalLiveContext.upgrade(context) user = GeminiMultimodalLiveUserContextAggregator(context, **user_kwargs) - default_assistant_kwargs = {"expect_stripped_words": False} + default_assistant_kwargs = {"expect_stripped_words": True} default_assistant_kwargs.update(assistant_kwargs) assistant = GeminiMultimodalLiveAssistantContextAggregator( context, **default_assistant_kwargs