|
<< 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.Get Status Command
Get LM Studio Server Status
Intention
The LMS.Get Status command provides a more informative alternative to LMS.ping. It retrieves a human-readable string that indicates not only if the LM Studio server is online, but also how many models are currently loaded and ready for use.
This command is ideal for diagnostic checks at the beginning of a script to ensure the environment is correctly configured before sending any prompts.
Syntax
LMS.Get Status|P1
Parameter Explanation
P1 - (Required) The variable (e.g., $$STS) where the server status string will be stored.
Example
'**********************************************
' LMS.Get Status - Sample
'**********************************************
'
' Retrieve the server status and store it in the $$STS variable.
LMS.Get Status|$$STS
'
' Display the status to the user.
MBX.$$STS
ENR.
Remarks
The output string is designed to be easily readable. Possible results include:
• "Server: ONLINE | Models: 5"
• "Server: OFFLINE (Cannot connect - ...)"
• "Server: ERROR (HTTP 503)"
See also:
• LMS.Ping - Simple Server Check
• LMS.List Models - Get Available Models
• LMS.Set Url - Set the Main Chat URL