Skip to main content
GET
/
datasource
/
{datasource_id}
/
chunking_strategy
Python (SDK)
from meibelai import Meibelai
import os


with Meibelai(
    api_key_header=os.getenv("MEIBELAI_API_KEY_HEADER", ""),
) as m_client:

    res = m_client.datasources.rag.get_chunking_strategy(datasource_id="<id>")

    # Handle response
    print(res)
{
  "datasource_id": "<string>",
  "code_splitter": {
    "chunk_lines": 40,
    "chunk_lines_overlap": 15,
    "max_chars": 1500
  },
  "html_node_parser": {
    "include_metadata": true,
    "include_prev_next_rel": true,
    "tags": [
      "<string>"
    ]
  },
  "json_node_parser": {
    "include_metadata": true,
    "include_prev_next_rel": true
  },
  "markdown_node_parser": {
    "include_metadata": true,
    "include_prev_next_rel": true,
    "header_path_separator": "<string>"
  },
  "semantic_splitter_node_parser": {
    "include_metadata": true,
    "include_prev_next_rel": true,
    "buffer_size": 1,
    "breakpoint_percentile_threshold": 95
  },
  "sentence_splitter": {
    "chunk_size": 1024,
    "chunk_overlap": 200,
    "separator": " ",
    "paragraph_separator": "\n\n\n",
    "secondary_chunking_regex": "[^,.;。?!]+[,.;。?!]?|[,.;。?!]"
  },
  "token_text_splitter": {
    "chunk_size": 1024,
    "chunk_overlap": 20,
    "separator": " ",
    "backup_separators": [
      "<string>"
    ],
    "keep_whitespaces": false
  }
}

Authorizations

Meibel-API-Key
string
header
required

Path Parameters

datasource_id
string
required

Response

Successful Response

RagChunkingStrategy

datasource_id
string
required
code_splitter
CodeChunking · object

CodeChunking

html_node_parser
HTMLChunking · object

HTMLChunking

json_node_parser
JSONNodeChunking · object

JSONNodeChunking

markdown_node_parser
MarkdownNodeChunking · object

MarkdownNodeChunking

semantic_splitter_node_parser
SemanticChunking · object

SemanticChunking

sentence_splitter
SentenceChunking · object

SentenceChunking

token_text_splitter
TokenTextChunking · object

TokenTextChunking