你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get Model Info - Get Model Info

返回有关 AI 模型的信息。 该方法对给定终结点上的 /info 路由进行 REST API 调用。 仅当使用无服务器 API 或托管计算终结点时,此方法才起作用。 它不适用于 GitHub Models 终结点或 Azure OpenAI 终结点。

GET https:///info?api-version=2024-05-01-preview

URI 参数

名称 必需 类型 说明
api-version
query True

string

minLength: 1

用于此作的 API 版本。

响应

名称 类型 说明
200 OK

ModelInfo

请求已成功。

Other Status Codes

Azure.Core.Foundations.ErrorResponse

意外的错误响应。

标头

x-ms-error-code: string

安全性

api-key

类型: apiKey
在: header

OAuth2Auth

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize

作用域

名称 说明
https://ml.azure.com/.default

示例

maximum set model information
minimum set model information

maximum set model information

示例请求

GET https:///info?api-version=2024-05-01-preview

示例响应

{
  "model_name": "Phi-3.5-mini-instruct",
  "model_type": "chat-completion",
  "model_provider_name": "Microsoft"
}

minimum set model information

示例请求

GET https:///info?api-version=2024-05-01-preview

示例响应

{
  "model_name": "Phi-3.5-mini-instruct",
  "model_type": "chat-completion",
  "model_provider_name": "Microsoft"
}

定义

名称 说明
Azure.Core.Foundations.Error

错误对象。

Azure.Core.Foundations.ErrorResponse

包含错误详细信息的响应。

Azure.Core.Foundations.InnerError

包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

ModelInfo

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

ModelType

AI 模型的类型

Azure.Core.Foundations.Error

错误对象。

名称 类型 说明
code

string

服务器定义的错误代码集之一。

details

Azure.Core.Foundations.Error[]

导致此报告错误的特定错误的详细信息数组。

innererror

Azure.Core.Foundations.InnerError

包含与当前对象有关错误的更具体信息的对象。

message

string

错误的人工可读表示形式。

target

string

错误的目标。

Azure.Core.Foundations.ErrorResponse

包含错误详细信息的响应。

名称 类型 说明
error

Azure.Core.Foundations.Error

错误对象。

Azure.Core.Foundations.InnerError

包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

名称 类型 说明
code

string

服务器定义的错误代码集之一。

innererror

Azure.Core.Foundations.InnerError

内部错误。

ModelInfo

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

名称 类型 说明
model_name

string

AI 模型的名称。 例如:Phi21

model_provider_name

string

模型提供程序名称。 例如:Microsoft Research

model_type

ModelType

AI 模型的类型。 配置文件的唯一标识符。

ModelType

AI 模型的类型

说明
chat-completion

能够获取聊天格式的消息并生成响应的模型

embeddings

能够从文本生成嵌入的模型