LiveGenerationConfig class

Generation configuration for Live API sessions.

Controls response modalities, temperature, and other generation settings.

Constructors

LiveGenerationConfig({List<ResponseModality>? responseModalities, SpeechConfig? speechConfig, double? temperature, int? maxOutputTokens, double? topP, int? topK})
Creates a LiveGenerationConfig.
const
LiveGenerationConfig.audioOnly({SpeechConfig? speechConfig, double? temperature, int? maxOutputTokens})
Creates an audio-only configuration.
factory
LiveGenerationConfig.fromJson(Map<String, dynamic> json)
Creates from JSON.
factory
LiveGenerationConfig.textAndAudio({SpeechConfig? speechConfig, double? temperature, int? maxOutputTokens})
Creates a configuration with both audio and text output.
factory
LiveGenerationConfig.textOnly({double? temperature, int? maxOutputTokens})
Creates a text-only configuration.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
maxOutputTokens int?
Maximum number of output tokens.
final
responseModalities List<ResponseModality>?
Response modalities.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
speechConfig SpeechConfig?
Speech configuration for audio output.
final
temperature double?
Temperature for generation (0.0 to 2.0).
final
topK int?
Top-k sampling parameter.
final
topP double?
Top-p sampling parameter (0.0 to 1.0).
final

Methods

copyWith({Object? responseModalities = unsetCopyWithValue, Object? speechConfig = unsetCopyWithValue, Object? temperature = unsetCopyWithValue, Object? maxOutputTokens = unsetCopyWithValue, Object? topP = unsetCopyWithValue, Object? topK = unsetCopyWithValue}) LiveGenerationConfig
Creates a copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts to JSON.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited