获取预置模型版本详情
更新时间:2024-12-23
接口描述
本接口用于获取预置模型版本详情。
鉴权说明
调用本文API,使用“基于安全认证AK/SK”进行签名计算鉴权,即使用安全认证中的Access Key ID 和 Secret Access Key进行鉴权,具体鉴权认证机制参考HTTP调用鉴权说明。
请求结构
POST /v2/model?Action=DescribeSystemModel HTTP/1.1
Host: qianfan.baidubce.com
Authorization: authorization string
Content-Type: application/json
{
"modelId":"amv-2dxxxxm2"
}
请求头域
除公共头域外,无其它特殊头域。
请求参数
- Query参数
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
Action | string | 是 | 方法名称,固定值DescribeSystemModel |
- Body参数
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
modelId | string | 是 | 模型版本id,通过调用获取预置模型列表接口,返回的modelIds字段获取该字段值 |
响应头域
除公共头域外,无其它特殊头域。
响应参数
名称 | 类型 | 描述 |
---|---|---|
requestId | string | 请求ID |
result | object | 请求结果 |
result说明
名称 | 类型 | 描述 |
---|---|---|
modelSetId | string | 模型id |
modelId | string | 模型版本id |
modelName | string | 模型版本名称 |
status | string | 状态,说明: · Ready:已就绪 · Creating:创建中 · Fail:创建失败 |
description | string | 模型版本描述 |
createTime | string | 模型版本创建时间 |
modifyTime | string | 模型版本修改时间 |
modelApplicationType | string | 输入输出模式,说明: · chat:对话模式 · completion:续写模式 |
tokenLimitations | object | 输入输出长度限制 |
isSupportDeploy | bool | 是否支持部署 |
isSupportModelComp | bool | 是否支持压缩 |
isSupportEvaluation | bool | 是否支持评估 |
tokenLimitations说明
名称 | 类型 | 描述 |
---|---|---|
trivial | object | modelApplicationType非reranker类型的模型上下文限制 |
reranker | object | modelApplicationType为reranker类型的模型上下文限制 |
trivial说明
名称 | 类型 | 描述 |
---|---|---|
inputTokens | int | 输入tokens限制 |
outputTokens | int | 输出tokens限制 |
characterLimit | int | 字符数限制 |
reranker说明
名称 | 类型 | 描述 |
---|---|---|
queryTokens | int | query的tokens限制 |
queryCharacterLimit | int | query的字符数限制 |
documentTokens | int | document的tokens限制 |
documentCharacterLimit | int | document的字符数限制 |
请求示例
# 替换下列示例中的Authorization值、x-bce-date值
curl -i --location 'https://qianfan.baidubce.com/v2/model?Action=DescribeSystemModel'\
--header 'Authorization: bce-auth-v1/f0ee7axxxx/2023-09-19T13:42:13Z/180000/host;x-bce-date/9a8cfb8eexxxxxxx74525543'\
--header 'x-bce-date: 2023-09-19T13:37:10Z'\
--header 'Content-Type: application/json'\
--data '{
"modelId":"amv-2dxxxxm2"
}'
响应示例
HTTP/1.1 200 OK
{
"requestId": "21fe685d-2070-4b42-acb3-126cb0734b13",
"result": {
"modelSetId": "am-vhxxxxn9",
"modelId": "amv-2dxxxxxem2",
"modelName": "ERNIE-4.0-8K",
"status": "Ready",
"modelApplicationType": "chat",
"tokenLimitations": {
"trivial": {
"inputTokens": 5120,
"outputTokens": 2048,
"characterLimit": 0
}
},
"createTime": "2024-10-25T19:10:46+08:00",
"modifyTime": "2024-10-25T19:10:46+08:00",
"isSupportDeploy": false,
"isSupportModelComp": false,
"isSupportEvaluation": false
}
}
错误码
若请求错误,服务器将返回的JSON文本包含以下参数:
名称 | 描述 |
---|---|
requestId | 请求ID |
code | 错误码 |
message | 错误描述信息,帮助理解和解决发生的错误 |
例如错误返回:
{
"requestId":"6ba7b810-xxxc04fd430c8",
"code":"AccessDenied",
"message":"Access denied."
}
更多其他错误码,也可以查看错误码说明。