|
<< 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.GetEmbeddingsEndpoint
Retrieve the Current Embeddings Endpoint URL
Intention
GetEmbeddingsEndpoint Command: Accessing the Current Embeddings API Endpoint
The GetEmbeddingsEndpoint command retrieves the currently configured URL endpoint used by the AIU system for embeddings operations, such as AIU.Embed.
This is useful for verifying the endpoint or incorporating it into script logic.
It’s part of the AIU - OpenAI API suite.
The GetEmbeddingsEndpoint command fetches the current embeddings endpoint URL, set by AIU.SetEmbeddingsEndpoint or initialized to OpenAI’s default (e.g., https://api.openai.com/v1/embeddings).
The result can be stored in a variable or, if unspecified, placed on the Top of Stack (TOS).
Retrieving the embeddings endpoint URL is valuable for:
•Verification: Confirm the endpoint before generating embeddings.
•Debugging: Log the endpoint for troubleshooting purposes.
•Dynamic Configuration: Adjust script behavior based on the endpoint in use.
The command accepts an optional parameter to store the retrieved URL.
If no variable is provided, the URL is pushed onto the stack. The default endpoint is set during Init_AIU() unless overridden by AIU.SetEmbeddingsEndpoint.
Example Usage
AIU.SetEmbeddingsEndpoint|https://myproxy.example.com/v1/embeddings
AIU.GetEmbeddingsEndpoint|$$URL
DBP.Current Embeddings Endpoint: $$URL
AIU.GetEmbeddingsEndpoint
POP.$$URL
This sets a custom endpoint and retrieves it using both a variable and the stack.
Illustration
┌────────────────────────────┐
│ Embeddings Endpoint │
├────────────────────────────┤
│ https://myproxy.example.com│
└────────────────────────────┘
The current embeddings endpoint URL retrieved by the command.
Syntax
AIU.GetEmbeddingsEndpoint[|P1]
AIU.Get_EmbeddingsEndpoint[|P1]
Parameter Explanation
P1 - (Optional) The variable to store the current embeddings endpoint URL. If omitted, the URL is placed on the Top of Stack (TOS).
Example
AIU.SetEmbeddingsEndpoint|https://local-ai-server:8080/v1/embeddings
AIU.GetEmbeddingsEndpoint|$$END
DBP.Current Endpoint: $$END
ENR.
Remarks
- Returns a string representing the full URL of the embeddings endpoint.
- Reflects the default or the last value set by AIU.SetEmbeddingsEndpoint.
Limitations
- Does not verify the endpoint’s validity or availability.
- More than one parameter causes an error.
See also: