From 11cf891ac82ddeccb576693d6d9ca3287d014674 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Sun, 18 Jan 2026 08:54:34 -0500 Subject: [PATCH] Manual updates for unused imports --- examples/quickstart/pcc-deploy.toml | 8 ++++---- scripts/krisp/test_krisp_viva_filter_audiofile.py | 2 +- scripts/krisp/test_krisp_viva_turn_audiofile.py | 2 +- src/pipecat/runner/run.py | 8 +------- src/pipecat/services/aws_nova_sonic/__init__.py | 5 +++++ .../services/gemini_multimodal_live/__init__.py | 5 +++++ src/pipecat/services/google/gemini_live/__init__.py | 6 ++++++ src/pipecat/services/moondream/vision.py | 2 +- src/pipecat/services/openai_realtime/__init__.py | 10 ++++++++++ src/pipecat/services/openai_realtime_beta/__init__.py | 10 ++++++++++ src/pipecat/services/whisper/stt.py | 2 +- src/pipecat/transports/smallwebrtc/connection.py | 1 - src/pipecat/turns/mute/__init__.py | 8 ++++++++ 13 files changed, 53 insertions(+), 16 deletions(-) diff --git a/examples/quickstart/pcc-deploy.toml b/examples/quickstart/pcc-deploy.toml index ff77c45dc..812e2b8e6 100644 --- a/examples/quickstart/pcc-deploy.toml +++ b/examples/quickstart/pcc-deploy.toml @@ -1,11 +1,11 @@ -agent_name = "quickstart" -image = "your_username/quickstart:0.1" -secret_set = "quickstart-secrets" +agent_name = "quickstart-test" +image = "markatdaily/quickstart-test:latest" +secret_set = "quickstart-test-secrets" agent_profile = "agent-1x" # RECOMMENDED: Set an image pull secret: # https://docs.pipecat.ai/deployment/pipecat-cloud/fundamentals/secrets#image-pull-secrets -# image_credentials = "your_image_pull_secret" +image_credentials = "dockerhub-access" [scaling] min_agents = 1 diff --git a/scripts/krisp/test_krisp_viva_filter_audiofile.py b/scripts/krisp/test_krisp_viva_filter_audiofile.py index c75dc19fc..65e9d7685 100644 --- a/scripts/krisp/test_krisp_viva_filter_audiofile.py +++ b/scripts/krisp/test_krisp_viva_filter_audiofile.py @@ -22,7 +22,7 @@ from pathlib import Path try: import numpy as np - import soundfile as sf + import soundfile as sf # noqa: F401 from audio_file_utils import calculate_audio_stats, read_audio_file, write_audio_file except ImportError as e: print(f"Error: Missing required dependencies: {e}") diff --git a/scripts/krisp/test_krisp_viva_turn_audiofile.py b/scripts/krisp/test_krisp_viva_turn_audiofile.py index c380ad98f..6580e8e90 100644 --- a/scripts/krisp/test_krisp_viva_turn_audiofile.py +++ b/scripts/krisp/test_krisp_viva_turn_audiofile.py @@ -23,7 +23,7 @@ from pathlib import Path try: import numpy as np - import soundfile as sf + import soundfile as sf # noqa: F401 from audio_file_utils import read_audio_file except ImportError as e: print(f"Error: Missing required dependencies: {e}") diff --git a/src/pipecat/runner/run.py b/src/pipecat/runner/run.py index 0396e393b..96fbf2598 100644 --- a/src/pipecat/runner/run.py +++ b/src/pipecat/runner/run.py @@ -263,7 +263,7 @@ def _setup_webrtc_routes( """Handle WebRTC offer requests via SmallWebRTCRequestHandler.""" # Prepare runner arguments with the callback to run your bot - async def webrtc_connection_callback(connection): + async def webrtc_connection_callback(connection: SmallWebRTCConnection): bot_module = _get_bot_module() runner_args = SmallWebRTCRunnerArguments( @@ -406,13 +406,7 @@ def _setup_whatsapp_routes(app: FastAPI): return try: - from pipecat_ai_small_webrtc_prebuilt.frontend import SmallWebRTCPrebuiltUI - from pipecat.transports.smallwebrtc.connection import SmallWebRTCConnection - from pipecat.transports.smallwebrtc.request_handler import ( - SmallWebRTCRequest, - SmallWebRTCRequestHandler, - ) from pipecat.transports.whatsapp.api import WhatsAppWebhookRequest from pipecat.transports.whatsapp.client import WhatsAppClient except ImportError as e: diff --git a/src/pipecat/services/aws_nova_sonic/__init__.py b/src/pipecat/services/aws_nova_sonic/__init__.py index 8348e9ffe..a198094cb 100644 --- a/src/pipecat/services/aws_nova_sonic/__init__.py +++ b/src/pipecat/services/aws_nova_sonic/__init__.py @@ -17,3 +17,8 @@ with warnings.catch_warnings(): DeprecationWarning, stacklevel=2, ) + +__all__ = [ + "AWSNovaSonicLLMService", + "Params", +] diff --git a/src/pipecat/services/gemini_multimodal_live/__init__.py b/src/pipecat/services/gemini_multimodal_live/__init__.py index 513d9fd66..ac4524606 100644 --- a/src/pipecat/services/gemini_multimodal_live/__init__.py +++ b/src/pipecat/services/gemini_multimodal_live/__init__.py @@ -1,2 +1,7 @@ from .file_api import GeminiFileAPI from .gemini import GeminiMultimodalLiveLLMService + +__all__ = [ + "GeminiFileAPI", + "GeminiMultimodalLiveLLMService", +] diff --git a/src/pipecat/services/google/gemini_live/__init__.py b/src/pipecat/services/google/gemini_live/__init__.py index 142ca2a83..f4bfbb5c8 100644 --- a/src/pipecat/services/google/gemini_live/__init__.py +++ b/src/pipecat/services/google/gemini_live/__init__.py @@ -1,3 +1,9 @@ from .file_api import GeminiFileAPI from .llm import GeminiLiveLLMService from .llm_vertex import GeminiLiveVertexLLMService + +__all__ = [ + "GeminiFileAPI", + "GeminiLiveLLMService", + "GeminiLiveVertexLLMService", +] diff --git a/src/pipecat/services/moondream/vision.py b/src/pipecat/services/moondream/vision.py index f0ae8dca2..6a180b4cb 100644 --- a/src/pipecat/services/moondream/vision.py +++ b/src/pipecat/services/moondream/vision.py @@ -46,7 +46,7 @@ def detect_device(): and dtype is the recommended torch data type for that device. """ try: - import intel_extension_for_pytorch + import intel_extension_for_pytorch # noqa: F401 if torch.xpu.is_available(): return torch.device("xpu"), torch.float32 diff --git a/src/pipecat/services/openai_realtime/__init__.py b/src/pipecat/services/openai_realtime/__init__.py index a302c783b..90729ef31 100644 --- a/src/pipecat/services/openai_realtime/__init__.py +++ b/src/pipecat/services/openai_realtime/__init__.py @@ -25,3 +25,13 @@ with warnings.catch_warnings(): DeprecationWarning, stacklevel=2, ) + +__all__ = [ + "AzureRealtimeLLMService", + "InputAudioNoiseReduction", + "InputAudioTranscription", + "SemanticTurnDetection", + "SessionProperties", + "TurnDetection", + "OpenAIRealtimeLLMService", +] diff --git a/src/pipecat/services/openai_realtime_beta/__init__.py b/src/pipecat/services/openai_realtime_beta/__init__.py index 595105d7f..b7c976bb6 100644 --- a/src/pipecat/services/openai_realtime_beta/__init__.py +++ b/src/pipecat/services/openai_realtime_beta/__init__.py @@ -7,3 +7,13 @@ from .events import ( TurnDetection, ) from .openai import OpenAIRealtimeBetaLLMService + +__all__ = [ + "AzureRealtimeBetaLLMService", + "InputAudioNoiseReduction", + "InputAudioTranscription", + "SemanticTurnDetection", + "SessionProperties", + "TurnDetection", + "OpenAIRealtimeBetaLLMService", +] diff --git a/src/pipecat/services/whisper/stt.py b/src/pipecat/services/whisper/stt.py index 27ba743ac..3865578e1 100644 --- a/src/pipecat/services/whisper/stt.py +++ b/src/pipecat/services/whisper/stt.py @@ -33,7 +33,7 @@ if TYPE_CHECKING: raise Exception(f"Missing module: {e}") try: - import mlx_whisper + import mlx_whisper # noqa: F401 except ModuleNotFoundError as e: logger.error(f"Exception: {e}") logger.error("In order to use Whisper, you need to `pip install pipecat-ai[mlx-whisper]`.") diff --git a/src/pipecat/transports/smallwebrtc/connection.py b/src/pipecat/transports/smallwebrtc/connection.py index 5a5a1450d..259645d10 100644 --- a/src/pipecat/transports/smallwebrtc/connection.py +++ b/src/pipecat/transports/smallwebrtc/connection.py @@ -23,7 +23,6 @@ from pipecat.utils.base_object import BaseObject try: from aiortc import ( - MediaStreamTrack, RTCConfiguration, RTCIceServer, RTCPeerConnection, diff --git a/src/pipecat/turns/mute/__init__.py b/src/pipecat/turns/mute/__init__.py index 02b66688f..c82b10ae7 100644 --- a/src/pipecat/turns/mute/__init__.py +++ b/src/pipecat/turns/mute/__init__.py @@ -22,3 +22,11 @@ with warnings.catch_warnings(): DeprecationWarning, stacklevel=2, ) + +__all__ = [ + "AlwaysUserMuteStrategy", + "BaseUserMuteStrategy", + "FirstSpeechUserMuteStrategy", + "FunctionCallUserMuteStrategy", + "MuteUntilFirstBotCompleteUserMuteStrategy", +]