|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > LMS. - LM-Studio Commands > LMS. - LM Studio Interface |
MiniRobotLanguage (MRL)
LMS.SetTemp - Command
Set AI Generation Temperature
Intention
This command sets the "temperature" for the AI model's text generation. Temperature controls the randomness and creativity of the response.
• Low Temperature (e.g., 0.1 - 0.5): The model becomes more deterministic, focused, and predictable. It will likely choose the most probable next word. Good for factual answers or code generation.
• High Temperature (e.g., 1.0 - 2.0): The model becomes more creative, random, and "surprising." It might choose less likely words, leading to more diverse or even nonsensical answers. Good for creative writing or brainstorming.
If you do not provide a parameter, the temperature is reset to the system default (0.7).
Syntax
LMS.Set Temp|[P1]
Parameter Explanation
P1 - (Optional) A floating-point number for the temperature (e.g., 0.5, 1.2). If omitted, resets to the default (0.7).
Example
'**********************************************
' LMS.settemp - Sample
'**********************************************
'
' Set for creative writing
LMS.settemp|1.3
LMS.ask|"Write a short, silly poem about a programming bug"|$$POEM
MBX.Info|$$POEM
'
' Set for factual answers
LMS.settemp|0.2
LMS.ask|"What is the capital of France?"|$$CAPITAL
MBX.Info|$$CAPITAL
'
' Reset to default
LMS.settemp
ENR.
Remarks
This setting persists for all subsequent LMS.ask or LMS.askex commands until it is changed again. The default value is 0.7. Setting the value to 0.0 is the same as omitting the parameter and will reset the temperature to the default of 0.7.
See also:
• LMS.ask