{
"documents": [
{
"doc_name": "智能说明书.txt",
"doc_url": "https://xxx/智能说明书.txt"
}
],
"text_splitter": {
"method": "token",
"options": {
"chunk_size": "100",
"chunk_overlap": "10"
}
}
}
curl --location -g --request POST 'https://api.listenai.com/v1/knowledge-bases/{{index_id}}/documents/process_preview' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"documents": [
{
"doc_name": "智能说明书.txt",
"doc_url": "https://xxx/智能说明书.txt"
}
],
"text_splitter": {
"method": "token",
"options": {
"chunk_size": "100",
"chunk_overlap": "10"
}
}
}'
{
"data": [
{
"text": "xxxxxxx",
"length": 100
},
...
],
"message": "成功"
}