From 2921162b3b397f078c4aa5fe9ca1256b82bca694 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Wed, 8 Oct 2025 15:26:19 -0400 Subject: [PATCH] Add deprecation warning around importing StartSensitivity and EndSensitivity from pipecat.services.gemini_multimodal_live.events --- .../services/gemini_multimodal_live/events.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/pipecat/services/gemini_multimodal_live/events.py b/src/pipecat/services/gemini_multimodal_live/events.py index 0d5ce4de5..9705cf9f2 100644 --- a/src/pipecat/services/gemini_multimodal_live/events.py +++ b/src/pipecat/services/gemini_multimodal_live/events.py @@ -4,7 +4,14 @@ # SPDX-License-Identifier: BSD 2-Clause License # -"""Event models and utilities for Google Gemini Multimodal Live API.""" +"""Event models and utilities for Google Gemini Multimodal Live API. + +.. deprecated:: 0.0.90 + Importing StartSensitivity and EndSensitivity from this module is deprecated. + Import them directly from google.genai.types instead. +""" + +import warnings from loguru import logger @@ -23,5 +30,12 @@ except ModuleNotFoundError as e: # These aliases are just here for backward compatibility, since we used to # define public-facing StartSensitivity and EndSensitivity enums in this # module. +warnings.warn( + "Importing StartSensitivity and EndSensitivity from " + "pipecat.services.gemini_multimodal_live.events is deprecated. " + "Please import them directly from google.genai.types instead.", + DeprecationWarning, + stacklevel=2, +) StartSensitivity = _StartSensitivity EndSensitivity = _EndSensitivity