LiveConnectConfig

@Serializable
data class LiveConnectConfig(val httpOptions: HttpOptions? = null, val responseModalities: List<Modality>? = null, val temperature: Double? = null, val topP: Double? = null, val topK: Double? = null, val maxOutputTokens: Int? = null, val mediaResolution: MediaResolution? = null, val seed: Int? = null, val speechConfig: SpeechConfig? = null, val thinkingConfig: ThinkingConfig? = null, val enableAffectiveDialog: Boolean? = null, val systemInstruction: Content? = null, val tools: List<Tool>? = null, val sessionResumption: SessionResumptionConfig? = null, val inputAudioTranscription: AudioTranscriptionConfig? = null, val outputAudioTranscription: AudioTranscriptionConfig? = null, val realtimeInputConfig: RealtimeInputConfig? = null, val contextWindowCompression: ContextWindowCompressionConfig? = null, val proactivity: ProactivityConfig? = null, val explicitVadSignal: Boolean? = null, val avatarConfig: AvatarConfig? = null, val safetySettings: List<SafetySetting>? = null, val translationConfig: TranslationConfig? = null)

Session config for the API connection.

Constructors

Link copied to clipboard
constructor(httpOptions: HttpOptions? = null, responseModalities: List<Modality>? = null, temperature: Double? = null, topP: Double? = null, topK: Double? = null, maxOutputTokens: Int? = null, mediaResolution: MediaResolution? = null, seed: Int? = null, speechConfig: SpeechConfig? = null, thinkingConfig: ThinkingConfig? = null, enableAffectiveDialog: Boolean? = null, systemInstruction: Content? = null, tools: List<Tool>? = null, sessionResumption: SessionResumptionConfig? = null, inputAudioTranscription: AudioTranscriptionConfig? = null, outputAudioTranscription: AudioTranscriptionConfig? = null, realtimeInputConfig: RealtimeInputConfig? = null, contextWindowCompression: ContextWindowCompressionConfig? = null, proactivity: ProactivityConfig? = null, explicitVadSignal: Boolean? = null, avatarConfig: AvatarConfig? = null, safetySettings: List<SafetySetting>? = null, translationConfig: TranslationConfig? = null)

Properties

Link copied to clipboard

Configures the avatar model behavior.

Link copied to clipboard

Configures context window compression mechanism.

Link copied to clipboard

If enabled, the model will detect emotions and adapt its responses accordingly.

Link copied to clipboard

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.

Link copied to clipboard

Used to override HTTP request options.

Link copied to clipboard

The transcription of the input aligns with the input audio language.

Link copied to clipboard
val maxOutputTokens: Int? = null

Maximum number of tokens that can be generated in the response.

Link copied to clipboard

If specified, the media resolution specified will be used.

Link copied to clipboard

The transcription of the output aligns with the language code specified for the output audio.

Link copied to clipboard

Configures the proactivity of the model. This allows the model to respond proactively to the input and to ignore irrelevant input.

Link copied to clipboard

Configures the realtime input behavior in BidiGenerateContent.

Link copied to clipboard

The requested modalities of the response. Represents the set of modalities that the model can return. Defaults to AUDIO if not specified.

Link copied to clipboard

Safety settings in the request to block unsafe content in the response.

Link copied to clipboard
val seed: Int? = null

When `seed` is fixed to a specific number, the model makes a best effort to provide the same response for repeated requests. By default, a random number is used.

Link copied to clipboard

Configures session resumption mechanism.

Link copied to clipboard

The speech generation configuration.

Link copied to clipboard

The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph.

Link copied to clipboard
val temperature: Double? = null

Value that controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a less open-ended or creative response, while higher temperatures can lead to more diverse or creative results.

Link copied to clipboard

Config for thinking features. An error will be returned if this field is set for models that don't support thinking.

Link copied to clipboard
val tools: List<Tool>? = null

A list of Tools the model may use to generate the next response.

Link copied to clipboard
val topK: Double? = null

For each token selection step, the `top_k` tokens with the highest probabilities are sampled. Then tokens are further filtered based on `top_p` with the final token selected using temperature sampling. Use a lower number for less random responses and a higher number for more random responses.

Link copied to clipboard
val topP: Double? = null

Tokens are selected from the most to least probable until the sum of their probabilities equals this value. Use a lower value for less random responses and a higher value for more random responses.

Link copied to clipboard

Config for translation.