RunConfig
Configs for runtime behavior of agents.
Properties from responseModalities onwards apply only to a live connection, which is configured once when it opens and cannot be changed per turn. They only take effect through the experimental live API.
Constructors
Types
Properties
Keeps the session's context below a given length.
Custom metadata for the current invocation.
Whether the model detects emotion and adapts its responses.
Whether the model sends its voice activity detection signals. Only the Vertex AI backend accepts true; Gemini API clients reject it.
Transcription of the audio the user sends. Enabled by default with automatic language detection; set to null to disable it.
Limit on the total number of LLM calls per run. A positive value is enforced, except by a live run, which ignores it; a value <= 0 means unbounded.
Transcription of the audio the model returns. Enabled by default with automatic language detection; set to null to disable it.
Whether the model may decline to respond to a prompt.
How realtime input is interpreted as turns, including voice activity detection.
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.
Configuration of the session resumption mechanism.
The speech generation configuration.
Streaming mode, NONE, SSE or BIDI.
Real-time speech-to-speech translation. Only translation models support it.
Functions
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.