|
<< 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.Set Timeout - Command
Set Client/Server Timeout
Intention
This command sets the maximum time, in milliseconds, that the system will wait for a response from the LM Studio server.
This is critical for managing queries to large models that may take a long time to process, or for handling network latency. If the server does not respond within this period, the command will fail with a timeout error.
The default timeout is 720000 (12 minutes). If you omit the parameter or provide a value less than 1000, it will reset to this default.
Syntax
LMS.SetT imeout|[P1]
Parameter Explanation
P1 - (Optional) The timeout duration in milliseconds. (e.g., 30000 = 30 seconds). Must be 1000 or greater.
If omitted or less than 1000, resets to the default (720000).
Example
'**********************************************
' LMS.settimeout - Sample
'**********************************************
'
' Set a short 30-second timeout for quick queries
LMS.settimeout|30000
'
' Set a long 20-minute timeout for a very large model
LMS.settimeout|1200000
'
' Reset to the default 12-minute timeout
LMS.settimeout
ENR.
Remarks
This setting is persistent and affects all future network-related LMS commands (ask, ping, listmodels, etc.) until it is changed again. The maximum allowed timeout is 30,000,000 (about 50 minutes).
See also:
• LMS.ask
• LMS.Ping - Checks if the LM Studio server is online and reachable.