|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > LMS. - LM-Studio Commands > NEW: LMS v2.1 Commands - Model Query, Status, and Text Extraction > LMS.GetLoadedModelCount - Get Count of Loaded Models |
Returns the number of currently loaded models in LM Studio (0, 1, or 2). This is useful for determining if models are available before attempting to use them.
Syntax:
LMS.GetLoadedModelCount|$$RET_VAR
Parameters:
$$RET_VAR (Variable, required) - Variable to receive the count (0, 1, or 2).
Return Value:
Returns a number in $$RET_VAR:
0 - No models loaded1 - One model loaded2 - Two models loaded
Examples:
; Check how many models are loaded
LMS.GetLoadedModelCount|count
IF count = 0 THEN
MSGBOX "No models loaded! Please load a model in LM Studio."
ELSE
MSGBOX "Models loaded: " & count
END IF
See Also: