GenerationConfig class final

Generation config.

Constructors

GenerationConfig({double? temperature, double? topP, double? topK, int? candidateCount, int? maxOutputTokens, List<String> stopSequences = const [], bool? responseLogprobs, int? logprobs, double? presencePenalty, double? frequencyPenalty, int? seed, String responseMimeType = '', Schema? responseSchema, Value? responseJsonSchema, GenerationConfig_RoutingConfig? routingConfig, bool? audioTimestamp, List<GenerationConfig_Modality> responseModalities = const [], GenerationConfig_MediaResolution? mediaResolution, SpeechConfig? speechConfig, GenerationConfig_ThinkingConfig? thinkingConfig, GenerationConfig_ModelConfig? modelConfig, ImageConfig? imageConfig})
GenerationConfig.fromJson(Object? j)
factory

Properties

audioTimestamp → bool?
Optional. If enabled, audio timestamp will be included in the request to the model.
final
candidateCount → int?
Optional. Number of candidates to generate.
final
frequencyPenalty → double?
Optional. Frequency penalties.
final
hashCode → int
The hash code for this object.
no setterinherited
imageConfig → ImageConfig?
Optional. Config for image generation features.
final
logprobs → int?
Optional. Logit probabilities.
final
maxOutputTokens → int?
Optional. The maximum number of output tokens to generate per message.
final
mediaResolution → GenerationConfig_MediaResolution?
Optional. If specified, the media resolution specified will be used.
final
modelConfig → GenerationConfig_ModelConfig?
Optional. Config for model selection.
final
presencePenalty → double?
Optional. Positive penalties.
final
qualifiedName → String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
responseJsonSchema → Value?
Optional. Output schema of the generated response. This is an alternative to response_schema that accepts JSON Schema.
final
responseLogprobs → bool?
Optional. If true, export the logprobs results in response.
final
responseMimeType → String
Optional. Output response mimetype of the generated candidate text. Supported mimetype:
final
responseModalities → List<GenerationConfig_Modality>
Optional. The modalities of the response.
final
responseSchema → Schema?
Optional. The Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an OpenAPI 3.0 schema object. If set, a compatible response_mime_type must also be set. Compatible mimetypes: application/json: Schema for JSON response.
final
routingConfig → GenerationConfig_RoutingConfig?
Optional. Routing configuration.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
seed → int?
Optional. Seed.
final
speechConfig → SpeechConfig?
Optional. The speech generation config.
final
stopSequences → List<String>
Optional. Stop sequences.
final
temperature → double?
Optional. Controls the randomness of predictions.
final
thinkingConfig → GenerationConfig_ThinkingConfig?
Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
final
topK → double?
Optional. If specified, top-k sampling will be used.
final
topP → double?
Optional. If specified, nucleus sampling will be used.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Object
toString() → String
A string representation of this object.
override

Operators

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

Constants

fullyQualifiedName → const String