curl --request POST \
--url https://zeus-api.agentspro.cn/api/knowledge-base/preview-chunks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"content": "# 标题\n\n第一段内容...\n\n第二段内容...\n\n第三段内容...",
"chunk_size": 512,
"chunk_overlap": 50,
"delimiter": "\n\n"
}'
{
"chunks": [
{
"index": 0,
"content": "# 标题\n\n第一段内容...",
"length": 18
},
{
"index": 1,
"content": "第二段内容...",
"length": 8
},
{
"index": 2,
"content": "第三段内容...",
"length": 8
}
],
"total": 3
}
预览分块结果(客户端调试用)
curl --request POST \
--url https://zeus-api.agentspro.cn/api/knowledge-base/preview-chunks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"content": "# 标题\n\n第一段内容...\n\n第二段内容...\n\n第三段内容...",
"chunk_size": 512,
"chunk_overlap": 50,
"delimiter": "\n\n"
}'
{
"chunks": [
{
"index": 0,
"content": "# 标题\n\n第一段内容...",
"length": 18
},
{
"index": 1,
"content": "第二段内容...",
"length": 8
},
{
"index": 2,
"content": "第三段内容...",
"length": 8
}
],
"total": 3
}
curl --request POST \
--url https://zeus-api.agentspro.cn/api/knowledge-base/preview-chunks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"content": "# 标题\n\n第一段内容...\n\n第二段内容...\n\n第三段内容...",
"chunk_size": 512,
"chunk_overlap": 50,
"delimiter": "\n\n"
}'
{
"chunks": [
{
"index": 0,
"content": "# 标题\n\n第一段内容...",
"length": 18
},
{
"index": 1,
"content": "第二段内容...",
"length": 8
},
{
"index": 2,
"content": "第三段内容...",
"length": 8
}
],
"total": 3
}