logo
开发者文档
搜索
重新嵌入文档

重新嵌入文档

对 Agent 内所有状态为「处理失败」的文档进行批量嵌入。

请求方式

POST

调用地址

https://api-${endpoint}.gptbots.ai/v1/bot/data/retry/batch

调用验证

详情参见 API 概述的鉴权方式说明。

请求

请求示例

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 '{}'

                    
此代码块在浮窗中显示

请求头

字段 类型 描述
Authorization Bearer ${API Key} 使用 Authorization: Bearer ${API Key} 进行调用验证,请在 API 密钥页面获取密钥作为 API Key。
Content-Type application/json 数据类型,取值为 application/json

请求体

注意: 调用该接口后,对 Agent 内所有状态为「处理失败」的文档进行重新向量化处理。

响应

响应示例

{ "affectCount": 0 }
                      
                      {
    "affectCount": 0
}

                    
此代码块在浮窗中显示

成功响应

字段 类型 描述
affectCount long 本次重新嵌入的文档数。

失败响应

字段 类型 描述
code int 错误码。
message string 错误详情。

错误码

Code Message
40000 参数错误
40127 开发者鉴权失败
20059 Agent 已删除