diff --git a/google/genai/tests/live/test_live.py b/google/genai/tests/live/test_live.py index 1297a0a0c9..7769c1d189 100644 --- a/google/genai/tests/live/test_live.py +++ b/google/genai/tests/live/test_live.py @@ -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': [ { @@ -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, @@ -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, diff --git a/google/genai/types.py b/google/genai/types.py index fb96da309c..2c1ba022c7 100644 --- a/google/genai/types.py +++ b/google/genai/types.py @@ -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): @@ -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]