获取模型版本详情
开发环境
开发环境
POST
https://qianfan.baidubce.com/wenxinworkshop/modelrepo/modelVersionDetail
功能介绍
注意事项
请求参数
名称 | 类型 | 描述 |
---|---|---|
sourceType | string | 版本来源类型,不同类型对应不同的数据结构,说明: Train:大模型训练产生 Acceleration:模型加速产生 Import:外部导入模型 |
trainSourceExtra | object | 大模型训练回溯信息 |
accelerationSourceExtra | object | 模型加速回溯信息 |
importModelVersionSourceExtra | object | 导入模型回溯信息 |
名称 | 类型 | 描述 |
---|---|---|
taskId | integer | 训练ID |
taskName | string | 训练名称 |
iterationVersion | integer | 训练任务版本 |
runId | integer | 训练运行ID |
devType | integer | 说明: 1:大模型调优 2:RLHF-奖励模型 3:RLHF-强化学习 |
modelType | integer | 模型类型 |
名称 | 类型 | 描述 |
---|---|---|
taskId | integer | 加速任务id |
taskName | string | 加速任务名称 |
sourceModelVersionId | integer | 源模型id |
名称 | 类型 | 描述 |
---|---|---|
bucket | string | bos bucket |
object | string | bos object |
名称 | 类型 | 描述 |
---|---|---|
input | string | 入参,json字符串 |
output | integer | 出参,json字符串 |
错误码
名称 | 描述 |
---|---|
error_code | 错误码 |
error_msg | 错误描述信息,帮助理解和解决发生的错误 |
{
"error_code": 500001,
"error_msg": "param invalid"
}
错误码 | 错误信息 | 描述 |
---|---|---|
500000 | internal server error | 服务器内部错误 |
500001 | param invalid | 参数错误 |
500001 | param[%s] invalid | 参数错误 |
500002 | auth failed, no access | 无权访问 |
70002 | 查询错误[获取模型版本列表失败] | 查询模型版本列表失败 |
70102 | AI模型版本记录不存在 | 模型版本不存在 |
70105 | 获取模型参数失败 | 获取模型参数失败 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://qianfan.baidubce.com/wenxinworkshop/modelrepo/modelVersionDetail?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw '{
"modelVersionId":1
}'
响应示例响应示例
{
"result": {
"modelId": 0,
"modelName": "string",
"modelVersionId": 0,
"version": "string",
"description": "string",
"sourceType": "string",
"sourceExtra": {},
"framework": "string",
"algorithm": "string",
"modelNet": "string",
"state": "string",
"ioMode": "string",
"ioLength": "string",
"copyright": "string",
"property": {},
"createTime": "string",
"modifyTime": "string",
"deployResource": [
"string"
],
"supportOptions": [
"string"
],
"params": {
"input": {
"type": "string",
"required": [
"string"
],
"properties": {
"messages": {
"type": "string",
"items": {
"type": "string",
"required": [
"string"
],
"properties": {
"role": {
"name": "string",
"type": "string",
"default": "string",
"description": "string"
},
"content": {
"name": "string",
"type": "string",
"description": "string"
}
}
}
},
"stream": {
"name": "string",
"type": "string",
"description": "string"
},
"user_id": {
"name": "string",
"type": "string",
"description": "string"
},
"temperature": {
"name": "string",
"type": "string",
"format": "string",
"description": "string"
},
"top_p": {
"name": "string",
"type": "string",
"format": "string",
"description": "string"
},
"penalty_score": {
"name": "string",
"type": "string",
"format": "string",
"description": "string"
}
}
},
"output": {
"type": "string",
"required": [
"string"
],
"properties": {
"id": {
"name": "string",
"type": "string",
"description": "string"
},
"object": {
"name": "string",
"type": "string",
"description": "string"
},
"created": {
"name": "string",
"type": "string",
"format": "string",
"description": "string"
},
"sentence_id": {
"name": "string",
"type": "string",
"format": "string",
"description": "string"
},
"is_end": {
"name": "string",
"type": "string",
"description": "string"
},
"is_truncated": {
"name": "string",
"type": "string",
"description": "string"
},
"result": {
"name": "string",
"type": "string",
"description": "string"
},
"need_clear_history": {
"name": "string",
"type": "string",
"description": "string"
},
"ban_round": {
"name": "string",
"type": "string",
"format": "string",
"description": "string"
},
"usage": {
"type": "string",
"required": [
"string"
],
"description": "string",
"properties": {
"prompt_tokens": {
"name": "string",
"type": "string",
"format": "string",
"description": "string"
},
"completion_tokens": {
"name": "string",
"type": "string",
"format": "string",
"description": "string"
},
"total_tokens": {
"name": "string",
"type": "string",
"format": "string",
"description": "string"
}
}
}
}
}
}
},
"log_id": "string"
}
请求参数
Query 参数
access_token
string
必需
Header 参数
Content-Type
string
必需
x-bce-date
string
必需
Authorization
string
必需
Body 参数application/json
返回响应
修改于 2023-11-16 03:14:31