获取所有线程
开发环境
开发环境
GET
/api/v0/chatbots/{chatbotId}/threads
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://dev-cn.your-api-server.com/api/v0/chatbots//threads' \
--header 'Authorization: Bearer <token>'
响应示例响应示例
200 - 成功示例
{
"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
}
]
}
}
请求参数
Path 参数
chatbotId
string
必需
Header 参数
Authorization
string
必需
示例值:
Bearer <token>
返回响应
修改于 2024-03-28 08:28:42