Builder

public final class Builder

A builder for GenerationConfig.

Functions

Link copied to clipboard
public final GenerationConfig.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
Link copied to clipboard
Link copied to clipboard
public final GenerationConfig.Builder addStopSequence(String stopSequence)

Adds a single String to stopSequences.

Link copied to clipboard
public final GenerationConfig build()

Returns an immutable instance of GenerationConfig.

Link copied to clipboard
public final GenerationConfig.Builder imageConfig(JsonField<ImageConfig> imageConfig)

Sets Builder.imageConfig to an arbitrary JSON value.

Configuration for image interaction.

Link copied to clipboard
public final GenerationConfig.Builder maxOutputTokens(JsonField<Integer> maxOutputTokens)

Sets Builder.maxOutputTokens to an arbitrary JSON value.

public final GenerationConfig.Builder maxOutputTokens(Integer maxOutputTokens)

The maximum number of tokens to include in the response.

Link copied to clipboard
public final GenerationConfig.Builder putAdditionalProperty(String key, JsonValue value)
Link copied to clipboard
public final GenerationConfig.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
Link copied to clipboard
public final GenerationConfig.Builder seed(JsonField<Integer> seed)

Sets Builder.seed to an arbitrary JSON value.

Seed used in decoding for reproducibility.

Link copied to clipboard
public final GenerationConfig.Builder speechConfig(JsonField<List<SpeechConfig>> speechConfig)

Sets Builder.speechConfig to an arbitrary JSON value.

Configuration for speech interaction.

Link copied to clipboard
public final GenerationConfig.Builder stopSequences(JsonField<List<String>> stopSequences)

Sets Builder.stopSequences to an arbitrary JSON value.

public final GenerationConfig.Builder stopSequences(List<String> stopSequences)

A list of character sequences that will stop output interaction.

Link copied to clipboard
public final GenerationConfig.Builder temperature(JsonField<Float> temperature)

Sets Builder.temperature to an arbitrary JSON value.

public final GenerationConfig.Builder temperature(Float temperature)

Controls the randomness of the output.

Link copied to clipboard
public final GenerationConfig.Builder thinkingLevel(JsonField<ThinkingLevel> thinkingLevel)

Sets Builder.thinkingLevel to an arbitrary JSON value.

The level of thought tokens that the model should generate.

Link copied to clipboard

Sets Builder.thinkingSummaries to an arbitrary JSON value.

Whether to include thought summaries in the response.

Link copied to clipboard

Sets Builder.toolChoice to an arbitrary JSON value.

The tool choice configuration.

Alias for calling toolChoice with ToolChoice.ofConfig(config).

Alias for calling toolChoice with ToolChoice.ofType(type).

Link copied to clipboard
public final GenerationConfig.Builder topP(JsonField<Float> topP)

Sets Builder.topP to an arbitrary JSON value.

public final GenerationConfig.Builder topP(Float topP)

The maximum cumulative probability of tokens to consider when sampling.