AIU. - Artificial Intelligence Utility

<< 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

AIU.SetEmbeddingsEndpoint

Previous Top Next


MiniRobotLanguage (MRL)

 

AIU.SetEmbeddingsEndpoint
Set the Embeddings Endpoint URL for AIU Operations

 

Intention

 

SetEmbeddingsEndpoint Command: Configuring the Embeddings API Endpoint
 
The SetEmbeddingsEndpoint command allows you to define a custom URL endpoint for generating embeddings in the AIU system, such as those used by AIU.Embed.

This enables integration with alternative OpenAI-compatible services or proxies for embedding operations.

It’s part of the AIU - OpenAI API suite.

 

What is the SetEmbeddingsEndpoint Command?

 

This command configures the URL endpoint that the AIU system uses to generate text embeddings, overriding the default OpenAI embeddings endpoint (e.g., https://api.openai.com/v1/embeddings).

It allows redirection to a custom server or API instance that supports OpenAI’s embeddings API specification.

 

Why Do You Need It?

 

Customizing the embeddings endpoint is beneficial for:

Alternative Services: Use non-OpenAI embedding providers with compatible APIs.

Proxy Support: Route embedding requests through a proxy for security or caching.

Development: Test against a local or staging endpoint during development.

 

How to Use the SetEmbeddingsEndpoint Command?

 

The command requires one parameter: the full URL of the embeddings endpoint.

After setting, all embedding operations (e.g., AIU.Embed) will use this endpoint until changed or reset via Init_AIU().

 

Example Usage

 

AIU.SetEmbeddingsEndpoint|https://myproxy.example.com/v1/embeddings

AIU.GetEmbeddingsEndpoint|$$URL

DBP.Embeddings Endpoint: $$URL

 

This sets the embeddings endpoint to a custom proxy and confirms it with AIU.GetEmbeddingsEndpoint.

 

Illustration

 

┌────────────────────────────┐

│ Embeddings Endpoint        │

├────────────────────────────┤

│ https://myproxy.example.com│

└────────────────────────────┘

The configured embeddings endpoint URL for AIU operations.

 

Syntax

 

AIU.SetEmbeddingsEndpoint|P1

AIU.Set_EmbeddingsEndpoint|P1

 

Parameter Explanation

 

P1 - (Required) The full URL of the embeddings endpoint (e.g., https://api.openai.com/v1/embeddings or a custom URL).

 

Example

 

AIU.SetEmbeddingsEndpoint|https://local-ai-server:8080/v1/embeddings

AIU.Embed|Sample text|$$EMB

DBP.Embedding from custom endpoint: $$EMB

ENR.

 

Remarks

 

- The endpoint must conform to OpenAI’s embeddings API format for successful operation.

- Changes persist until a new endpoint is set or the AIU system is reinitialized.

 

Limitations

 

- The command does not validate the URL’s reachability or compatibility at the time of setting.

- Exactly one parameter is required; omitting it or adding extra parameters triggers an error.

 

See also:

 

AIU.Get_EmbeddingsEndpoint

AIU.Embed

Endpoint Configuration

AIU.Set_ChatEndpoint