Skip to content
Open
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
28 changes: 14 additions & 14 deletions google/genai/_live_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,14 +584,14 @@ def _LiveClientSetup_to_mldev(
if getv(from_object, ['proactivity']) is not None:
setv(to_object, ['proactivity'], getv(from_object, ['proactivity']))

if getv(from_object, ['history_config']) is not None:
setv(to_object, ['historyConfig'], getv(from_object, ['history_config']))

if getv(from_object, ['explicit_vad_signal']) is not None:
raise ValueError(
'explicit_vad_signal parameter is not supported in Gemini API.'
)

if getv(from_object, ['history_config']) is not None:
setv(to_object, ['historyConfig'], getv(from_object, ['history_config']))

return to_object


Expand Down Expand Up @@ -661,16 +661,16 @@ def _LiveClientSetup_to_vertex(
if getv(from_object, ['proactivity']) is not None:
setv(to_object, ['proactivity'], getv(from_object, ['proactivity']))

if getv(from_object, ['history_config']) is not None:
raise ValueError('history_config parameter is not supported in Vertex AI.')

if getv(from_object, ['explicit_vad_signal']) is not None:
setv(
to_object,
['explicitVadSignal'],
getv(from_object, ['explicit_vad_signal']),
)

if getv(from_object, ['history_config']) is not None:
raise ValueError('history_config parameter is not supported in Vertex AI.')

return to_object


Expand Down Expand Up @@ -825,18 +825,18 @@ def _LiveConnectConfig_to_mldev(
getv(from_object, ['proactivity']),
)

if getv(from_object, ['explicit_vad_signal']) is not None:
raise ValueError(
'explicit_vad_signal parameter is not supported in Gemini API.'
)

if getv(from_object, ['history_config']) is not None:
setv(
parent_object,
['setup', 'historyConfig'],
getv(from_object, ['history_config']),
)

if getv(from_object, ['explicit_vad_signal']) is not None:
raise ValueError(
'explicit_vad_signal parameter is not supported in Gemini API.'
)

return to_object


Expand Down Expand Up @@ -985,16 +985,16 @@ def _LiveConnectConfig_to_vertex(
getv(from_object, ['proactivity']),
)

if getv(from_object, ['history_config']) is not None:
raise ValueError('history_config parameter is not supported in Vertex AI.')

if getv(from_object, ['explicit_vad_signal']) is not None:
setv(
parent_object,
['setup', 'explicitVadSignal'],
getv(from_object, ['explicit_vad_signal']),
)

if getv(from_object, ['history_config']) is not None:
raise ValueError('history_config parameter is not supported in Vertex AI.')

return to_object


Expand Down
10 changes: 5 additions & 5 deletions google/genai/_tokens_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,18 +411,18 @@ def _LiveConnectConfig_to_mldev(
getv(from_object, ['proactivity']),
)

if getv(from_object, ['explicit_vad_signal']) is not None:
raise ValueError(
'explicit_vad_signal parameter is not supported in Gemini API.'
)

if getv(from_object, ['history_config']) is not None:
setv(
parent_object,
['setup', 'historyConfig'],
getv(from_object, ['history_config']),
)

if getv(from_object, ['explicit_vad_signal']) is not None:
raise ValueError(
'explicit_vad_signal parameter is not supported in Gemini API.'
)

return to_object


Expand Down
28 changes: 14 additions & 14 deletions google/genai/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -18211,16 +18211,16 @@ class LiveClientSetup(_common.BaseModel):
description="""Configures the proactivity of the model. This allows the model to respond proactively to
the input and to ignore irrelevant input.""",
)
history_config: Optional[HistoryConfig] = Field(
default=None,
description="""Configures the exchange of history between the client and the server.""",
)
explicit_vad_signal: Optional[bool] = Field(
default=None,
description="""Configures the explicit VAD signal. If enabled, the client will send
vad_signal to indicate the start and end of speech. This allows the server
to process the audio more efficiently.""",
)
history_config: Optional[HistoryConfig] = Field(
default=None,
description="""Configures the exchange of history between the client and the server.""",
)


class LiveClientSetupDict(TypedDict, total=False):
Expand Down Expand Up @@ -18272,14 +18272,14 @@ class LiveClientSetupDict(TypedDict, total=False):
"""Configures the proactivity of the model. This allows the model to respond proactively to
the input and to ignore irrelevant input."""

history_config: Optional[HistoryConfigDict]
"""Configures the exchange of history between the client and the server."""

explicit_vad_signal: Optional[bool]
"""Configures the explicit VAD signal. If enabled, the client will send
vad_signal to indicate the start and end of speech. This allows the server
to process the audio more efficiently."""

history_config: Optional[HistoryConfigDict]
"""Configures the exchange of history between the client and the server."""


LiveClientSetupOrDict = Union[LiveClientSetup, LiveClientSetupDict]

Expand Down Expand Up @@ -18764,16 +18764,16 @@ class LiveConnectConfig(_common.BaseModel):
description="""Configures the proactivity of the model. This allows the model to respond proactively to
the input and to ignore irrelevant input.""",
)
history_config: Optional[HistoryConfig] = Field(
default=None,
description="""Configures the exchange of history between the client and the server.""",
)
explicit_vad_signal: Optional[bool] = Field(
default=None,
description="""Configures the explicit VAD signal. If enabled, the client will send
vad_signal to indicate the start and end of speech. This allows the server
to process the audio more efficiently.""",
)
history_config: Optional[HistoryConfig] = Field(
default=None,
description="""Configures the exchange of history between the client and the server.""",
)


class LiveConnectConfigDict(TypedDict, total=False):
Expand Down Expand Up @@ -18876,14 +18876,14 @@ class LiveConnectConfigDict(TypedDict, total=False):
"""Configures the proactivity of the model. This allows the model to respond proactively to
the input and to ignore irrelevant input."""

history_config: Optional[HistoryConfigDict]
"""Configures the exchange of history between the client and the server."""

explicit_vad_signal: Optional[bool]
"""Configures the explicit VAD signal. If enabled, the client will send
vad_signal to indicate the start and end of speech. This allows the server
to process the audio more efficiently."""

history_config: Optional[HistoryConfigDict]
"""Configures the exchange of history between the client and the server."""


LiveConnectConfigOrDict = Union[LiveConnectConfig, LiveConnectConfigDict]

Expand Down
Loading