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?

Response type for generated candidate text.

Schema<*>?

A schema that the response must adhere to, used with the application/json mimeType.

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?

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

responseSchema

val responseSchemaSchema<*>?

A schema that the response must adhere to, used with the application/json mimeType.

stopSequences

val stopSequencesList<String>?

A list of strings to stop generation on occurrence of

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