|
<< Click to Display Table of Contents >> Navigation: »No topics above this level« AIN. - AnythingLLM AI |
MiniRobotLanguage (MRL)
AIN.SetTemperature
Set the Temperature Value for AnythingLLM API Responses
Intention
SetTemperature Command: Adjusting Response Creativity
The SetTemperature Command configures the temperature setting for AnythingLLM API calls, controlling the creativity or randomness of the responses.
This allows you to fine-tune the balance between coherent and imaginative outputs.
It�s part of the AIN - AnythingLLM AI suite.
This Command sets the AIN_Temperature global variable, which influences the randomness of API-generated text.
A value of 0 makes responses deterministic, while higher values (up to 2) increase creativity. If an invalid value (negative) is provided, it defaults to 0.7.
Adjusting temperature is crucial for:
�Precision: Lower values ensure factual, focused responses.
�Creativity: Higher values generate more diverse or imaginative outputs.
�Customization: Tailor responses to specific tasks or user preferences.
Set the temperature before calling AIN.Ask or AIN.AskV to influence the response style.
Values typically range from 0 to 2, with 0.7 as the default if not explicitly set or if invalid.
Example Usage
AIN.SetTemperature|0.0
AIN.Ask|Define AI|$$DEF
DBP.Precise Definition: $$DEF
This sets temperature to 0 for a precise, deterministic response.
Illustration
+--------------------+
� Temperature � � � ��
+--------------------�
� 0.0 �� Precise � � �
� 0.7 �� Balanced � ��
� 2.0 �� Creative � ��
+--------------------+
Temperature�s effect on response style.
Syntax
AIN.SetTemperature|P1
AIN.Set_Temperature|P1
Parameter Explanation
P1 - The temperature value (e.g., 0.0 to 2.0). If negative or omitted, defaults to 0.7.
Example
AIN.SetTemperature|1.5
AIN.Ask|Write a story|$$STO
DBP.Creative Story: $$STO
ENR.
Remarks
- Check the current setting with AIN.GetTemperature.
- Values above 2 are accepted but may not yield meaningful differences depending on the model.
Limitations
- Effectiveness depends on the chosen model�s implementation of temperature.
- Values outside 0-2 may not be capped by the API, potentially leading to unexpected behavior.
See also:
? AIN.Ask
? AIN.AskV