获取线程
开发环境
开发环境
GET
/api/v0/chatbots/{chatbotId}/threads/{threadId}
请求示例请求示例
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 thread successfully",
"data": {
"thread": {
"threadId": "06b3b43c-5651-49a2-b618-d7f24667c1b6",
"mode": "AI",
"messages": [
{
"messageId": "365062948587045457",
"question": {
"text": "Hello, what is this?",
"timestamp": "2023-05-18T11:40:07.857030Z"
},
"answer": {
"text": "Hello! I am an AI assistant designed to provide information about the website's content. If you have any specific questions, feel free to ask and I will do my best to provide accurate answers.",
"timestamp": "2023-05-18T11:40:07.857030Z"
},
"reaction": "NEUTRAL",
"sources": [],
"messageType": "NORMAL_MESSAGE",
"systemMessageType": "CONVERSATION_ESCALATED",
"iconUrl": null,
"prompts": [],
"gptModel": "gpt-3.5-turbo"
},
{
"messageId": "365064286366597712",
"question": {
"text": "Hi",
"timestamp": "2023-05-18T12:01:23.667033Z"
},
"answer": null,
"reaction": "NEUTRAL",
"sources": [],
"messageType": "USER_MESSAGE",
"systemMessageType": "CONVERSATION_ESCALATED",
"iconUrl": null,
"prompts": [],
"gptModel": "gpt-3.5-turbo"
},
{
"messageId": "365064310572974672",
"question": null,
"answer": {
"text": "YO",
"timestamp": "2023-05-18T12:01:46.751791Z"
},
"reaction": "NEUTRAL",
"sources": [],
"messageType": "AGENT_MESSAGE",
"systemMessageType": "CONVERSATION_ESCALATED",
"iconUrl": null,
"prompts": [],
"gptModel": "gpt-3.5-turbo"
}
],
"startedAt": "2023-05-18T11:39:57.349750Z",
"updatedAt": "2023-05-18T11:39:57.349750Z",
"webhookUrl": "https://hooks.zapier.com/hooks/catch/15695697/3hqs23e",
"totalMessagesRead": 47,
"chatUserId": null,
"chatbotId": "365062873485935184",
"chatUser": null
}
}
}
请求参数
Path 参数
chatbotId
string
必需
threadId
string
必需
Header 参数
Authorization
string
必需
示例值:
Bearer <token>
返回响应
修改于 2024-03-28 08:30:16