批量重新嵌入失敗檔案
批量重新嵌入失敗檔案
批次重新嵌入所有狀態為「失敗」的 Agent 文件,適用於需再次處理嵌入(向量化)失敗的知識檔案。
請求方法
POST
請求 URL
https://api-${endpoint}.gptbots.ai/v1/bot/data/retry/batch
請求認證
請參閱概述以取得認證詳細資訊。
請求
請求範例
curl -X POST https://api-${endpoint}.gptbots.ai/v1/bot/data/retry/batch \
-H 'Authorization: Bearer ${API Key}' \
-H 'Content-Type: application/json' \
-d '{}'
curl -X POST https://api-${endpoint}.gptbots.ai/v1/bot/data/retry/batch \
-H 'Authorization: Bearer ${API Key}' \
-H 'Content-Type: application/json' \
-d '{}'
此代碼塊在浮窗中顯示
範例說明:此請求會重新處理所有於目前 Agent 下狀態為「失敗」的檔案,進行嵌入(向量化)作業。
請求標頭
| 欄位 | 類型 | 描述 |
|---|---|---|
| Authorization | Bearer ${API Key} | 使用 Authorization: Bearer ${API Key} 進行認證。API Key(應用程式介面金鑰)可於 API Key 頁面取得。 |
| Content-Type | application/json | 資料類型,設為 application/json。 |
請求參數
無
系統會自動重新嵌入所有目前 Agent 下狀態為「失敗」的檔案。
回應
回應範例
{
"affectCount": 0 // 本次重新嵌入的檔案數量
}
{
"affectCount": 0 // 本次重新嵌入的檔案數量
}
此代碼塊在浮窗中顯示
成功回應
| 欄位 | 類型 | 描述 |
|---|---|---|
| affectCount | long | 本次重新嵌入的檔案數量。 |
失敗回應
| 欄位 | 類型 | 描述 |
|---|---|---|
| code | int | 錯誤代碼。 |
| message | string | 錯誤訊息。 |
錯誤代碼
| 錯誤代碼 | 錯誤訊息 |
|---|---|
| 40000 | 無效參數 |
| 40127 | 開發者認證失敗 |
| 20059 | Agent 已刪除 |
