@azure-rest/ai-inference package

接口

ChatChoiceOutput

单个提示完成作为整体聊天完成请求的一部分的表示形式。 通常,每个提供的提示生成 n 选项,默认值为 1。 令牌限制和其他设置可能会限制生成的选项数。

ChatCompletionsNamedToolChoice

特定命名函数工具的工具选择,它将聊天完成限制为使用命名函数。

ChatCompletionsNamedToolChoiceFunction

特定命名函数工具的工具选择,它将聊天完成限制为使用命名函数。

ChatCompletionsOutput

聊天完成请求中的响应数据的表示形式。 完成支持各种任务,并生成从或“完成”提供提示数据的文本。

ChatCompletionsResponseFormatJsonObject

聊天完成的响应格式,用于限制对发出有效 JSON 对象的响应。 请注意,若要启用 JSON 模式,某些 AI 模型可能还需要指示模型通过系统或用户消息生成 JSON。

ChatCompletionsResponseFormatJsonSchema

聊天完成的响应格式,用于限制响应以发出有效的 JSON 对象,由调用方指定的 JSON 架构。

ChatCompletionsResponseFormatJsonSchemaDefinition

使用给定架构将聊天完成的响应格式定义为 JSON。 生成完成时,AI 模型需要遵循此架构。

ChatCompletionsResponseFormatParent

表示模型必须输出的格式。 使用此模式可以启用 JSON 模式,而不是默认文本模式。 请注意,若要启用 JSON 模式,某些 AI 模型可能还需要指示模型通过系统或用户消息生成 JSON。

ChatCompletionsResponseFormatText

发出文本响应的聊天完成的响应格式。 这是默认响应格式。

ChatCompletionsToolCall

AI 模型请求的函数工具调用。

ChatCompletionsToolCallOutput

AI 模型请求的函数工具调用。

ChatCompletionsToolDefinition

可以调用函数的聊天完成工具的定义。

ChatMessageAudioDataContentItem

作为 base64 编码数据的音频内容的结构化聊天内容项。

ChatMessageAudioUrlContentItem

作为 URL 传递的音频内容的结构化聊天内容项。

ChatMessageContentItemParent

聊天消息中结构化内容项的抽象表示形式。

ChatMessageImageContentItem

包含图像引用的结构化聊天内容项。

ChatMessageImageUrl

模型可从中检索图像的 Internet 位置。

ChatMessageInputAudio

输入音频数据的详细信息。

ChatMessageInputAudioUrl

音频 URL 的详细信息。

ChatMessageTextContentItem

包含纯文本的结构化聊天内容项。

ChatRequestAssistantMessage

表示来自助手的响应或操作的请求聊天消息。

ChatRequestDeveloperMessage

请求聊天消息,其中包含影响模型如何生成聊天完成响应的开发人员说明。 某些 AI 模型支持开发人员消息,而不是系统消息。

ChatRequestMessageParent

请求中提供的聊天消息的抽象表示形式。

ChatRequestSystemMessage

请求聊天消息,其中包含影响模型如何生成聊天完成响应的系统说明。

ChatRequestToolMessage

表示已配置工具请求的输出的请求聊天消息。

ChatRequestUserMessage

表示用户对助手输入的请求聊天消息。

ChatResponseMessageOutput

响应中收到的聊天消息的表示形式。

CompletionsUsageOutput

为完成请求处理的令牌计数的表示形式。 计数将考虑提示、选择、选择备用、best_of代和其他使用者的所有令牌。

EmbeddingItemOutput

单个嵌入相关性比较的表示形式。

EmbeddingsResultOutput

嵌入请求中的响应数据的表示形式。 嵌入可测量文本字符串的相关性,通常用于搜索、聚类分析、建议和其他类似方案。

EmbeddingsUsageOutput

测量此请求和响应中使用的令牌量。

ErrorModel

错误对象。

FunctionCall

应调用的函数的名称和参数,由模型生成。

