GenerationConfig.Builder

public final class GenerationConfig.Builder


Builder for creating a GenerationConfig.

Mainly intended for Java interop. Kotlin consumers should use generationConfig for a more idiomatic experience.

See also
generationConfig

Summary

Public constructors

Public methods

final @NonNull GenerationConfig

Create a new GenerationConfig with the attached arguments.

Public fields

candidateCount

public final Integer candidateCount

See GenerationConfig.candidateCount.

frequencyPenalty

public final Float frequencyPenalty

See GenerationConfig.frequencyPenalty

maxOutputTokens

public final Integer maxOutputTokens

See GenerationConfig.maxOutputTokens.

presencePenalty

public final Float presencePenalty

See GenerationConfig.presencePenalty

responseMimeType

public final String responseMimeType

See GenerationConfig.responseMimeType.

responseSchema

public final Schema responseSchema

See GenerationConfig.responseSchema.

stopSequences

public final List<@NonNull StringstopSequences

See GenerationConfig.stopSequences.

temperature

public final Float temperature

See GenerationConfig.temperature.

topK

public final Integer topK

See GenerationConfig.topK.

topP

public final Float topP

See GenerationConfig.topP.

Public constructors

Builder

public Builder()

Public methods

build

public final @NonNull GenerationConfig build()

Create a new GenerationConfig with the attached arguments.