LiveRunConfig

data class LiveRunConfig @ExperimentalLiveApi @JvmOverloads constructor(val responseModalities: List<Modality> = emptyList(), val speechConfig: SpeechConfig? = null, val outputAudioTranscription: AudioTranscriptionConfig? = AudioTranscriptionConfig(), val inputAudioTranscription: AudioTranscriptionConfig? = AudioTranscriptionConfig(), val realtimeInputConfig: RealtimeInputConfig? = null, val explicitVadSignal: Boolean? = null, val translationConfig: TranslationConfig? = null, val enableAffectiveDialog: Boolean? = null, val proactivity: ProactivityConfig? = null, val sessionResumption: SessionResumptionConfig? = null, val contextWindowCompression: ContextWindowCompressionConfig? = null, val saveLiveBlob: Boolean = false)

Settings of a live run, held in RunConfig.live. They belong to the experimental live API, the only code that reads them, and may change without notice.

Properties from responseModalities to contextWindowCompression configure the live connection, set once when it opens and not changed per turn; saveLiveBlob instead tells ADK to record the conversation's audio and never reaches the connection.

Constructors

Link copied to clipboard
constructor(responseModalities: List<Modality> = emptyList(), speechConfig: SpeechConfig? = null, outputAudioTranscription: AudioTranscriptionConfig? = AudioTranscriptionConfig(), inputAudioTranscription: AudioTranscriptionConfig? = AudioTranscriptionConfig(), realtimeInputConfig: RealtimeInputConfig? = null, explicitVadSignal: Boolean? = null, translationConfig: TranslationConfig? = null, enableAffectiveDialog: Boolean? = null, proactivity: ProactivityConfig? = null, sessionResumption: SessionResumptionConfig? = null, contextWindowCompression: ContextWindowCompressionConfig? = null, saveLiveBlob: Boolean = false)

Types

Link copied to clipboard
class Builder @ExperimentalLiveApi constructor

Fluent builder for LiveRunConfig, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Keeps the session's context below a given length.

Link copied to clipboard

Whether the model detects emotion and adapts its responses.

Link copied to clipboard

Whether the model sends its voice activity detection signals. Only the Vertex AI backend accepts true; Gemini API clients reject it.

Link copied to clipboard

Transcription of the audio the user sends. Enabled by default with automatic language detection; set to null to disable it.

Link copied to clipboard

Transcription of the audio the model returns. Enabled by default with automatic language detection; set to null to disable it.

Link copied to clipboard

Whether the model may decline to respond to a prompt.

Link copied to clipboard

How realtime input is interpreted as turns, including voice activity detection.

Link copied to clipboard

The modalities the model may return. Empty leaves it unset, and the SDK then asks for audio on a live connection, as unset does in ADK Python. A value set here is sent as is, as in ADK Python, so a modality the model cannot answer in fails the connection.

Link copied to clipboard

Whether to save the live input and output audio as artifacts, each referenced from an event the run emits. ADK never deletes these recordings, not even with the session, so prefer an artifact service backed by durable storage over an in-memory one for anything but short sessions.

Link copied to clipboard

Configuration of the session resumption mechanism.

Link copied to clipboard

The speech generation configuration.

Link copied to clipboard

Real-time speech-to-speech translation. Only translation models support it.

Functions

Link copied to clipboard

Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.