Package com.google.genai.types
Class GenerationConfig
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.GenerationConfig
Generation config.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for GenerationConfig. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
objectMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional.static GenerationConfig.Builderbuilder()Instantiates a builder for GenerationConfig.Optional.Optional.static GenerationConfigDeserializes a JSON string to a GenerationConfig object.logprobs()Optional.Optional.Optional.Optional.Optional.Optional.abstract Optional<GenerationConfigRoutingConfig>Optional.seed()Optional.Optional.Optional.abstract GenerationConfig.BuilderCreates a builder with the same values as this instance.topK()Optional.topP()Optional.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, toJson, toJsonNode, toJsonString
-
Constructor Details
-
GenerationConfig
public GenerationConfig()
-
-
Method Details
-
audioTimestamp
Optional. If enabled, audio timestamp will be included in the request to the model. -
candidateCount
Optional. Number of candidates to generate. -
frequencyPenalty
Optional. Frequency penalties. -
logprobs
Optional. Logit probabilities. -
maxOutputTokens
Optional. The maximum number of output tokens to generate per message. -
presencePenalty
Optional. Positive penalties. -
responseLogprobs
Optional. If true, export the logprobs results in response. -
responseMimeType
Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. -
responseSchema
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](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. -
routingConfig
Optional. Routing configuration. -
seed
Optional. Seed. -
stopSequences
Optional. Stop sequences. -
temperature
Optional. Controls the randomness of predictions. -
topK
Optional. If specified, top-k sampling will be used. -
topP
Optional. If specified, nucleus sampling will be used. -
builder
Instantiates a builder for GenerationConfig. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a GenerationConfig object.
-