Re-embed Failed Docs
Re-embed Failed Docs
Batch embed all documents in the Agent with a status of "Failed".
Request Method
POST
Request URL
https://api-${endpoint}.gptbots.ai/v1/bot/data/retry/batch
Request Authentication
See Overview for authentication details.
Request
Request Example
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 '{}'
This code block in the floating window
Request Headers
| Field | Type | Description |
|---|---|---|
| Authorization | Bearer ${API Key} | Use Authorization: Bearer ${API Key} for authentication. Get API key from API Key page. |
| Content-Type | application/json | Data type, set to application/json. |
Request Parameters
None.
Re-vectorizes all documents with failed status under the current Agent.
Response
Response Example
{
"affectCount": 0
}
{
"affectCount": 0
}
This code block in the floating window
Success Response
| Field | Type | Description |
|---|---|---|
| affectCount | long | The number of documents re-embedded this time. |
Failure Response
| Field | Type | Description |
|---|---|---|
| code | int | Error code. |
| message | string | Error details. |
Error Codes
| Code | Message |
|---|---|
| 40000 | Invalid parameter |
| 40127 | Developer authentication failed |
| 20059 | Agent deleted |
