|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Response Behavior Settings > AIU. - Artificial Intelligence Utility |
MiniRobotLanguage (MRL)
AIU.GetTemperature
Retrieve the Current Temperature Setting
Intention
GetTemperature Command: Check Response Randomness Setting
The GetTemperature command retrieves the current temperature value, which determines the randomness of AI responses.
This is useful for verifying or debugging the AI’s behavior in your scripts.
It’s part of the AIU - OpenAI API suite.
The GetTemperature command fetches the current temperature setting used by the AI model for generating responses.
You can store this value in a variable or, if no variable is specified, it will be placed on the Top of Stack (TOS) as a string.
Retrieving the temperature setting is valuable for:
•Verification: Confirm the current randomness level before executing AI tasks.
•Debugging: Check if unexpected AI behavior is due to the temperature setting.
•Dynamic Adjustment: Use the value to adjust settings in your script logic.
Call the command with an optional variable to store the result. If omitted, the value is pushed to the stack.
The temperature is returned as a string representation of the numeric value set by AIU.SetTemperature.
Example Usage
AIU.SetTemperature|0.5
AIU.GetTemperature|$$TEM
DBP.Current Temperature: $$TEM
AIU.GetTemperature
POP.$$TEM
DBP.Temperature from Stack: $$TEM
Demonstrates setting and retrieving the temperature value.
Illustration
┌────────────────────┐
│ Temperature Valu e │
├────────────────────┤
│ 0.5 │
└────────────────────┘
A simple representation of retrieving the current temperature setting.
Syntax
AIU.GetTemperature[|P1]
AIU.Get_Temperature[|P1]
Parameter Explanation
P1 - (Optional) The variable where the temperature value will be stored. If omitted, the value is placed on the Top of Stack (TOS).
Example
AIU.SetTemperature|0.8
AIU.GetTemperature|$$VAL
DBP.Temperature Setting: $$VAL
ENR.
Remarks
- The returned value is a string representation of the temperature (e.g., "0.8").
- Reflects the last value set by AIU.SetTemperature.
Limitations
- Only accepts zero or one parameter; additional parameters cause an error.
- Does not indicate if the temperature is unset (defaults depend on the model).
See also:
• AIU.Chat