获取所有线程
GET
/api/v0/chatbots/{chatbotId}/threads获取聊天机器人的所有线程
请求参数
Path 参数
chatbotId
string
必需
聊天机器人的 ID
Header 参数
Authorization
string
必需
示例值:
Bearer <token>
示例代码
返回响应
成功(200)
请求有误(400)
没有权限(401)
禁止访问(403)
服务器错误(500)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
success
boolean
必需
message
string
必需
data
object
必需
threads
array [object {14}]
必需
示例
成功示例
{
"success": true,
"message": "Fetched the chatbot threads successfully",
"data": {
"threads": [
{
"threadId": "06b3b43c-5651-49a2-b618-d7f24667c1b6",
"startedAt": "2023-05-18T11:39:57.349750Z",
"updatedAt": "2023-05-18T11:39:57.349750Z",
"endedAt": "2023-05-18T11:39:57.349750Z",
"chatUser": null,
"escalated": false,
"important": false,
"resolved": false,
"totalMessagesRead": 47,
"lastMessage": {
"answer": {
"text": "This is agent!!",
"timestamp": "2023-07-10T14:41:46.808649Z"
},
"sources": [],
"reaction": "NEUTRAL",
"threadId": "06b3b43c-5651-49a2-b618-d7f24667c1b6",
"messageType": "AGENT_MESSAGE",
"prompts": [
{
"id": "f3792c3c-5814-4dec-b530-55e1611951a9",
"title": "Prompt 1",
"description": "This is the prompt1 description"
},
{
"id": "64d7fb10-847a-4dd7-8b5b-821fca199606",
"title": "Prompt 2",
"description": "This is the prompt2 description"
}
],
"messageId": "369876016179446353",
"question": null,
"chatbotId": "365062873485935184"
},
"totalMessages": 47,
"totalPositiveMessages": 0,
"totalNegativeMessages": 0,
"totalGpt4MessagesCount": 0
},
{
"threadId": "88d6c628-c108-4ca7-9578-0424461c0832",
"startedAt": "2023-05-19T14:33:08.252701Z",
"updatedAt": "2023-05-19T14:33:08.252701Z",
"endedAt": "2023-05-19T14:33:08.252701Z",
"chatUser": null,
"escalated": false,
"important": false,
"resolved": false,
"totalMessagesRead": 0,
"lastMessage": {
"question": {
"text": "This is bot",
"timestamp": "2023-05-19T14:33:08.771854Z"
},
"sources": [],
"reaction": "NEUTRAL",
"threadId": "88d6c628-c108-4ca7-9578-0424461c0832",
"messageType": "USER_MESSAGE",
"iconUrl": "https://avatars.githubusercontent.com/u/17903466?s=48&v=4",
"messageId": "365164430725481040",
"answer": null,
"chatbotId": "365062873485935184",
"prompts": []
},
"totalMessages": 1,
"totalPositiveMessages": 0,
"totalNegativeMessages": 0,
"totalGpt4MessagesCount": 0
},
{
"threadId": "1ca901e8-dab9-4e8f-ac24-80b557e89742",
"startedAt": "2023-05-18T11:47:48.313693Z",
"updatedAt": "2023-05-18T11:47:48.313693Z",
"endedAt": "2023-05-18T11:47:48.313693Z",
"chatUser": null,
"escalated": false,
"important": false,
"resolved": false,
"totalMessagesRead": 0,
"lastMessage": {
"question": {
"text": "Hello, what is this?",
"timestamp": "2023-05-18T11:47:57.194303Z"
},
"answer": {
"text": "This is a website where you can find information on various topics. Please browse our pages to learn more.",
"timestamp": "2023-05-18T11:47:57.194303Z"
},
"gptModel": "gpt-3.5-turbo",
"sources": [],
"reaction": "NEUTRAL",
"threadId": "1ca901e8-dab9-4e8f-ac24-80b557e89742",
"messageType": "NORMAL_MESSAGE",
"messageId": "365063440720462416",
"chatbotId": "365062873485935184",
"prompts": []
},
"totalMessages": 1,
"totalPositiveMessages": 0,
"totalNegativeMessages": 0,
"totalGpt4MessagesCount": 0
}
]
}
}
最后修改时间: 8 个月前