查询 Agent 历史对话信息
GET/v1/aibot/records
查询 Agent 历史对话信息
Request
Query Parameters
botId stringrequired
Agent ID
Example: bot-xxx
sort stringrequired
按照创建时间查询顺序 正序:asc 倒序:desc
Example: desc
pageSize number
分页参数, 默认为10
Example: 10
pageNumber number
分页参数,默认为1
Example: 1
Responses
- 200
- default
查询聊天记录成功时返回
Response Headers
X-Request-Id string
请求ID
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
recordList object[]required
历史对话列表
botId string
Agent ID
recordId string
对话ID,由系统生成
role string
对话中的角色
content string
对话内容
conversation string
用户标识
type string
对话数据类型
image string
对话生成的图片链接
triggerSrc string
对话发起来源
replyTo string
对话回复的记录ID
createTime string
对话时间
total numberrequired
对话总数
{
"recordList": [
{
"botId": "bot-xxx",
"recordId": "record-xxx",
"role": "user",
"content": "我是一段内容",
"conversation": "user",
"type": "text",
"image": "http://xxx.image",
"triggerSrc": "TCB",
"replyTo": "record-xxx",
"createTime": "2024-07-25T12:03:59.000Z"
}
],
"total": 10
}
查询聊天记录失败时返回
- application/json
- Schema
- Example (from schema)
Schema
code string
错误代码
message string
错误信息
requestId string
请求ID
{
"code": "INVALID_CREDENTIALS",
"message": "Credentials are invalid",
"requestId": "6360ba4b-f672-434b-9dee-35686a5589a4"
}
Loading...