From 19770b76b499a8e2c2783b22f4819845912e7950 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Tue, 21 Oct 2025 10:15:11 -0400 Subject: [PATCH] Update `OpenAIRealtimeLLMService` to work with `LLMContext` and `LLMContextAggregatorPair` (cont'd). Add back file that was removed, when it should've just been deprecated. Also, fix version numbers in deprecation messages to match the next expected release. --- .../services/openai/realtime/context.py | 5 +++-- src/pipecat/services/openai/realtime/frames.py | 2 +- src/pipecat/services/openai/realtime/llm.py | 2 +- .../services/openai_realtime/context.py | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 src/pipecat/services/openai_realtime/context.py diff --git a/src/pipecat/services/openai/realtime/context.py b/src/pipecat/services/openai/realtime/context.py index 57979406c..96a714565 100644 --- a/src/pipecat/services/openai/realtime/context.py +++ b/src/pipecat/services/openai/realtime/context.py @@ -6,7 +6,7 @@ """OpenAI Realtime LLM context and aggregator implementations. -.. deprecated:: 0.0.92 +.. deprecated:: 0.0.91 OpenAI Realtime no longer uses types from this module under the hood. It now uses `LLMContext` and `LLMContextAggregatorPair`. Using the new patterns should allow you to not need types from this module. @@ -57,7 +57,8 @@ import warnings with warnings.catch_warnings(): warnings.simplefilter("always") warnings.warn( - "Types in pipecat.services.openai.realtime.llm are deprecated. \n" + "Types in pipecat.services.openai.realtime.llm (or " + "pipecat.services.openai_realtime.llm) are deprecated. \n" "OpenAI Realtime no longer uses types from this module under the hood. \n" "It now uses `LLMContext` and `LLMContextAggregatorPair`. \n" "Using the new patterns should allow you to not need types from this module.\n\n" diff --git a/src/pipecat/services/openai/realtime/frames.py b/src/pipecat/services/openai/realtime/frames.py index 39cfd9757..1f800af89 100644 --- a/src/pipecat/services/openai/realtime/frames.py +++ b/src/pipecat/services/openai/realtime/frames.py @@ -6,7 +6,7 @@ """Custom frame types for OpenAI Realtime API integration. -.. deprecated:: 0.0.92 +.. deprecated:: 0.0.91 OpenAI Realtime no longer uses types from this module under the hood. It now works more like most LLM services in Pipecat, relying on updates to diff --git a/src/pipecat/services/openai/realtime/llm.py b/src/pipecat/services/openai/realtime/llm.py index eb2ba5ef4..5e042cff3 100644 --- a/src/pipecat/services/openai/realtime/llm.py +++ b/src/pipecat/services/openai/realtime/llm.py @@ -121,7 +121,7 @@ class OpenAIRealtimeLLMService(LLMService): start_audio_paused: Whether to start with audio input paused. Defaults to False. send_transcription_frames: Whether to emit transcription frames. - .. deprecated:: 0.0.92 + .. deprecated:: 0.0.91 This parameter is deprecated and will be removed in a future version. Transcription frames are always sent. diff --git a/src/pipecat/services/openai_realtime/context.py b/src/pipecat/services/openai_realtime/context.py new file mode 100644 index 000000000..79a01b980 --- /dev/null +++ b/src/pipecat/services/openai_realtime/context.py @@ -0,0 +1,18 @@ +# +# Copyright (c) 2025, Daily +# +# SPDX-License-Identifier: BSD 2-Clause License +# + +"""OpenAI Realtime LLM context and aggregator implementations. + +.. deprecated:: 0.0.91 + OpenAI Realtime no longer uses types from this module under the hood. + It now uses `LLMContext` and `LLMContextAggregatorPair`. + Using the new patterns should allow you to not need types from this module. + + See deprecation warning in pipecat.services.openai.realtime.context for + more details. +""" + +from pipecat.services.openai.realtime.context import *