查看可评估模型列表
更新时间:2024-07-18
功能介绍
本接口用于查看可评估模型列表。
SDK调用
使用说明
调用本文API,需使用安全认证AK/SK鉴权,调用流程及鉴权介绍详见SDK安装及使用流程。
调用示例
import os
from qianfan.resources import Model
# 使用安全认证AK/SK鉴权,通过环境变量方式初始化;替换下列示例中参数,安全认证Access Key替换your_iam_ak,Secret Key替换your_iam_sk
os.environ["QIANFAN_ACCESS_KEY"] = "your_iam_ak"
os.environ["QIANFAN_SECRET_KEY"] = "your_iam_sk"
# 只展示前3个
resp = Model.evaluable_model_list()
resp['body']['result'] = resp['body']['result'][:3]
print(resp['body'])
# print(resp['body'])
返回示例
QfResponse(code = 200, headers = {...},
body = {
'log_id': '2770150762',
'result': [{
'modelId': 11852,
'modelIdStr': 'am-bg7n2rn2gsbb',
'modelName': 'ERNIE Speed',
'source': 'PlatformPreset',
'modelType': 0,
'trainType': 'ernieBotLite-Speed',
'modelVersionList': [{
'modelVersionId': 14691,
'modelVersionIdStr': 'amv-pzqtzdspm77m',
'version': 'ERNIE-Speed-8K',
'sourceType': 'PlatformPreset',
'framework': 'paddle',
'algorithm': 'ERNIE_EB-ERNIEBOT_SPEED',
'modelNet': 'paddlepaddle-ERNIE_EB-ERNIEBOT_SPEED',
'trainType': 'ernieBotLite-Speed',
'description': '2024年2月5日发布的初始版本,支持8K上下文长度'
}]
}, {
'modelId': 2,
'modelIdStr': 'am-ju3hi4ts39u9',
'modelName': 'ERNIE Lite',
'source': 'PlatformPreset',
'modelType': 0,
'trainType': 'ernieBotLite',
'modelVersionList': [{
'modelVersionId': 19879,
'modelVersionIdStr': 'amv-irrrsmxabb6r',
'version': 'ERNIE-Lite-8K-0308',
'sourceType': 'PlatformPreset',
'framework': 'paddle',
'algorithm': 'ERNIE_EB-ERNIEBOT_LITE_8K',
'modelNet': 'paddlepaddle-ERNIE_EB-ERNIEBOT_LITE_8K',
'trainType': 'ernieBotLite',
'description': '2024年3月8日发布版本,优化模型效果,支持8K上下文长度'
}, {
'modelVersionId': 11998,
'modelVersionIdStr': 'amv-1r61myc9c9gb',
'version': 'ERNIE-Lite-8K-0922',
'sourceType': 'PlatformPreset',
'framework': 'paddle',
'algorithm': 'ERNIE_EB-ERNIEBOT_V202_FUSE',
'modelNet': 'paddlepaddle-ERNIE_EB-ERNIEBOT_V202_LORA_FUSE',
'trainType': 'ernieBotLite',
'description': '2023年9月22日发布版本,提升模型创作生成效果,支持8K上下文长度'
}, {
'modelVersionId': 7170,
'modelVersionIdStr': 'amv-qb8ijukaish3',
'version': 'ERNIE-Lite-8K-0725',
'sourceType': 'PlatformPreset',
'framework': 'paddle',
'algorithm': 'ERNIE_EB-ERNIEBOT_V201_8K',
'modelNet': 'paddlepaddle-ERNIE_EB-ERNIEBOT_V201_8K',
'trainType': 'ernieBotLite',
'description': '2023年7月25日发布版本,新增推理超参数,提升上下文窗口长度至8K'
}, {
'modelVersionId': 2896,
'modelVersionIdStr': 'amv-1s3mugx4nscj',
'version': 'ERNIE-Lite-4K-0704',
'sourceType': 'PlatformPreset',
'framework': 'paddle',
'algorithm': 'ERNIE_EB-ERNIEBOT_V200',
'modelNet': 'paddlepaddle-ERNIE_EB-ERNIEBOT_V200',
'trainType': 'ernieBotLite',
'description': '2023年7月4日发布版本,优化推理效果,修复部分问题,支持4K上下文长度'
}]
}, {
'modelId': 16052,
'modelIdStr': 'am-xgk30z76e4gs',
'modelName': 'ERNIE Tiny',
'source': 'PlatformPreset',
'modelType': 0,
'trainType': 'ernieBotTiny-8k',
'modelVersionList': [{
'modelVersionId': 19868,
'modelVersionIdStr': 'amv-sb5kfqie51z1',
'version': 'ERNIE-Tiny-8K',
'sourceType': 'PlatformPreset',
'framework': 'paddle',
'algorithm': 'ERNIE_EB-ERNIEBOT_TINY',
'modelNet': 'paddlepaddle-ERNIE_EB-ERNIEBOT_TINY',
'trainType': 'ernieBotTiny-8k',
'description': '2024年3月8日发布的初始版本,支持8K上下文长度'
}]
}]
}
)
请求参数
无
返回参数
名称 | 类型 | 描述 |
---|---|---|
log_id | int | 请求ID |
result | dict | 请求结果 |
result说明
名称 | 类型 | 描述 |
---|---|---|
modelId | number | 模型ID,注意:该字段后续可能废弃,如需使用模型ID,请使用modelIdStr |
modelIdStr | string | 模型ID,string类型 |
modelName | string | 模型名称 |
source | string | 模型来源,说明: · 用户模型 · 预置模型 |
modelType | number | 模型类型 |
tags | string[] | 标签列表 |
modelVersionList | dict[] | 模型版本列表 |
modelVersionList说明
名称 | 类型 | 描述 |
---|---|---|
modelVersionId | number | 模型版本ID,注意:该字段后续可能废弃,如需使用模型版本ID,请使用modelVersionIdStr |
modelVersionIdStr | string | 模型版本ID,string类型 |
version | string | 版本号 |
sourceType | string | 来源-训练/预置/加速 |
framework | string | 框架 |
algorithm | string | 算法 |
modelNet | string | 网络 |
description | string | 描述 |
HTTP调用
鉴权说明
调用本文API,使用“基于安全认证AK/SK”进行签名计算鉴权,即使用安全认证中的Access Key ID 和 Secret Access Key进行鉴权,具体鉴权认证机制参考HTTP调用鉴权说明。
请求说明
- 基本信息
请求地址: https://qianfan.baidubce.com/wenxinworkshop/modelrepo/eval/model/list
请求方式: POST
- Header参数
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
Content-Type | string | 是 | 固定值:application/json |
x-bce-date | string | 否 | 当前时间,遵循ISO8601规范,格式如2016-04-06T08:23:49Z |
Authorization | string | 是 | 用于验证请求合法性的认证信息,更多内容请参考鉴权认证机制,签名工具可参考IAM签名工具 |
响应说明
名称 | 类型 | 描述 |
---|---|---|
log_id | int | 请求ID |
result | object | 请求结果 |
result说明
名称 | 类型 | 描述 |
---|---|---|
modelId | number | 模型ID,注意:该字段后续可能废弃,如需使用模型ID,请使用modelIdStr |
modelIdStr | string | 模型ID,string类型 |
modelName | string | 模型名称 |
source | string | 模型来源,说明: · 用户模型 · 预置模型 |
modelType | number | 模型类型 |
tags | string[] | 标签列表 |
modelVersionList | object[] | 模型版本列表 |
modelVersionList说明
名称 | 类型 | 描述 |
---|---|---|
modelVersionId | number | 模型版本ID,注意:该字段后续可能废弃,如需使用模型版本ID,请使用modelVersionIdStr |
modelVersionIdStr | string | 模型版本ID,string类型 |
version | string | 版本号 |
sourceType | string | 来源-训练/预置/加速 |
framework | string | 框架 |
algorithm | string | 算法 |
modelNet | string | 网络 |
description | string | 描述 |
请求示例
# 替换下列示例中的Authorization、x-bce-date
curl 'https://qianfan.baidubce.com/wenxinworkshop/modelrepo/eval/model/list' \
--header 'Authorization: bce-auth-v1/f0ee7axxxx/2023-09-19T13:42:13Z/180000/host;x-bce-date/9a8cfb8ee5xxxxxxxxxxxxxxx' \
--header 'x-bce-date: 2023-09-19T13:37:10Z' \
--header 'Content-Type: application/json' \
--data '{}'
响应示例
{
"log_id": "2347238209",
"result": [
{
"modelId": 8,
"modelIdStr": "am-ay2k0r83q9qr",
"modelName": "ERNIE-Bot-turbo",
"source": "PlatformPreset",
"modelType": 0,
"trainType": "ernieBotLite",
"modelVersionList": [
{
"modelVersionId": 600,
"modelVersionIdStr": "amv-nsjesf9kasjt",
"version": "ERNIE-Bot-turbo-0922",
"sourceType": "PlatformPreset",
"framework": "paddle",
"algorithm": "ERNIE_EB-ERNIEBOT_V202_FUSE",
"modelNet": "paddlepaddle-ERNIE_EB-ERNIEBOT_V202_LORA_FUSE",
"trainType": "ernieBotLite",
"description": "通过数据和策略迭代,提升模型生成效果。"
},
{
"modelVersionId": 492,
"modelVersionIdStr": "amv-4u0rw8juur1p",
"version": "ERNIE-Bot-turbo-0725",
"sourceType": "PlatformPreset",
"framework": "paddle",
"algorithm": "ERNIE_EB-ERNIEBOT_V201_8K",
"modelNet": "paddlepaddle-ERNIE_EB-ERNIEBOT_V201_8K",
"trainType": "ernieBotLite",
"description": "支持7K输入+1K输出,支持系统设置,新增推理参数"
},
{
"modelVersionId": 244,
"modelVersionIdStr": "amv-70ahikpspjqs",
"version": "ERNIE-Bot-turbo-0704",
"sourceType": "PlatformPreset",
"framework": "paddle",
"algorithm": "ERNIE_EB-ERNIEBOT_V200",
"modelNet": "paddlepaddle-ERNIE_EB-ERNIEBOT_V200",
"trainType": "ernieBotLite",
"description": "优化推理效果,修复部分问题"
}
]
},
{
"modelId": 446,
"modelIdStr": "am-44f8ji8eegp0",
"modelName": "Yi-34B",
"source": "PlatformPreset",
"modelType": 0,
"trainType": "",
"modelVersionList": [
{
"modelVersionId": 635,
"modelVersionIdStr": "amv-mpjrtxej6hye",
"version": "Yi-34B-Chat",
"sourceType": "PlatformPreset",
"framework": "Pytorch",
"algorithm": "opensource-yi-34b",
"modelNet": "pytorch-yi-34b-chat-1.13.1",
"trainType": "",
"description": "支持对话的chat版本"
},
{
"modelVersionId": 620,
"modelVersionIdStr": "amv-ffff66e1fm3d",
"version": "Yi-34B",
"sourceType": "PlatformPreset",
"framework": "Pytorch",
"algorithm": "opensource-yi-34b",
"modelNet": "pytorch-yi-34b-1.13.1",
"trainType": "",
"description": "初始预训练版本"
}
]
}
]
}
错误码
若请求错误,服务器将返回的JSON文本包含以下参数:
名称 | 描述 |
---|---|
error_code | 错误码 |
error_msg | 错误描述信息,帮助理解和解决发生的错误 |
例如参数错误返回:
{
"error_code": 500001,
"error_msg": "param invalid"
}
更多千帆大模型平台其他错误码,也可以查看错误码说明。