提交聊天生图
请求URL:
/submitRecordImag
请求方式:
- POST
参数:
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| recordId | 否 | int | 对话记录ID |
| recordIds | 否 | []int | 对话记录ID列表 |
| type | 是 | int | 类型:1-生图;2-生视频 |
返回示例
{
"code": 200,
"msg": "SUCCESS",
"data": {
"id": 1,
"recordId": 29621,
"dialogueId": 4971,
"roleId": 10003,
"type": 1,
"state": 10,
"path": "",
"reason": "",
"updatedAt": 1763104933
}
}
返回参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | int | 状态码 |
| msg | string | 提示信息 |
| data | struct | 生图数据 |
| - id | uint | 生图任务ID |
| - recordId | uint | 对话记录ID |
| - dialogueId | uint | 会话记录ID |
| - roleId | uint | 角色ID |
| - type | uint | 任务类型:1-生图;2-生视频 |
| - path | string | 文件地址 |
| - reason | string | 失败原因 |
| - state | uint | 任务状态:2-生图失败;10-等待生图;20-正在生图;30-生图成功 |
备注
生图成功或失败后,服务器会推送通知;
推送参数:
{
"type": 30, // 消息类型
"msg": "xxxxx", // 消息说明
"data": {
"dialogueId": taskInfo.DialogueId, // int 会话ID
"roleId": taskInfo.RoleID, // int 角色ID
"recordId": taskInfo.RecordId, // int 对话记录ID
"type": taskInfo.Type, // int 任务类型
"state": taskInfo.State, // 任务状态
"thumbFileUrl": "xxxxx", // 缩略图地址
"fileUrl": "xxxxx", // 原图地址
"reason": "", // 失败原因
},
}