FoundationModels.SetTemperature
-------------------------------

Sets the temperature.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [FoundationModels](component_FoundationModels.md) | [15.5](newinversion155.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "FoundationModels.SetTemperature"; FoundationModel; temperature ) 

**MBS**( **"FoundationModels.SetTemperature";** /\* Sets the temperature. \*/  
**$FoundationModel**; /\* The identifier for the model.e.g. $model \*/   
**$temperature**) /\* The temperature. \*/ 

### 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

- [FoundationModels.GetTemperature](FoundationModelsGetTemperature.md)

### Blog Entries

- [New in MBS FileMaker Plugin 15.5](https://www.mbsplugins.de/archive/2025-11-25/New_in_MBS_FileMaker_Plugin_15/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 26th September 2025 , last changed 27th September 2025

  
[FoundationModels.SetMaximumResponseTokens](FoundationModelsSetMaximumResponseTokens.md) - [FoundationModels.SupportedLanguages](FoundationModelsSupportedLanguages.md)

[HTML Version](FoundationModelsSetTemperature.shtml)