构建文件索引
开发中
POST
/api/build_file_index
功能:用于下载PDF 文件,分段处理并建立 Elasticsearch 索引。
请求方式:POST
请求地址:/api/build_file_index
请求参数:
user_id (string, required): 用户ID。
assistant_id (string, required): 助手ID。
tenant_id (string,required):组织ID。
file_id (string, required): 文件ID。
file_name (string, required): 文件名。
download_path (string, required): 下载文件的路径。
示例请求
Json
{
"user_id": "123456",
"assistant_id": "assistant1",
"file_id": "file123",
"file_name": "example.pdf",
"tenant_id": "同济大学"
"download_path": "https://example.com/example.pdf"
}
响应
成功建立索引的响应:
Json
{
"status": "成功建立索引"
}
建立索引失败的响应:
Json
{
"status": "建立索引失败",
"message": "失败的原因"
}
请求参数
Query 参数
user_id
string
必需
示例值:
gzc
assistant_id
string
必需
示例值:
abcde
file_id
string
必需
示例值:
123456
file_name
string
必需
示例值:
example.pdf
download_path
string
必需
示例值:
https://img.iduodou.com/images/docs/20240616/3ED55D87-5FE1-4B82-B2F6-C819CEF3C3DF.pdf
tenant_id
string
必需
示例值:
test
tag
string
必需
createTime
string
必需
示例值:
1630454400000
Header 参数
Content-Type
string
必需
示例值:
application/json; charset=utf-8
Body 参数application/json
示例代码
返回响应
修改于 2025-07-02 13:36:22