AIX. - Grok / X - API

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIX. - Grok / X - API > !Model and Endpoint Configuration >

AIX. - Grok / X - API

AIX.GetTemperature

Previous Top Next


MiniRobotLanguage (MRL)

 

AIX.Get Temperature
Retrieve the Current Temperature Setting

 

Intention

 

GetTemperature Command: Inspecting Randomness Configuration
 
The Get Temperature command retrieves the current value of the AIX_Temperature global variable, which governs the randomness or creativity level in Grok’s response generation. This allows users to verify the temperature setting applied by the AIX.Set Temperature command, ensuring it aligns with the intended output style. It’s part of the AIX - Grok / X - API suite, facilitating precise control over AI behavior.

 

What is the GetTemperature Command?

 

The Get Temperature command returns the current value of AIX_Temperature, a float that dictates the degree of randomness in Grok’s token selection process. This parameter ranges from 0.0 to 2.0, where:

Values close to 0.0 produce highly deterministic outputs, favoring the most likely tokens.

Values around 1.0 (the default) offer a balanced mix of predictability and creativity.

Values nearing 2.0 maximize randomness, leading to more diverse but potentially less coherent responses.

This command is useful for inspecting the configuration before or after generating responses with AIX.Ask.

 

Why Do You Need It?

 

Retrieving the temperature setting is essential for:

Verification: Confirm the randomness level matches the intended task (e.g., factual vs. creative).

Debugging: Identify why responses are too predictable or erratic, guiding adjustments.

Optimization: Adjust dynamically based on the quality of previous outputs.

 

How to Use the GetTemperature Command?

 

Invoke the command with an optional variable to store the current temperature value.

If no variable is specified, the value remains in AIX_Temperature for direct access. This setting influences all subsequent API calls until changed via AIX.Set Temperature.

 

Example Usage

 

AIX.Set Temperature|0.9

AIX.Get Temperature|$$TEMP

DBP.Current Temperature: $$TEMP

AIX.Ask|Tell a story|0

DBP.Story: $$AIX_GrokContent (moderately creative)

 

Sets a temperature of 0.9 for a balanced story, retrieves it into $$TEMP, and generates the response.

 

AIX.Set Temperature|1.2

AIX.Get Temperature

DBP.Default Access: Check AIX_Temperature

AIX.Ask|Generate ideas|0

DBP.Ideas: $$AIX_GrokContent (highly varied)

 

Sets a temperature of 1.2 for diverse ideas, accessed directly via AIX_Temperature.

 

Illustration

 

┌───────────────┐

│ AIX_Temperature│

├───────────────┤

│ 0.9 │

└───────────────┘

Retrieving the current temperature setting for controlled randomness.

 

Syntax

 

AIX.GetTemperature[|P1]

AIX.Get Temperature[|P1]

 

Parameter Explanation

 

P1 - (Optional) The variable (e.g., $$TEMP) to store the retrieved temperature value. If omitted, the value remains in AIX_Temperature.

 

Example

 

AIX.Set Temperature|1.1

AIX.Get Temperature|$$VAL

DBP.Temperature: $$VAL

ENR.

 

Remarks

 

- The default value is 1.0 unless set by AIX.Set Temperature.

- Influences responses in AIX.Ask and interacts with parameters like AIX.Set PresencePenalty.

 

Limitations

 

- Only retrieves the setting; does not adjust it directly.

- Effectiveness varies with the model and other settings (e.g., AIX.Set MaxToken).

 

See also:

 

AIX.Set Temperature

AIX.Ask

AIX.Set PresencePenalty

AIX.Get Content