AzureAIEndpoint
Wisej.AI.Endpoints.AzureAIEndpoint
Last updated
Wisej.AI.Endpoints.AzureAIEndpoint
Last updated
Namespace: Wisej.AI.Endpoints
Assembly: Wisej.AI (3.5.0.0)
Represents an endpoint for connecting to Azure AI services, specifically designed to interact with OpenAI models.
This class provides properties and methods to configure and interact with Azure AI endpoints, allowing for operations such as generating text completions and embeddings.
Initializes a new instance of the class with default settings.
: Gets or sets the API version used for requests. (Default: "2024-02-01"
)
Adds options to the message for a session.
message
The message to which options are added.
session
The session context.
Builds the payload for an embeddings request.
inputs
The input strings for which embeddings are requested.
Throws:
Constructs the API URL for text completion requests.
Constructs the API URL for embedding requests.
Reads the assistant's message from the response.
response
The response from the API.
message
The message object to populate.
Throws:
Reads the embeddings from the response.
response
The response from the API.
Throws:
Reads the usage statistics from the reply and updates the message.
message
The message object to update.
reply
The dynamic reply object containing usage data.
: Gets or sets the authentication method for the endpoint. (Default: "api-key"
)
: Gets or sets the model used for generating text embeddings. (Default: "text-embedding-3-small"
)
: Gets or sets the model used for generating text completions. (Default: "gpt-4o"
)
: Gets or sets the URL of the Azure AI endpoint. (Default: "https://YOUR_RESOURCE_NAME.openai.azure.com"
)
Returns: . An object representing the payload for the embeddings request.
Thrown when inputs is null.
Returns: . A string representing the API URL.
Returns: . A string representing the embeddings API URL.
Thrown when response or message is null.
Returns: . A jagged array of floats representing the embeddings.
Thrown when response is null.