FunctionCallOutput

应调用的函数的名称和参数,由模型生成。

FunctionDefinition

聊天完成可以调用的调用方指定的函数的定义,以响应匹配的用户输入。

GetChatCompletions
GetChatCompletions200Response

请求已成功。

GetChatCompletionsBodyParam
GetChatCompletionsDefaultHeaders
GetChatCompletionsDefaultResponse
GetChatCompletionsHeaderParam
GetChatCompletionsHeaders
GetEmbeddings
GetEmbeddings200Response

请求已成功。

GetEmbeddingsBodyParam
GetEmbeddingsDefaultHeaders
GetEmbeddingsDefaultResponse
GetEmbeddingsHeaderParam
GetEmbeddingsHeaders
GetImageEmbeddings
GetImageEmbeddings200Response

请求已成功。

GetImageEmbeddingsBodyParam
GetImageEmbeddingsDefaultHeaders
GetImageEmbeddingsDefaultResponse
GetImageEmbeddingsHeaderParam
GetImageEmbeddingsHeaders
GetModelInfo
GetModelInfo200Response

请求已成功。

GetModelInfoDefaultHeaders
GetModelInfoDefaultResponse
ImageEmbeddingInput

表示具有可选文本的图像。

ModelClientOptions

客户端的可选参数

ModelInfoOutput

表示有关 AI 模型的一些基本信息。

Routes

类型别名

AudioContentFormat

AudioContentFormat 的别名

ChatCompletionsResponseFormat

表示模型必须输出的格式。 使用此模式可以启用 JSON 模式,而不是默认文本模式。 请注意,若要启用 JSON 模式,某些 AI 模型可能还需要指示模型通过系统或用户消息生成 JSON。

ChatCompletionsToolChoicePreset

ChatCompletionsToolChoicePreset 的别名

ChatMessageContentItem

聊天消息中结构化内容项的抽象表示形式。

ChatMessageImageDetailLevel

ChatMessageImageDetailLevel 的别名

ChatRequestMessage

请求中提供的聊天消息的抽象表示形式。

ChatRole

ChatRole 的别名

ChatRoleOutput

ChatRoleOutput 的别名

CompletionsFinishReasonOutput

CompletionsFinishReasonOutput 的别名

EmbeddingEncodingFormat

EmbeddingEncodingFormat 的别名

EmbeddingInputType

EmbeddingInputType 的别名

ExtraParameters

ExtraParameters 的别名

GetChatCompletionsParameters
GetEmbeddingsParameters
GetImageEmbeddingsParameters
GetModelInfoParameters
ModelClient
ModelTypeOutput

ModelTypeOutput 的别名

函数

default(string, TokenCredential | KeyCredential, ModelClientOptions)

初始化 ModelClient 的新实例

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

函数详细信息

default(string, TokenCredential | KeyCredential, ModelClientOptions)

初始化 ModelClient 的新实例

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

参数

endpointParam

string

参数 endpointParam

credentials

TokenCredential | KeyCredential

唯一标识客户端凭据

options
ModelClientOptions

所有可选参数的参数

返回

isUnexpected(GetChatCompletions200Response | GetChatCompletionsDefaultResponse)

function isUnexpected(response: GetChatCompletions200Response | GetChatCompletionsDefaultResponse): response

参数

返回

response

isUnexpected(GetModelInfo200Response | GetModelInfoDefaultResponse)

function isUnexpected(response: GetModelInfo200Response | GetModelInfoDefaultResponse): response

参数

返回

response

isUnexpected(GetEmbeddings200Response | GetEmbeddingsDefaultResponse)

function isUnexpected(response: GetEmbeddings200Response | GetEmbeddingsDefaultResponse): response

参数

返回

response

isUnexpected(GetImageEmbeddings200Response | GetImageEmbeddingsDefaultResponse)

function isUnexpected(response: GetImageEmbeddings200Response | GetImageEmbeddingsDefaultResponse): response

参数

返回

response