|
<< 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 Model Url - Command
Set the URL for Listing Models
Intention
The LMS.setmodelurl command is an advanced setting used to specify the exact API endpoint for retrieving the list of available models from the LM Studio server.
This command is distinct from LMS.seturl, which configures the endpoint for sending chat prompts. While most users will not need to change this setting, it is essential for environments with custom proxy servers or non-standard API routes.
Calling the command without a parameter resets the URL to its default value.
Syntax
LMS.Set Model Url[|P1]
Parameter Explanation
P1 - (optional) url_string - The full URL for the model listing endpoint (e.g., "http://192.168.1.50:1234/v1/models"). If omitted, the default URL will be restored.
Example
'**********************************************
' LMS.setmodelurl - Sample
'**********************************************
'
' Set a custom URL for the model listing endpoint.
LMS.setmodelurl|http://my-proxy:8000/api/models
' Now, commands like LMS.listmodels will use the new URL.
LMS.listmodels|1
' ... do something with array #1 ...
'
' Reset the URL back to its default value.
LMS.setmodelurl
ENR.
Remarks
The default URL is http://localhost:1234/v1/models.
This setting only affects commands that need to query the server for a list of models: LMS.listmodels, LMS.selectmodel, LMS.ping, and LMS.getstatus.
See also:
• LMS.seturl - Set the Main Chat URL
• LMS.listmodels - Get Available Models
• LMS.selectmodel - Find and Set a Model