LMS.IsBusy - Check if LMS is Busy

<< 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.IsBusy - Check if LMS is Busy

Checks if the LM Studio interface is currently processing a request. Useful for preventing concurrent calls or checking completion status.

Syntax:

LMS.IsBusy|$$RET_VAR

Parameters:

$$RET_VAR (Variable, required) - Variable to receive result (1 if busy, 0 if idle).

Examples:

; Wait for LMS to become idle

REPEAT

LMS.IsBusy|busy

IF busy = 1 THEN SLEEP 100

UNTIL busy = 0

 

; Now safe to send new request

LMS.ask|"Next prompt"|response

See Also:

LMS.GetBusyCount