GenerateContentRequest.Builder

class GenerateContentRequest.Builder


Builder for GenerateContentRequest.

Summary

Public constructors

Builder(content: Content)
Builder(contents: List<Content>)
Builder(image: ImagePart, text: TextPart)
Builder(systemInstruction: SystemInstruction, text: TextPart)
Builder(
    systemInstruction: SystemInstruction,
    image: ImagePart,
    text: TextPart
)

Public functions

GenerateContentRequest

Public constructors

Builder

Builder(content: Content)

Builder

Builder(contents: List<Content>)

Builder

Builder(text: TextPart)

Builder

Builder(image: ImagePart, text: TextPart)

Builder

Builder(systemInstruction: SystemInstruction, text: TextPart)

Builder

Builder(
    systemInstruction: SystemInstruction,
    image: ImagePart,
    text: TextPart
)

Public functions

build

fun build(): GenerateContentRequest

Public properties

cachedContextName

var cachedContextName: String?

candidateCount

var candidateCount: Int?

enableThinking

var enableThinking: Boolean

maxOutputTokens

var maxOutputTokens: Int?

promptPrefix

var promptPrefix: PromptPrefix?

seed

var seed: Int?

systemInstruction

var systemInstruction: SystemInstruction?

temperature

var temperature: Float?

tools

var tools: List<KClass<*>>?

topK

var topK: Int?