GenerationConfig

class GenerationConfig


Configuration parameters to use for content generation.

Summary

Nested types

Builder for creating a GenerationConfig.

Public companion functions

GenerationConfig.Builder

Alternative casing for GenerationConfig.Builder:

Public properties

Int?

The max unique responses to return

Int?

The max tokens to generate per response

String?
List<String>?

A list of strings to stop generation on occurrence of

Float?

The degree of randomness in token selection, typically between 0 and 1

Int?

The sum of probabilities to collect to during token selection

Float?

How many tokens to select amongst the highest probabilities

Public companion functions

builder

fun builder(): GenerationConfig.Builder

Alternative casing for GenerationConfig.Builder:

val config = GenerationConfig.builder()

Public properties

candidateCount

val candidateCountInt?

The max unique responses to return

maxOutputTokens

val maxOutputTokensInt?

The max tokens to generate per response

responseMimeType

val responseMimeTypeString?

stopSequences

val stopSequencesList<String>?

A list of strings to stop generation on occurrence of

  • @property responseMimeType Response type for generated candidate text. See the vertex docs for a list of supported types.

temperature

val temperatureFloat?

The degree of randomness in token selection, typically between 0 and 1

topK

val topKInt?

The sum of probabilities to collect to during token selection

topP

val topPFloat?

How many tokens to select amongst the highest probabilities