Contents

init(samplingMode:temperature:maximumResponseTokens:)

Creates generation options that control token sampling behavior.

Declaration

@backDeployed(before: iOS 27.0, macOS 27.0, visionOS 27.0)
init(samplingMode: GenerationOptions.SamplingMode? = nil, temperature: Double? = nil, maximumResponseTokens: Int? = nil)

Parameters

  • samplingMode:

    A strategy to use for sampling from a distribution.

  • temperature:

    Increasing temperature makes it possible for the model to produce less likely responses. Must be between 0 and 1, inclusive.

  • maximumResponseTokens:

    The maximum number of tokens the model is allowed to produce before being artificially halted. Must be positive.

See Also

Creating options