|
<< Click to Display Table of Contents >> Navigation: »No topics above this level« AIG. - AI Google Gemini Integration |
MiniRobotLanguage (MRL)
AIG.Get Temperature
Retrieve Current Temperature Setting for AI Responses
Intention
GetTemperature Command: Checking Response Randomness
The GetTemperature command retrieves the current temperature setting used by the Google Generative AI API to control response randomness.
This helps you verify or adjust your script based on the AI’s behavior.
It’s part of the Generation Parameters suite within AIG.
The GetTemperature command fetches the current value of the AIG_Temperature global variable, which determines how random or creative the AI’s responses are.
You can store this value in a variable or, if no variable is specified, it will be placed on the Top of Stack (TOS).
Retrieving the temperature setting is valuable for:
•Verification: Confirm the setting applied by AIG.Set Temperature.
•Script Logic: Adjust behavior based on the randomness level.
•Debugging: Ensure the AI’s output aligns with your expectations.
Call this command to retrieve the current temperature, optionally storing it in a variable.
The default is 1.0 unless modified by AIG.Set Temperature.
Example Usage
AIG.Get Temperature|$$TMP
DBP.Current Temperature: $$TMP
AIG.Get Temperature
POP.$$TMP
DBP.Temperature from Stack: $$TMP
The returned value reflects the last set temperature or the default 1.0.
Illustration
┌───────────────┐
│ Temperature │
├───────────────┤
│ 0.8 │
└───────────────┘
Example output after setting temperature to 0.8.
Syntax
AIG.GetTemperature[|P1]
AIG.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
AIG.Set Temperature|0.5
AIG.Get Temperature|$$TMP
DBP.Current Temperature: $$TMP
ENR.
Remarks
- The default temperature is 1.0 if not previously set.
- Use this command after AIG.Set Temperature to confirm the setting.
Limitations
- Only reflects the current session’s setting or default.
- Does not indicate if the value is optimal for the chosen model.
See also:
• AIG.Ask