|
<< 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.IsLoadedModel - Check if Model is Loaded |
Checks whether a specific model ID is currently loaded in LM Studio. Useful for verifying model availability before sending prompts.
Syntax:
LMS.IsLoadedModel|$$MODEL|$$RET_VAR
Parameters:
$$MODEL (String, required) - Model ID to check (e.g., "llama-3.2-3b").
$$RET_VAR (Variable, required) - Variable to receive result (1 if loaded, 0 if not).
Examples:
; Check if a specific model is loaded
LMS.IsLoadedModel|llama-3.2-3b|isLoaded
IF isLoaded = 1 THEN
LMS.setmodel|llama-3.2-3b
LMS.ask|"Hello!"|response
ELSE
MSGBOX "Model not loaded!"
END IF
See Also: