LangBot Docs
知识库

将文件存入知识库

将已上传的文件关联到知识库并开始解析。先通过 /api/v1/files/documents 上传文件获取 file_id。

POST
/api/v1/knowledge/bases/{kb_uuid}/files

将已上传的文件关联到知识库并开始解析。先通过 /api/v1/files/documents 上传文件获取 file_id。

Authorization

X-API-Key<token>

In: header

Path Parameters

kb_uuid*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/knowledge/bases/497f6eca-6276-4993-bfeb-53cbbbba6f08/files" \  -H "Content-Type: application/json" \  -d '{    "file_id": "string"  }'
{  "code": 0,  "data": {    "task_id": "string"  }}