Let users directly use google-genai types rather than aliased re-exported types
This commit is contained in:
@@ -90,23 +90,19 @@ try:
|
|||||||
FunctionResponse,
|
FunctionResponse,
|
||||||
GenerationConfig,
|
GenerationConfig,
|
||||||
GroundingMetadata,
|
GroundingMetadata,
|
||||||
|
HttpOptions,
|
||||||
LiveConnectConfig,
|
LiveConnectConfig,
|
||||||
LiveServerMessage,
|
LiveServerMessage,
|
||||||
Modality,
|
Modality,
|
||||||
Part,
|
Part,
|
||||||
|
ProactivityConfig,
|
||||||
RealtimeInputConfig,
|
RealtimeInputConfig,
|
||||||
SlidingWindow,
|
SlidingWindow,
|
||||||
SpeechConfig,
|
SpeechConfig,
|
||||||
StartSensitivity,
|
StartSensitivity,
|
||||||
|
ThinkingConfig,
|
||||||
VoiceConfig,
|
VoiceConfig,
|
||||||
)
|
)
|
||||||
from google.genai.types import (
|
|
||||||
HttpOptions as _HttpOptions,
|
|
||||||
)
|
|
||||||
from google.genai.types import ProactivityConfig as _ProactivityConfig
|
|
||||||
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]`.")
|
||||||
@@ -460,11 +456,6 @@ class ContextWindowCompressionParams(BaseModel):
|
|||||||
) # None = use default (80% of context window)
|
) # None = use default (80% of context window)
|
||||||
|
|
||||||
|
|
||||||
ThinkingConfig = _ThinkingConfig
|
|
||||||
HttpOptions = _HttpOptions
|
|
||||||
ProactivityConfig = _ProactivityConfig
|
|
||||||
|
|
||||||
|
|
||||||
class InputParams(BaseModel):
|
class InputParams(BaseModel):
|
||||||
"""Input parameters for Gemini Multimodal Live generation.
|
"""Input parameters for Gemini Multimodal Live generation.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user