|
<< Click to Display Table of Contents >> Navigation: »No topics above this level« AIN. - AnythingLLM AI |
MiniRobotLanguage (MRL)
AIN.SetChatEndpoint
Set the Chat Endpoint URL for AnythingLLM API
Intention
SetChatEndpoint Command: Configure the API Endpoint
The AIN.SetChatEndpoint command sets the URL endpoint for chat-related operations in the AnythingLLM API. It defines where chat requests are directed.
This command is part of the AIN - AnythingLLM AI suite, essential for initializing API communication.
This command configures the base URL for chat-related API calls, such as AIN.ExecuteChat or AIN.ExecuteThreadChat. It must be a valid URL pointing to an AnythingLLM instance.
No return value is provided unless an error occurs.
Use AIN.SetChatEndpoint for:
•API Setup: Establish the connection point for chat operations.
•Flexibility: Switch between different AnythingLLM instances or environments.
•Initialization: Prepare the system for chat-related commands.
Provide a valid URL as the parameter. This should point to the AnythingLLM server’s chat endpoint (e.g., "http://localhost:3001"). Use it before any chat-related operations.
Illustration
┌───────────────────────┐
│ Chat Endpoint │
├───────────────────────┤
│ http://localhost:3001 │
└───────────────────────┘
Setting the URL for chat API communication.
Syntax
AIN.SetChatEndpoint|P1
AIN.SCE|P1
Parameter Explanation
P1 - (String) The URL of the chat endpoint (e.g., "http://localhost:3001"). Must be a valid URL.
Example
' Set the chat endpoint URL
AIN.SetChatEndpoint|http://localhost:3001
DBP.Chat endpoint set to: http://localhost:3001
ENR.
Remarks
- Must be set before chat-related commands; no validation feedback is returned unless an error occurs.
- Use AIN.GetChatEndpoint to verify the current endpoint.
Limitations
- Requires exactly 1 parameter; otherwise, an error is set.
- Does not validate the URL’s accessibility at the time of setting.
See also: