共用方式為


@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

可呼叫函式的聊天完成工具定義。

ChatMessageContentItemParent

聊天訊息內結構化內容專案的抽象表示法。

ChatMessageImageContentItem

包含影像參考的結構化聊天內容專案。

ChatMessageImageUrl

模型可從中擷取影像的因特網位置。

ChatMessageTextContentItem

包含純文字的結構化聊天內容專案。

ChatRequestAssistantMessage

代表助理回應或動作的要求聊天訊息。

ChatRequestMessageParent

要求中提供的聊天訊息抽象表示法。

ChatRequestSystemMessage

要求聊天訊息,其中包含影響模型產生聊天完成回應方式的系統指示。

ChatRequestToolMessage

代表已設定工具所要求輸出的要求聊天訊息。

ChatRequestUserMessage

代表使用者輸入給助理的要求聊天訊息。

ChatResponseMessageOutput

回應中收到的聊天訊息表示法。

CompletionsUsageOutput

針對完成要求所處理的令牌計數表示。 計數會考慮提示、選擇、替代選項、best_of層代和其他取用者之間的所有令牌。

EmbeddingItemOutput

單一內嵌關聯性比較的表示。

EmbeddingsResultOutput

來自內嵌要求之回應數據的表示。 內嵌會測量文字字串的相關性,通常用於搜尋、叢集、建議和其他類似案例。

EmbeddingsUsageOutput

測量此要求和回應中使用的令牌數量。

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

類型別名

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