diff --git a/examples/foundational/07k-interruptible-lmnt.py b/examples/foundational/07k-interruptible-lmnt.py index 43618f84f..e616543a3 100644 --- a/examples/foundational/07k-interruptible-lmnt.py +++ b/examples/foundational/07k-interruptible-lmnt.py @@ -10,7 +10,6 @@ import os from dotenv import load_dotenv from loguru import logger -from pipecat.audio.turn.smart_turn.base_smart_turn import SmartTurnParams from pipecat.audio.turn.smart_turn.local_smart_turn_v3 import LocalSmartTurnAnalyzerV3 from pipecat.audio.vad.silero import SileroVADAnalyzer from pipecat.audio.vad.vad_analyzer import VADParams diff --git a/examples/foundational/07n-interruptible-gemini-image.py b/examples/foundational/07n-interruptible-gemini-image.py index a465724f2..f32aebee1 100644 --- a/examples/foundational/07n-interruptible-gemini-image.py +++ b/examples/foundational/07n-interruptible-gemini-image.py @@ -45,7 +45,6 @@ from pipecat.services.google.tts import GoogleTTSService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams -from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams from pipecat.turns.user_stop import TurnAnalyzerUserTurnStopStrategy from pipecat.turns.user_turn_strategies import UserTurnStrategies diff --git a/examples/foundational/07p-interruptible-krisp-viva.py b/examples/foundational/07p-interruptible-krisp-viva.py index be336f003..fd899f213 100644 --- a/examples/foundational/07p-interruptible-krisp-viva.py +++ b/examples/foundational/07p-interruptible-krisp-viva.py @@ -28,7 +28,7 @@ from dotenv import load_dotenv from loguru import logger from pipecat.audio.filters.krisp_viva_filter import KrispVivaFilter -from pipecat.audio.turn.krisp_viva_turn import KrispTurnParams, KrispVivaTurn +from pipecat.audio.turn.krisp_viva_turn import KrispVivaTurn from pipecat.audio.vad.silero import SileroVADAnalyzer from pipecat.audio.vad.vad_analyzer import VADParams from pipecat.frames.frames import LLMRunFrame diff --git a/examples/foundational/11-sound-effects.py b/examples/foundational/11-sound-effects.py index 8201790ac..b517cf447 100644 --- a/examples/foundational/11-sound-effects.py +++ b/examples/foundational/11-sound-effects.py @@ -22,7 +22,7 @@ from pipecat.frames.frames import ( ) from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner -from pipecat.pipeline.task import PipelineParams, PipelineTask +from pipecat.pipeline.task import PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import ( LLMContextAggregatorPair, diff --git a/examples/foundational/20d-persistent-context-gemini.py b/examples/foundational/20d-persistent-context-gemini.py index a29eb5cf9..e0e2949a3 100644 --- a/examples/foundational/20d-persistent-context-gemini.py +++ b/examples/foundational/20d-persistent-context-gemini.py @@ -17,7 +17,7 @@ from pipecat.adapters.schemas.tools_schema import ToolsSchema from pipecat.audio.turn.smart_turn.local_smart_turn_v3 import LocalSmartTurnAnalyzerV3 from pipecat.audio.vad.silero import SileroVADAnalyzer from pipecat.audio.vad.vad_analyzer import VADParams -from pipecat.frames.frames import LLMRunFrame, TTSSpeakFrame, UserImageRequestFrame +from pipecat.frames.frames import LLMRunFrame, UserImageRequestFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask diff --git a/examples/foundational/20e-persistent-context-aws-nova-sonic.py b/examples/foundational/20e-persistent-context-aws-nova-sonic.py index bd95fb7e7..5b8a256ef 100644 --- a/examples/foundational/20e-persistent-context-aws-nova-sonic.py +++ b/examples/foundational/20e-persistent-context-aws-nova-sonic.py @@ -22,7 +22,6 @@ from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair -from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.aws.nova_sonic.llm import AWSNovaSonicLLMService diff --git a/examples/foundational/39c-multiple-mcp.py b/examples/foundational/39c-multiple-mcp.py index 6141b371e..05cbe2b22 100644 --- a/examples/foundational/39c-multiple-mcp.py +++ b/examples/foundational/39c-multiple-mcp.py @@ -9,7 +9,6 @@ import asyncio import io import json import os -import re import shutil import aiohttp diff --git a/examples/foundational/49d-thinking-functions-google.py b/examples/foundational/49d-thinking-functions-google.py index 1a74da3ff..e00c3d00f 100644 --- a/examples/foundational/49d-thinking-functions-google.py +++ b/examples/foundational/49d-thinking-functions-google.py @@ -13,7 +13,7 @@ from pipecat.adapters.schemas.tools_schema import ToolsSchema from pipecat.audio.turn.smart_turn.local_smart_turn_v3 import LocalSmartTurnAnalyzerV3 from pipecat.audio.vad.silero import SileroVADAnalyzer from pipecat.audio.vad.vad_analyzer import VADParams -from pipecat.frames.frames import LLMRunFrame, ThoughtTranscriptionMessage, TranscriptionMessage +from pipecat.frames.frames import LLMRunFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask diff --git a/examples/foundational/51-grok-realtime.py b/examples/foundational/51-grok-realtime.py index 6a2fbe5a2..87486a0de 100644 --- a/examples/foundational/51-grok-realtime.py +++ b/examples/foundational/51-grok-realtime.py @@ -53,8 +53,6 @@ from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.grok.realtime.events import ( SessionProperties, - WebSearchTool, - XSearchTool, ) from pipecat.services.grok.realtime.llm import GrokRealtimeLLMService from pipecat.services.llm_service import FunctionCallParams 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/adapters/services/bedrock_adapter.py b/src/pipecat/adapters/services/bedrock_adapter.py index 8e46b1899..ccbbe5e2e 100644 --- a/src/pipecat/adapters/services/bedrock_adapter.py +++ b/src/pipecat/adapters/services/bedrock_adapter.py @@ -10,7 +10,7 @@ import base64 import copy import json from dataclasses import dataclass -from typing import Any, Dict, List, Literal, Optional, TypedDict +from typing import Any, Dict, List, Optional, TypedDict from loguru import logger diff --git a/src/pipecat/adapters/services/gemini_adapter.py b/src/pipecat/adapters/services/gemini_adapter.py index 2de3742c8..4968c2719 100644 --- a/src/pipecat/adapters/services/gemini_adapter.py +++ b/src/pipecat/adapters/services/gemini_adapter.py @@ -9,7 +9,7 @@ import base64 import json from dataclasses import dataclass, field -from typing import Any, Dict, List, Optional, Tuple, TypedDict +from typing import Any, Dict, List, Optional, TypedDict from loguru import logger from openai import NotGiven diff --git a/src/pipecat/adapters/services/open_ai_adapter.py b/src/pipecat/adapters/services/open_ai_adapter.py index 6c44a3404..f4b534f2c 100644 --- a/src/pipecat/adapters/services/open_ai_adapter.py +++ b/src/pipecat/adapters/services/open_ai_adapter.py @@ -7,10 +7,8 @@ """OpenAI LLM adapter for Pipecat.""" import copy -import json from typing import Any, Dict, List, TypedDict -from openai._types import NOT_GIVEN as OPEN_AI_NOT_GIVEN from openai._types import NotGiven as OpenAINotGiven from openai.types.chat import ( ChatCompletionMessageParam, diff --git a/src/pipecat/audio/filters/krisp_viva_filter.py b/src/pipecat/audio/filters/krisp_viva_filter.py index 2f9dda10f..ea5bfb8de 100644 --- a/src/pipecat/audio/filters/krisp_viva_filter.py +++ b/src/pipecat/audio/filters/krisp_viva_filter.py @@ -9,7 +9,6 @@ This module provides an audio filter implementation using Krisp VIVA SDK. """ -import asyncio import os import numpy as np diff --git a/src/pipecat/processors/aggregators/openai_llm_context.py b/src/pipecat/processors/aggregators/openai_llm_context.py index 41df3b5e8..f75625156 100644 --- a/src/pipecat/processors/aggregators/openai_llm_context.py +++ b/src/pipecat/processors/aggregators/openai_llm_context.py @@ -34,7 +34,6 @@ from PIL import Image from pipecat.adapters.base_llm_adapter import BaseLLMAdapter from pipecat.adapters.schemas.tools_schema import ToolsSchema from pipecat.frames.frames import AudioRawFrame, Frame -from pipecat.processors.frame_processor import FrameDirection, FrameProcessor # JSON custom encoder to handle bytes arrays so that we can log contexts # with images to the console. diff --git a/src/pipecat/processors/filters/wake_check_filter.py b/src/pipecat/processors/filters/wake_check_filter.py index 792c4a68d..ec8f31f53 100644 --- a/src/pipecat/processors/filters/wake_check_filter.py +++ b/src/pipecat/processors/filters/wake_check_filter.py @@ -18,7 +18,7 @@ from typing import List from loguru import logger -from pipecat.frames.frames import ErrorFrame, Frame, TranscriptionFrame +from pipecat.frames.frames import Frame, TranscriptionFrame from pipecat.processors.frame_processor import FrameDirection, FrameProcessor 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/stt.py b/src/pipecat/services/aws/stt.py index 2ad350a96..5ae99b02f 100644 --- a/src/pipecat/services/aws/stt.py +++ b/src/pipecat/services/aws/stt.py @@ -10,7 +10,6 @@ This module provides a WebSocket-based connection to AWS Transcribe for real-tim speech-to-text transcription with support for multiple languages and audio formats. """ -import asyncio import json import os import random diff --git a/src/pipecat/services/aws/tts.py b/src/pipecat/services/aws/tts.py index 0df2dabd9..358a894c7 100644 --- a/src/pipecat/services/aws/tts.py +++ b/src/pipecat/services/aws/tts.py @@ -10,7 +10,6 @@ This module provides integration with Amazon Polly for text-to-speech synthesis, supporting multiple languages, voices, and SSML features. """ -import asyncio import os from typing import AsyncGenerator, List, Optional 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/azure/common.py b/src/pipecat/services/azure/common.py index f867d4e5d..dc7aaa359 100644 --- a/src/pipecat/services/azure/common.py +++ b/src/pipecat/services/azure/common.py @@ -8,8 +8,6 @@ from typing import Optional -from loguru import logger - from pipecat.transcriptions.language import Language, resolve_language diff --git a/src/pipecat/services/azure/image.py b/src/pipecat/services/azure/image.py index b33d8cc7d..2bddf6c43 100644 --- a/src/pipecat/services/azure/image.py +++ b/src/pipecat/services/azure/image.py @@ -15,7 +15,6 @@ import io from typing import AsyncGenerator import aiohttp -from loguru import logger from PIL import Image from pipecat.frames.frames import ErrorFrame, Frame, URLImageRawFrame diff --git a/src/pipecat/services/cerebras/llm.py b/src/pipecat/services/cerebras/llm.py index 9ceb48905..54ea45ddb 100644 --- a/src/pipecat/services/cerebras/llm.py +++ b/src/pipecat/services/cerebras/llm.py @@ -6,8 +6,6 @@ """Cerebras LLM service implementation using OpenAI-compatible interface.""" -from typing import List - from loguru import logger from pipecat.adapters.services.open_ai_adapter import OpenAILLMInvocationParams diff --git a/src/pipecat/services/deepgram/flux/stt.py b/src/pipecat/services/deepgram/flux/stt.py index 35b00af65..045af9811 100644 --- a/src/pipecat/services/deepgram/flux/stt.py +++ b/src/pipecat/services/deepgram/flux/stt.py @@ -27,7 +27,6 @@ from pipecat.frames.frames import ( UserStartedSpeakingFrame, UserStoppedSpeakingFrame, ) -from pipecat.processors.frame_processor import FrameDirection from pipecat.services.stt_service import WebsocketSTTService from pipecat.transcriptions.language import Language from pipecat.utils.time import time_now_iso8601 diff --git a/src/pipecat/services/deepseek/llm.py b/src/pipecat/services/deepseek/llm.py index 50bdebd3b..56f1ddd18 100644 --- a/src/pipecat/services/deepseek/llm.py +++ b/src/pipecat/services/deepseek/llm.py @@ -6,8 +6,6 @@ """DeepSeek LLM service implementation using OpenAI-compatible interface.""" -from typing import List - from loguru import logger from pipecat.adapters.services.open_ai_adapter import OpenAILLMInvocationParams diff --git a/src/pipecat/services/fireworks/llm.py b/src/pipecat/services/fireworks/llm.py index 92467786f..d7bf57908 100644 --- a/src/pipecat/services/fireworks/llm.py +++ b/src/pipecat/services/fireworks/llm.py @@ -6,8 +6,6 @@ """Fireworks AI service implementation using OpenAI-compatible interface.""" -from typing import List - from loguru import logger from pipecat.adapters.services.open_ai_adapter import OpenAILLMInvocationParams 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/google/llm.py b/src/pipecat/services/google/llm.py index 20341b64d..adb2664bb 100644 --- a/src/pipecat/services/google/llm.py +++ b/src/pipecat/services/google/llm.py @@ -40,7 +40,6 @@ from pipecat.frames.frames import ( LLMThoughtStartFrame, LLMThoughtTextFrame, LLMUpdateSettingsFrame, - OutputImageRawFrame, UserImageRawFrame, ) from pipecat.metrics.metrics import LLMTokenUsage diff --git a/src/pipecat/services/google/rtvi.py b/src/pipecat/services/google/rtvi.py index 1cc68f5e4..1ef70d67d 100644 --- a/src/pipecat/services/google/rtvi.py +++ b/src/pipecat/services/google/rtvi.py @@ -15,9 +15,7 @@ from typing import List, Literal, Optional from pydantic import BaseModel -from pipecat.frames.frames import Frame from pipecat.observers.base_observer import FramePushed -from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.processors.frameworks.rtvi import RTVIObserver, RTVIProcessor from pipecat.services.google.frames import LLMSearchOrigin, LLMSearchResponseFrame diff --git a/src/pipecat/services/google/stt.py b/src/pipecat/services/google/stt.py index ac77f0450..dcf0adf89 100644 --- a/src/pipecat/services/google/stt.py +++ b/src/pipecat/services/google/stt.py @@ -29,7 +29,6 @@ from pydantic import BaseModel, Field, field_validator from pipecat.frames.frames import ( CancelFrame, EndFrame, - ErrorFrame, Frame, InterimTranscriptionFrame, StartFrame, diff --git a/src/pipecat/services/gradium/tts.py b/src/pipecat/services/gradium/tts.py index 14e093541..df33753ce 100644 --- a/src/pipecat/services/gradium/tts.py +++ b/src/pipecat/services/gradium/tts.py @@ -6,7 +6,6 @@ import base64 import json -import uuid from typing import Any, AsyncGenerator, Mapping, Optional from loguru import logger diff --git a/src/pipecat/services/hume/tts.py b/src/pipecat/services/hume/tts.py index c169cf4c0..7f8943816 100644 --- a/src/pipecat/services/hume/tts.py +++ b/src/pipecat/services/hume/tts.py @@ -16,7 +16,6 @@ from pipecat import version as pipecat_version from pipecat.frames.frames import ( CancelFrame, EndFrame, - ErrorFrame, Frame, InterruptionFrame, StartFrame, diff --git a/src/pipecat/services/mem0/memory.py b/src/pipecat/services/mem0/memory.py index d0c8e66dc..c4dfe16de 100644 --- a/src/pipecat/services/mem0/memory.py +++ b/src/pipecat/services/mem0/memory.py @@ -16,7 +16,7 @@ from typing import Any, Dict, List, Optional from loguru import logger from pydantic import BaseModel, Field -from pipecat.frames.frames import ErrorFrame, Frame, LLMContextFrame, LLMMessagesFrame +from pipecat.frames.frames import Frame, LLMContextFrame, LLMMessagesFrame from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.openai_llm_context import ( OpenAILLMContext, diff --git a/src/pipecat/services/mistral/llm.py b/src/pipecat/services/mistral/llm.py index b95c3d1ab..54361ef28 100644 --- a/src/pipecat/services/mistral/llm.py +++ b/src/pipecat/services/mistral/llm.py @@ -9,12 +9,10 @@ from typing import List, Sequence from loguru import logger -from openai import AsyncStream -from openai.types.chat import ChatCompletionChunk, ChatCompletionMessageParam +from openai.types.chat import ChatCompletionMessageParam from pipecat.adapters.services.open_ai_adapter import OpenAILLMInvocationParams from pipecat.frames.frames import FunctionCallFromLLM -from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext from pipecat.services.openai.llm import OpenAILLMService 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/openpipe/llm.py b/src/pipecat/services/openpipe/llm.py index f3e95f71b..fa53c1554 100644 --- a/src/pipecat/services/openpipe/llm.py +++ b/src/pipecat/services/openpipe/llm.py @@ -10,7 +10,7 @@ This module provides an OpenPipe-specific implementation of the OpenAI LLM servi enabling integration with OpenPipe's fine-tuning and monitoring capabilities. """ -from typing import Dict, List, Optional +from typing import Dict, Optional from loguru import logger diff --git a/src/pipecat/services/ultravox/llm.py b/src/pipecat/services/ultravox/llm.py index 489ba367d..d549b11e5 100644 --- a/src/pipecat/services/ultravox/llm.py +++ b/src/pipecat/services/ultravox/llm.py @@ -19,7 +19,6 @@ from typing import Any, Dict, List, Literal, Optional, Union import aiohttp from loguru import logger -from openai.types import chat as openai_chat_types from pydantic import BaseModel, Field from pipecat.adapters.schemas.tools_schema import ToolsSchema 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/sync/base_notifier.py b/src/pipecat/sync/base_notifier.py index 474d50a8b..fb6e12732 100644 --- a/src/pipecat/sync/base_notifier.py +++ b/src/pipecat/sync/base_notifier.py @@ -8,8 +8,6 @@ import warnings -from pipecat.utils.sync.base_notifier import BaseNotifier - with warnings.catch_warnings(): warnings.simplefilter("always") warnings.warn( diff --git a/src/pipecat/sync/event_notifier.py b/src/pipecat/sync/event_notifier.py index 2a33cab73..6a6f6abbe 100644 --- a/src/pipecat/sync/event_notifier.py +++ b/src/pipecat/sync/event_notifier.py @@ -8,8 +8,6 @@ import warnings -from pipecat.utils.sync.event_notifier import EventNotifier - with warnings.catch_warnings(): warnings.simplefilter("always") warnings.warn( diff --git a/src/pipecat/transports/smallwebrtc/connection.py b/src/pipecat/transports/smallwebrtc/connection.py index b37d63c9a..b9b6538f1 100644 --- a/src/pipecat/transports/smallwebrtc/connection.py +++ b/src/pipecat/transports/smallwebrtc/connection.py @@ -24,7 +24,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", +] diff --git a/src/pipecat/turns/user_stop/turn_analyzer_user_turn_stop_strategy.py b/src/pipecat/turns/user_stop/turn_analyzer_user_turn_stop_strategy.py index b21177dc4..1bb266380 100644 --- a/src/pipecat/turns/user_stop/turn_analyzer_user_turn_stop_strategy.py +++ b/src/pipecat/turns/user_stop/turn_analyzer_user_turn_stop_strategy.py @@ -10,7 +10,6 @@ import asyncio from typing import Optional from pipecat.audio.turn.base_turn_analyzer import BaseTurnAnalyzer, EndOfTurnState -from pipecat.audio.turn.smart_turn.base_smart_turn import SmartTurnParams from pipecat.frames.frames import ( Frame, InputAudioRawFrame, diff --git a/src/pipecat/utils/text/skip_tags_aggregator.py b/src/pipecat/utils/text/skip_tags_aggregator.py index 1212bd34d..4232efd7d 100644 --- a/src/pipecat/utils/text/skip_tags_aggregator.py +++ b/src/pipecat/utils/text/skip_tags_aggregator.py @@ -14,7 +14,7 @@ as a unit regardless of internal punctuation. from typing import AsyncIterator, Optional, Sequence from pipecat.utils.string import StartEndTags, parse_start_end_tags -from pipecat.utils.text.base_text_aggregator import Aggregation, AggregationType +from pipecat.utils.text.base_text_aggregator import Aggregation from pipecat.utils.text.simple_text_aggregator import SimpleTextAggregator diff --git a/tests/integration/test_integration_unified_function_calling.py b/tests/integration/test_integration_unified_function_calling.py index d017c55ac..552c839a5 100644 --- a/tests/integration/test_integration_unified_function_calling.py +++ b/tests/integration/test_integration_unified_function_calling.py @@ -5,7 +5,6 @@ # import os -from unittest.mock import AsyncMock import pytest from dotenv import load_dotenv diff --git a/tests/test_get_llm_invocation_params.py b/tests/test_get_llm_invocation_params.py index ad1437227..c93275b67 100644 --- a/tests/test_get_llm_invocation_params.py +++ b/tests/test_get_llm_invocation_params.py @@ -43,7 +43,6 @@ For AWS Bedrock adapter: import unittest from google.genai.types import Content, Part -from openai.types.chat import ChatCompletionMessage from pipecat.adapters.services.anthropic_adapter import AnthropicLLMAdapter from pipecat.adapters.services.bedrock_adapter import AWSBedrockLLMAdapter @@ -51,7 +50,6 @@ from pipecat.adapters.services.gemini_adapter import GeminiLLMAdapter from pipecat.adapters.services.open_ai_adapter import OpenAILLMAdapter from pipecat.processors.aggregators.llm_context import ( LLMContext, - LLMSpecificMessage, LLMStandardMessage, ) diff --git a/tests/test_rnnoise_filter.py b/tests/test_rnnoise_filter.py index 9e53b5b47..db3ac7825 100644 --- a/tests/test_rnnoise_filter.py +++ b/tests/test_rnnoise_filter.py @@ -5,7 +5,7 @@ # import unittest -from unittest.mock import AsyncMock, MagicMock, patch +from unittest.mock import AsyncMock import numpy as np diff --git a/tests/test_rnnoise_resampling.py b/tests/test_rnnoise_resampling.py index c69419d2e..060c9e802 100644 --- a/tests/test_rnnoise_resampling.py +++ b/tests/test_rnnoise_resampling.py @@ -4,7 +4,6 @@ # SPDX-License-Identifier: BSD 2-Clause License # -import asyncio import sys import unittest from unittest.mock import MagicMock, patch diff --git a/tests/test_stt_mute_filter.py b/tests/test_stt_mute_filter.py index 459060b86..39631d7e8 100644 --- a/tests/test_stt_mute_filter.py +++ b/tests/test_stt_mute_filter.py @@ -10,7 +10,6 @@ from pipecat.frames.frames import ( BotStartedSpeakingFrame, BotStoppedSpeakingFrame, FunctionCallFromLLM, - FunctionCallInProgressFrame, FunctionCallResultFrame, FunctionCallsStartedFrame, InputAudioRawFrame,