diff --git a/examples/foundational/26-gemini-multimodal-live.py b/examples/foundational/26-gemini-multimodal-live.py index fc7ad9d35..dd5dfcffc 100644 --- a/examples/foundational/26-gemini-multimodal-live.py +++ b/examples/foundational/26-gemini-multimodal-live.py @@ -17,7 +17,7 @@ from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.gemini import GeminiLiveLLMService +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams diff --git a/examples/foundational/26a-gemini-multimodal-live-transcription.py b/examples/foundational/26a-gemini-multimodal-live-transcription.py index cf8660edf..de277156b 100644 --- a/examples/foundational/26a-gemini-multimodal-live-transcription.py +++ b/examples/foundational/26a-gemini-multimodal-live-transcription.py @@ -20,7 +20,7 @@ from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext from pipecat.processors.transcript_processor import TranscriptProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.gemini import GeminiLiveLLMService +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams diff --git a/examples/foundational/26b-gemini-multimodal-live-function-calling.py b/examples/foundational/26b-gemini-multimodal-live-function-calling.py index a08f5a352..8fecf0de6 100644 --- a/examples/foundational/26b-gemini-multimodal-live-function-calling.py +++ b/examples/foundational/26b-gemini-multimodal-live-function-calling.py @@ -22,7 +22,7 @@ from pipecat.pipeline.task import PipelineParams, PipelineTask 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.google.gemini_live.gemini import GeminiLiveLLMService +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams diff --git a/examples/foundational/26c-gemini-multimodal-live-video.py b/examples/foundational/26c-gemini-multimodal-live-video.py index 1ac4eb923..7b765075e 100644 --- a/examples/foundational/26c-gemini-multimodal-live-video.py +++ b/examples/foundational/26c-gemini-multimodal-live-video.py @@ -24,7 +24,7 @@ from pipecat.runner.utils import ( maybe_capture_participant_camera, maybe_capture_participant_screen, ) -from pipecat.services.google.gemini_live.gemini import GeminiLiveLLMService +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams diff --git a/examples/foundational/26d-gemini-multimodal-live-text.py b/examples/foundational/26d-gemini-multimodal-live-text.py index 68fd79c54..05b792c00 100644 --- a/examples/foundational/26d-gemini-multimodal-live-text.py +++ b/examples/foundational/26d-gemini-multimodal-live-text.py @@ -20,7 +20,7 @@ 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.cartesia.tts import CartesiaTTSService -from pipecat.services.google.gemini_live.gemini import ( +from pipecat.services.google.gemini_live.llm import ( GeminiLiveLLMService, GeminiModalities, InputParams, diff --git a/examples/foundational/26e-gemini-multimodal-google-search.py b/examples/foundational/26e-gemini-multimodal-google-search.py index 87c754b75..178fdd282 100644 --- a/examples/foundational/26e-gemini-multimodal-google-search.py +++ b/examples/foundational/26e-gemini-multimodal-google-search.py @@ -19,7 +19,7 @@ from pipecat.pipeline.task import PipelineParams, PipelineTask 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.google.gemini_live.gemini import GeminiLiveLLMService +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams diff --git a/examples/foundational/26f-gemini-multimodal-live-files-api.py b/examples/foundational/26f-gemini-multimodal-live-files-api.py index 51dad712d..eeda16f52 100644 --- a/examples/foundational/26f-gemini-multimodal-live-files-api.py +++ b/examples/foundational/26f-gemini-multimodal-live-files-api.py @@ -19,9 +19,7 @@ from pipecat.pipeline.task import PipelineParams, PipelineTask 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.google.gemini_live.gemini import ( - GeminiLiveLLMService, -) +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams diff --git a/examples/foundational/26g-gemini-multimodal-live-groundingMetadata.py b/examples/foundational/26g-gemini-multimodal-live-groundingMetadata.py index 2b424eb18..bea1756b2 100644 --- a/examples/foundational/26g-gemini-multimodal-live-groundingMetadata.py +++ b/examples/foundational/26g-gemini-multimodal-live-groundingMetadata.py @@ -9,13 +9,13 @@ from pipecat.audio.vad.vad_analyzer import VADParams from pipecat.frames.frames import Frame, LLMRunFrame 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.openai_llm_context import OpenAILLMContext from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.google.frames import LLMSearchResponseFrame -from pipecat.services.google.gemini_live.gemini import GeminiLiveLLMService +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams diff --git a/examples/foundational/26h-gemini-multimodal-live-vertex.py b/examples/foundational/26h-gemini-multimodal-live-vertex.py index f8dfc8c52..79bfac531 100644 --- a/examples/foundational/26h-gemini-multimodal-live-vertex.py +++ b/examples/foundational/26h-gemini-multimodal-live-vertex.py @@ -17,8 +17,7 @@ from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.gemini import GeminiLiveLLMService -from pipecat.services.google.gemini_live.vertex import GeminiLiveVertexLLMService +from pipecat.services.google.gemini_live.llm_vertex import GeminiLiveVertexLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams diff --git a/examples/foundational/26i-gemini-multimodal-live-graceful-end.py b/examples/foundational/26i-gemini-multimodal-live-graceful-end.py index 3527e89e3..e51bbb032 100644 --- a/examples/foundational/26i-gemini-multimodal-live-graceful-end.py +++ b/examples/foundational/26i-gemini-multimodal-live-graceful-end.py @@ -22,7 +22,7 @@ from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext from pipecat.processors.frame_processor import FrameDirection from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.gemini import GeminiLiveLLMService +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams diff --git a/examples/foundational/46-video-processing.py b/examples/foundational/46-video-processing.py index 0152f3211..62ea5debe 100644 --- a/examples/foundational/46-video-processing.py +++ b/examples/foundational/46-video-processing.py @@ -20,7 +20,7 @@ from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.processors.frameworks.rtvi import RTVIObserver, RTVIProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live import GeminiLiveLLMService +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import TransportParams from pipecat.transports.daily.transport import DailyParams, DailyTransport diff --git a/src/pipecat/services/gemini_multimodal_live/gemini.py b/src/pipecat/services/gemini_multimodal_live/gemini.py index a3547551a..8d6847425 100644 --- a/src/pipecat/services/gemini_multimodal_live/gemini.py +++ b/src/pipecat/services/gemini_multimodal_live/gemini.py @@ -18,10 +18,10 @@ voice transcription, streaming responses, and tool usage. import warnings -from pipecat.services.google.gemini_live.gemini import ( +from pipecat.services.google.gemini_live.llm import ( ContextWindowCompressionParams as _ContextWindowCompressionParams, ) -from pipecat.services.google.gemini_live.gemini import ( +from pipecat.services.google.gemini_live.llm import ( GeminiLiveAssistantContextAggregator, GeminiLiveContext, GeminiLiveContextAggregatorPair, @@ -29,11 +29,9 @@ from pipecat.services.google.gemini_live.gemini import ( GeminiLiveUserContextAggregator, GeminiModalities, ) -from pipecat.services.google.gemini_live.gemini import ( - GeminiMediaResolution as _GeminiMediaResolution, -) -from pipecat.services.google.gemini_live.gemini import GeminiVADParams as _GeminiVADParams -from pipecat.services.google.gemini_live.gemini import InputParams as _InputParams +from pipecat.services.google.gemini_live.llm import GeminiMediaResolution as _GeminiMediaResolution +from pipecat.services.google.gemini_live.llm import GeminiVADParams as _GeminiVADParams +from pipecat.services.google.gemini_live.llm import InputParams as _InputParams with warnings.catch_warnings(): warnings.simplefilter("always") diff --git a/src/pipecat/services/google/__init__.py b/src/pipecat/services/google/__init__.py index ec187000f..08e295b9e 100644 --- a/src/pipecat/services/google/__init__.py +++ b/src/pipecat/services/google/__init__.py @@ -9,6 +9,7 @@ import sys from pipecat.services import DeprecatedModuleProxy from .frames import * +from .gemini_live import * from .image import * from .llm import * from .llm_openai import * diff --git a/src/pipecat/services/google/gemini_live/__init__.py b/src/pipecat/services/google/gemini_live/__init__.py index 6a2d33bd8..142ca2a83 100644 --- a/src/pipecat/services/google/gemini_live/__init__.py +++ b/src/pipecat/services/google/gemini_live/__init__.py @@ -1,3 +1,3 @@ from .file_api import GeminiFileAPI -from .gemini import GeminiLiveLLMService -from .vertex import GeminiLiveVertexLLMService +from .llm import GeminiLiveLLMService +from .llm_vertex import GeminiLiveVertexLLMService diff --git a/src/pipecat/services/google/gemini_live/gemini.py b/src/pipecat/services/google/gemini_live/llm.py similarity index 100% rename from src/pipecat/services/google/gemini_live/gemini.py rename to src/pipecat/services/google/gemini_live/llm.py diff --git a/src/pipecat/services/google/gemini_live/vertex.py b/src/pipecat/services/google/gemini_live/llm_vertex.py similarity index 96% rename from src/pipecat/services/google/gemini_live/vertex.py rename to src/pipecat/services/google/gemini_live/llm_vertex.py index 29ff63a0b..4f1b57f4c 100644 --- a/src/pipecat/services/google/gemini_live/vertex.py +++ b/src/pipecat/services/google/gemini_live/llm_vertex.py @@ -12,13 +12,12 @@ streaming responses, and tool usage. """ import json -import os from typing import List, Optional, Union from loguru import logger from pipecat.adapters.schemas.tools_schema import ToolsSchema -from pipecat.services.google.gemini_live.gemini import ( +from pipecat.services.google.gemini_live.llm import ( GeminiLiveLLMService, HttpOptions, InputParams, @@ -33,9 +32,7 @@ try: except ModuleNotFoundError as e: logger.error(f"Exception: {e}") - logger.error( - "In order to use Google Vertex AI, you need to `pip install pipecat-ai[google]`. Also, set up your Google credentials properly." - ) + logger.error("In order to use Google Vertex AI, you need to `pip install pipecat-ai[google]`.") raise Exception(f"Missing module: {e}")