From 8894db429026742a077fd4cc1ec7f0237c142090 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Thu, 23 Oct 2025 16:39:13 -0400 Subject: [PATCH] Update `OpenAIRealtimeLLMService` to work with `LLMContext` and `LLMContextAggregatorPair` (cont'd). Add warning about no longer pushing `TTSTextFrame`s. --- CHANGELOG.md | 4 ++++ src/pipecat/services/openai/realtime/llm.py | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a85fc19d..f208bf1d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 by context aggregators, to update its internal state. Listen for `LLMContextFrame`s for context updates. + Finally, `LLMTextFrame`s are no longer pushed from `OpenAIRealtimeLLMService` + when it's configured with `output_modalities=['audio']`. If you need + to process its output, listen for `TTSTextFrame`s instead. + - Expanded support for universal `LLMContext` to `GeminiLiveLLMService`. As a reminder, the context-setup pattern when using `LLMContext` is: diff --git a/src/pipecat/services/openai/realtime/llm.py b/src/pipecat/services/openai/realtime/llm.py index 213c27df7..c46f3435d 100644 --- a/src/pipecat/services/openai/realtime/llm.py +++ b/src/pipecat/services/openai/realtime/llm.py @@ -885,8 +885,11 @@ class OpenAIRealtimeLLMService(LLMService): " context_aggregator.assistant(),\n" " ]\n" ")\n\n" - "Once you've done that (if needed), you can dismiss this warning " - "by updating to the new context-setup pattern:\n\n" + "Also, LLMTextFrames are no longer pushed from " + "OpenAIRealtimeLLMService when it's configured with " + "output_modalities=['audio']. Listen for TTSTextFrames instead.\n\n" + "Once you've made the appropriate changes (if needed), you can" + "dismiss this warning by updating to the new context-setup pattern:\n\n" " context = LLMContext(messages, tools)\n" " context_aggregator = LLMContextAggregatorPair(context)\n" )