logo
การพัฒนา
ค้นหา
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 '{}'

                    
บล็อกโค้ดนี้ในหน้าต่างลอย

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
}

                    
บล็อกโค้ดนี้ในหน้าต่างลอย

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