curl --request POST \
--url https://api.trieve.ai/api/chunk/split \
--header 'Content-Type: application/json' \
--data '{
"body_remove_strings": [
"Warning:",
"Note:"
],
"chunk_html": "",
"heading_remove_strings": [
"###",
"##",
"#"
]
}'
{
"chunks": [
{
"body": "This is the body of the content",
"headings": [
"Title Heading",
"Sub Heading 1",
"Sub Sub Heading 1"
]
},
{
"body": "This is the body of the content",
"headings": [
"Title Heading",
"Sub Heading 1",
"Sub Sub Heading 2"
]
}
]
}
This endpoint receives a single html string and splits it into chunks based on the headings and body content. The headings are split based on heading html tags. chunk_html has a maximum size of 256Kb.
curl --request POST \
--url https://api.trieve.ai/api/chunk/split \
--header 'Content-Type: application/json' \
--data '{
"body_remove_strings": [
"Warning:",
"Note:"
],
"chunk_html": "",
"heading_remove_strings": [
"###",
"##",
"#"
]
}'
{
"chunks": [
{
"body": "This is the body of the content",
"headings": [
"Title Heading",
"Sub Heading 1",
"Sub Sub Heading 1"
]
},
{
"body": "This is the body of the content",
"headings": [
"Title Heading",
"Sub Heading 1",
"Sub Sub Heading 2"
]
}
]
}
JSON request payload to perform RAG on some chunks (chunks)
The body is of type object
.
This will be a JSON response of the chunks split from the HTML content with the headings and body
The response is of type object
.
Was this page helpful?