|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Model and Endpoint Configuration > AIU. - Artificial Intelligence Utility |
MiniRobotLanguage (MRL)
AIU.GetResponsesEndpoint
Retrieve the Current Responses Endpoint URL
Intention
GetResponsesEndpoint Command: Accessing the Current Responses API Endpoint
The GetResponsesEndpoint command retrieves the currently configured URL endpoint used by the AIU system for response generation operations, such as AIU.GenerateResponses.
This allows you to verify or utilize the endpoint in your scripts.
It’s part of the AIU - OpenAI API suite.
The GetResponsesEndpoint command fetches the current responses endpoint URL, as set by AIU.SetResponsesEndpoint or initialized to OpenAI’s default (e.g., https://api.openai.com/v1/responses).
You can store the result in a variable or, if unspecified, it will be placed on the Top of Stack (TOS).
Retrieving the responses endpoint URL is helpful for:
•Confirmation: Ensure the correct endpoint is set before generating responses.
•Debugging: Log or display the endpoint for troubleshooting.
•Script Logic: Adapt behavior based on the configured endpoint.
The command accepts an optional variable to store the retrieved URL.
If no variable is provided, the URL is pushed onto the stack. The default is set during Init_AIU() unless overridden by AIU.SetResponsesEndpoint.
Example Usage
AIU.SetResponsesEndpoint|https://myproxy.example.com/v1/responses
AIU.GetResponsesEndpoint|$$URL
DBP.Current Responses Endpoint: $$URL
AIU.GetResponsesEndpoint
POP.$$URL
This sets a custom endpoint and retrieves it using both a variable and the stack.
Illustration
┌────────────────────────────┐
│ Responses Endpoint │
├────────────────────────────┤
│ https://myproxy.example.com│
└────────────────────────────┘
The current responses endpoint URL retrieved by the command.
Syntax
AIU.GetResponsesEndpoint[|P1]
AIU.Get_ResponsesEndpoint[|P1]
Parameter Explanation
P1 - (Optional) The variable to store the current responses endpoint URL. If omitted, the URL is placed on the Top of Stack (TOS).
Example
AIU.SetResponsesEndpoint|https://local-ai-server:8080/v1/responses
AIU.GetResponsesEndpoint|$$END
DBP.Current Endpoint: $$END
ENR.
Remarks
- Returns a string containing the full URL of the responses endpoint.
- Reflects the default or the last value set by AIU.SetResponsesEndpoint.
Limitations
- Does not validate the endpoint’s functionality or reachability.
- Additional parameters beyond P1 trigger an error.
See also: