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:
A value between
0and1, inclusive, that controls how sharply the model favors its most likely responses. A higher value increases variety. - maximumResponseTokens:
The maximum number of tokens the model produces before being halted. Must be positive.