修改知识库接口
开发环境
开发环境
POST
https://api.baichuan-ai.com/v1/kbs/{kb_id}
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.baichuan-ai.com/v1/kbs/' \
--header 'Authorization: Bearer $API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "rename",
"description": "test"
}'
响应示例响应示例
{
"id": "kb-abc123",
"object": "knowledge-base",
"name": "rename",
"description": "test",
"file_ids": [],
"created_at": 1677610602,
"updated_at": 1677620602,
"status": "online",
"split_type": ,
"split_config": {
"chunk_overlap_len": 512,
"chunk_max_len": 100,
"separators": [".","。","\n"]
}
}
请求参数
Path 参数
kb_id
string
知识库 ID
Header 参数
Content-Type
string
必需
示例值:
application/json
Authorization
string
必需
示例值:
Bearer $API_KEY
Body 参数application/json
返回响应
修改于 2023-12-21 08:56:17