@azure-rest/ai-inference package

Interfaces

ChatChoiceOutput

The representation of a single prompt completion as part of an overall chat completions request. Generally, n choices are generated per provided prompt with a default value of 1. Token limits and other settings may limit the number of choices generated.

ChatCompletionsFunctionToolSelection

A tool selection of a specific, named function tool that will limit chat completions to using the named function.

ChatCompletionsNamedToolSelection

A tool selection of a specific, named function tool that will limit chat completions to using the named function.

ChatCompletionsOutput

Representation of the response data from a chat completions request. Completions support a wide variety of tasks and generate text that continues from or "completes" provided prompt data.

ChatCompletionsResponseFormatJSON

A response format for Chat Completions that restricts responses to emitting valid JSON objects. Note that to enable JSON mode, some AI models may also require you to instruct the model to produce JSON via a system or user message.

ChatCompletionsResponseFormatParent

Represents the format that the model must output. Use this to enable JSON mode instead of the default text mode. Note that to enable JSON mode, some AI models may also require you to instruct the model to produce JSON via a system or user message.

ChatCompletionsResponseFormatText

A response format for Chat Completions that emits text responses. This is the default response format.

ChatCompletionsToolCall

A function tool call requested by the AI model.

ChatCompletionsToolCallOutput

A function tool call requested by the AI model.

ChatCompletionsToolDefinition

The definition of a chat completions tool that can call a function.

ChatMessageContentItemParent

An abstract representation of a structured content item within a chat message.

ChatMessageImageContentItem

A structured chat content item containing an image reference.

ChatMessageImageUrl

An internet location from which the model may retrieve an image.

ChatMessageTextContentItem

A structured chat content item containing plain text.

ChatRequestAssistantMessage

A request chat message representing response or action from the assistant.

ChatRequestMessageParent

An abstract representation of a chat message as provided in a request.

ChatRequestSystemMessage

A request chat message containing system instructions that influence how the model will generate a chat completions response.

ChatRequestToolMessage

A request chat message representing requested output from a configured tool.

ChatRequestUserMessage

A request chat message representing user input to the assistant.

ChatResponseMessageOutput

A representation of a chat message as received in a response.

CompletionsUsageOutput

Representation of the token counts processed for a completions request. Counts consider all tokens across prompts, choices, choice alternates, best_of generations, and other consumers.

EmbeddingItemOutput

Representation of a single embeddings relatedness comparison.

EmbeddingsResultOutput

Representation of the response data from an embeddings request. Embeddings measure the relatedness of text strings and are commonly used for search, clustering, recommendations, and other similar scenarios.

EmbeddingsUsageOutput

Measurement of the amount of tokens used in this request and response.

FunctionCall

The name and arguments of a function that should be called, as generated by the model.

FunctionCallOutput

The name and arguments of a function that should be called, as generated by the model.

FunctionDefinition

The definition of a caller-specified function that chat completions may invoke in response to matching user input.

GetChatCompletions
GetChatCompletions200Response

The request has succeeded.

GetChatCompletionsBodyParam
GetChatCompletionsDefaultHeaders
GetChatCompletionsDefaultResponse
GetChatCompletionsHeaderParam
GetChatCompletionsHeaders
GetEmbeddings
GetEmbeddings200Response

The request has succeeded.

GetEmbeddingsBodyParam
GetEmbeddingsDefaultHeaders
GetEmbeddingsDefaultResponse
GetEmbeddingsHeaderParam
GetEmbeddingsHeaders
GetImageEmbeddings
GetImageEmbeddings200Response

The request has succeeded.

GetImageEmbeddingsBodyParam
GetImageEmbeddingsDefaultHeaders
GetImageEmbeddingsDefaultResponse
GetImageEmbeddingsHeaderParam
GetImageEmbeddingsHeaders
GetModelInfo
GetModelInfo200Response

The request has succeeded.

GetModelInfoDefaultHeaders
GetModelInfoDefaultResponse
ImageEmbeddingInput

Represents an image with optional text.

ModelClientOptions

The optional parameters for the client

ModelInfoOutput

Represents some basic information about the AI model.

Routes

Type Aliases

ChatCompletionsResponseFormat

Represents the format that the model must output. Use this to enable JSON mode instead of the default text mode. Note that to enable JSON mode, some AI models may also require you to instruct the model to produce JSON via a system or user message.

ChatCompletionsToolSelectionPreset

Alias for ChatCompletionsToolSelectionPreset

ChatMessageContentItem

An abstract representation of a structured content item within a chat message.

ChatMessageImageDetailLevel

Alias for ChatMessageImageDetailLevel

ChatRequestMessage

An abstract representation of a chat message as provided in a request.

ChatRole

Alias for ChatRole

ChatRoleOutput

Alias for ChatRoleOutput

CompletionsFinishReasonOutput

Alias for CompletionsFinishReasonOutput

EmbeddingEncodingFormat

Alias for EmbeddingEncodingFormat

EmbeddingInputType

Alias for EmbeddingInputType

ExtraParameters

Alias for ExtraParameters

GetChatCompletionsParameters
GetEmbeddingsParameters
GetImageEmbeddingsParameters
GetModelInfoParameters
ModelClient
ModelTypeOutput

Alias for ModelTypeOutput

Functions

default(string, TokenCredential | KeyCredential, ModelClientOptions)

Initialize a new instance of ModelClient

isUnexpected(GetChatCompletions200Response | GetChatCompletionsDefaultResponse)
isUnexpected(GetModelInfo200Response | GetModelInfoDefaultResponse)
isUnexpected(GetEmbeddings200Response | GetEmbeddingsDefaultResponse)
isUnexpected(GetImageEmbeddings200Response | GetImageEmbeddingsDefaultResponse)

Function Details

default(string, TokenCredential | KeyCredential, ModelClientOptions)

Initialize a new instance of ModelClient

function default(endpointParam: string, credentials: TokenCredential | KeyCredential, options?: ModelClientOptions): ModelClient

Parameters

endpointParam

string

The parameter endpointParam

credentials

TokenCredential | KeyCredential

uniquely identify client credential

options
ModelClientOptions

the parameter for all optional parameters

Returns

isUnexpected(GetChatCompletions200Response | GetChatCompletionsDefaultResponse)

function isUnexpected(response: GetChatCompletions200Response | GetChatCompletionsDefaultResponse): response

Parameters

Returns

response

isUnexpected(GetModelInfo200Response | GetModelInfoDefaultResponse)

function isUnexpected(response: GetModelInfo200Response | GetModelInfoDefaultResponse): response

Parameters

Returns

response

isUnexpected(GetEmbeddings200Response | GetEmbeddingsDefaultResponse)

function isUnexpected(response: GetEmbeddings200Response | GetEmbeddingsDefaultResponse): response

Parameters

Returns

response

isUnexpected(GetImageEmbeddings200Response | GetImageEmbeddingsDefaultResponse)

function isUnexpected(response: GetImageEmbeddings200Response | GetImageEmbeddingsDefaultResponse): response

Parameters

Returns

response