取得問答列表
取得問答列表
從代理聊天記錄中取得問答列表。
要求方法
GET
要求 URL
https://api.gptbots.ai/v1/message/qa/record/page
驗證方式
請參閱概覽以了解驗證相關資訊。
要求
範例要求
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}'
此代碼塊在浮窗中顯示
要求標頭
| 欄位 | 類型 | 說明 |
|---|---|---|
| Authorization | Bearer ${API Key} | 使用 Authorization: Bearer ${API Key} 來進行驗證。API Key 可於 API Key 頁面取得。 |
要求參數
| 欄位 | 類型 | 必填 | 說明 |
|---|---|---|---|
| user_feedback | String | 是 | 使用者回饋。 |
| start_time | Long | 是 | 查詢範圍的起始時間,採用時間戳格式。查詢對象為問答中的問題(Q)時間。 |
| end_time | Long | 是 | 查詢範圍的結束時間,採用時間戳格式。查詢對象為問答中的問題(Q)時間。 |
| 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 | 問答列表。 |
| id | String | 問答的 ID。 |
| q_time | Long | 問題(Q)發出的時間(時間戳格式)。 |
| q | String | 問題內容。 |
| a | String | 答案內容。 |
| user_feedback | String | 使用者回饋。 |
| convo_id | String | 關聯對話的 ID。 |
| convo_type | String | 關聯對話的類型。 |
| user_id | String | 使用者 ID。由代理開發者透過第三方方式標記的自訂 ID,用於識別特定使用者身份。 |
失敗回應
| 欄位 | 類型 | 說明 |
|---|---|---|
| code | Int | 錯誤代碼。 |
| message | String | 錯誤說明。 |
