Update how we import and re-export some types in GeminiMultimodalLiveLLMService

This commit is contained in:
Paul Kompfner
2025-10-07 10:05:24 -04:00
parent 48e92a22fe
commit 43915937f2

View File

@@ -90,7 +90,6 @@ try:
FunctionResponse, FunctionResponse,
GenerationConfig, GenerationConfig,
GroundingMetadata, GroundingMetadata,
HttpOptions,
LiveConnectConfig, LiveConnectConfig,
LiveServerMessage, LiveServerMessage,
Modality, Modality,
@@ -99,9 +98,14 @@ try:
SlidingWindow, SlidingWindow,
SpeechConfig, SpeechConfig,
StartSensitivity, StartSensitivity,
ThinkingConfig,
VoiceConfig, VoiceConfig,
) )
from google.genai.types import (
HttpOptions as _HttpOptions,
)
from google.genai.types import (
ThinkingConfig as _ThinkingConfig,
)
except ModuleNotFoundError as e: except ModuleNotFoundError as e:
logger.error(f"Exception: {e}") logger.error(f"Exception: {e}")
logger.error("In order to use Google AI, you need to `pip install pipecat-ai[google]`.") logger.error("In order to use Google AI, you need to `pip install pipecat-ai[google]`.")
@@ -455,7 +459,8 @@ class ContextWindowCompressionParams(BaseModel):
) # None = use default (80% of context window) ) # None = use default (80% of context window)
ThinkingParams = ThinkingConfig ThinkingConfig = _ThinkingConfig
HttpOptions = _HttpOptions
class InputParams(BaseModel): class InputParams(BaseModel):
@@ -494,7 +499,7 @@ class InputParams(BaseModel):
) )
vad: Optional[GeminiVADParams] = Field(default=None) vad: Optional[GeminiVADParams] = Field(default=None)
context_window_compression: Optional[ContextWindowCompressionParams] = Field(default=None) context_window_compression: Optional[ContextWindowCompressionParams] = Field(default=None)
thinking: Optional[ThinkingParams] = Field(default=None) thinking: Optional[ThinkingConfig] = Field(default=None)
extra: Optional[Dict[str, Any]] = Field(default_factory=dict) extra: Optional[Dict[str, Any]] = Field(default_factory=dict)