Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions google/genai/tests/live/test_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ async def test_bidi_setup_to_api_speech_config(vertexai):
'mediaResolution': 'MEDIA_RESOLUTION_MEDIUM',
'seed': 13,
},
'proactivity': {'proactive_audio': True},
'proactivity': {'proactive_audio': True, 'proactive_video': True},
'systemInstruction': {
'parts': [
{
Expand Down Expand Up @@ -896,7 +896,7 @@ async def test_bidi_setup_to_api_speech_config(vertexai):
'language_code': 'en-US',
},
'enable_affective_dialog': True,
'proactivity': {'proactive_audio': True},
'proactivity': {'proactive_audio': True, 'proactive_video': True},
'temperature': 0.7,
'top_p': 0.8,
'top_k': 9,
Expand Down Expand Up @@ -924,7 +924,9 @@ async def test_bidi_setup_to_api_speech_config(vertexai):
language_code='en-US',
),
enable_affective_dialog=True,
proactivity=types.ProactivityConfig(proactive_audio=True),
proactivity=types.ProactivityConfig(
proactive_audio=True, proactive_video=True
),
temperature=0.7,
top_p=0.8,
top_k=9,
Expand Down
13 changes: 13 additions & 0 deletions google/genai/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -21286,6 +21286,13 @@ class ProactivityConfig(_common.BaseModel):
example, this allows the model to ignore out of context speech or to stay
silent if the user did not make a request, yet.""",
)
proactive_video: Optional[bool] = Field(
default=None,
description="""If enabled, the system might trigger a generation on each received
image. This requires that `proactive_audio` is enabled. The rate
of generation depends on the rate of incoming images and can cause a
significant increase in cost.""",
)


class ProactivityConfigDict(TypedDict, total=False):
Expand All @@ -21296,6 +21303,12 @@ class ProactivityConfigDict(TypedDict, total=False):
example, this allows the model to ignore out of context speech or to stay
silent if the user did not make a request, yet."""

proactive_video: Optional[bool]
"""If enabled, the system might trigger a generation on each received
image. This requires that `proactive_audio` is enabled. The rate
of generation depends on the rate of incoming images and can cause a
significant increase in cost."""


ProactivityConfigOrDict = Union[ProactivityConfig, ProactivityConfigDict]

Expand Down
Loading