| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
FoundationModels.SetTemperature
Sets the temperature.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| FoundationModels | 15.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
MBS( "FoundationModels.SetTemperature"; FoundationModel; temperature ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| FoundationModel | The identifier for the model. | $model |
| temperature | The temperature. |
Result
Returns OK or error.
Description
Sets the temperature.The temperature influences the confidence of the models response.
The value of this property must be a number between `0` and `1` inclusive.
Temperature is an adjustment applied to the probability distribution prior to sampling. A value of `1` results in no adjustment. Values less than `1` will make the probability distribution sharper, with already likely tokens becoming even more likely.
The net effect is that low temperatures manifest as more stable and predictable responses, while high temperatures give the model more creative license.
Note: Leaving `temperature` unset lets the system choose a reasonable default on your behalf.
Examples
Set temperature:
Set Variable [ $r; Value: MBS( "FoundationModels.SetTemperature"; 1.0 ) ]
See also
This function is free to use.
Created 26th September 2025, last changed 27th September 2025
FoundationModels.SetMaximumResponseTokens - FoundationModels.SupportedLanguages