รับรายการ Q&A
รับรายการ Q&A
ดึงรายการ Q&A จากประวัติแชทของ Agent
วิธีการร้องขอ
GET
URL สำหรับร้องขอ
https://api.gptbots.ai/v1/message/qa/record/page
การยืนยันตัวตนในการร้องขอ
โปรดดูรายละเอียดการยืนยันตัวตนในหัวข้อ Overview
การร้องขอ
ตัวอย่างการร้องขอ
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/message/qa/record/page?page=1&page_size=10&start_time=1732982400000&end_time=1735660799999&user_feedback=ALL' \
-H 'Authorization: Bearer ${API Key}'
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/message/qa/record/page?page=1&page_size=10&start_time=1732982400000&end_time=1735660799999&user_feedback=ALL' \
-H 'Authorization: Bearer ${API Key}'
บล็อกโค้ดนี้ในหน้าต่างลอย
Header ของการร้องขอ
| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
| Authorization | Bearer ${API Key} | ใช้ Authorization: Bearer ${API Key} สำหรับยืนยันตัวตน รับ API Key ได้จากหน้า API Key |
Request Body
| ฟิลด์ | ประเภท | จำเป็นต้องระบุ | คำอธิบาย |
|---|---|---|---|
| user_feedback | String | ใช่ | ข้อเสนอแนะจากผู้ใช้ |
| start_time | Long | ใช่ | เวลาเริ่มต้นช่วงที่ต้องการค้นหา (timestamp) ข้อมูลที่ค้นหาคือเวลาของคำถาม (Q) ใน Q&A |
| end_time | Long | ใช่ | เวลาสิ้นสุดช่วงที่ต้องการค้นหา (timestamp) ข้อมูลที่ค้นหาคือเวลาของคำถาม (Q) ใน Q&A |
| page | Integer | ใช่ | หมายเลขหน้า เริ่มที่ 1 |
| page_size | Integer | ใช่ | จำนวนรายการต่อหน้า กำหนดได้ในช่วง 10-100 |
การตอบกลับ
ตัวอย่างการตอบกลับ
{
"qa": [
{
"id": "xxxxxx",
"q_time": 1699891200,
"q": "xxxxxx",
"a": "xxxxxx",
"user_feedback": "GOOD",
"convo_id": "xxxxxx",
"convo_type": "API",
"aid": "xxxxxx",
"user_id": "xxxxxx"
},
{
"id": "xxxxxx",
"q_time": 1699891214,
"q": "xxxxxx",
"a": "xxxxxx",
"user_feedback": "BAD",
"convo_id": "xxxxxx",
"convo_type": "API",
"aid": "xxxxxx",
"user_id": "xxxxxx"
}
]
}
{
"qa": [
{
"id": "xxxxxx",
"q_time": 1699891200,
"q": "xxxxxx",
"a": "xxxxxx",
"user_feedback": "GOOD",
"convo_id": "xxxxxx",
"convo_type": "API",
"aid": "xxxxxx",
"user_id": "xxxxxx"
},
{
"id": "xxxxxx",
"q_time": 1699891214,
"q": "xxxxxx",
"a": "xxxxxx",
"user_feedback": "BAD",
"convo_id": "xxxxxx",
"convo_type": "API",
"aid": "xxxxxx",
"user_id": "xxxxxx"
}
]
}
บล็อกโค้ดนี้ในหน้าต่างลอย
การตอบกลับเมื่อสำเร็จ
| ชื่อฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
| qa | Array<Object> | รายการ Q&A |
| id | String | รหัส Q&A |
| q_time | Long | เวลาที่ส่งคำถาม (Q) ในรูปแบบ timestamp |
| q | String | เนื้อหาคำถาม |
| a | String | เนื้อหาคำตอบ |
| user_feedback | String | ข้อเสนอแนะจากผู้ใช้ |
| convo_id | String | รหัสการสนทนาที่เกี่ยวข้อง |
| convo_type | String | ประเภทการสนทนาที่เกี่ยวข้อง |
| user_id | String | รหัสผู้ใช้ (User ID) รหัสที่นักพัฒนา Agent กำหนดเองผ่านช่องทาง third-party ใช้ระบุเอกลักษณ์ของผู้ใช้แต่ละราย |
การตอบกลับเมื่อไม่สำเร็จ
| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
| code | Int | รหัสข้อผิดพลาด |
| message | String | รายละเอียดข้อผิดพลาด |
