"\n\n"
), with chunk length measured by the number of characters.
Key points:
- How text is split: by a given character separator.
- How chunk size is measured: by character count.
.splitText
— returns plain string chunks..createDocuments
— returns LangChain Document objects, useful when metadata needs to be preserved for downstream tasks.
.createDocuments
to propagate metadata associated with each document to the output chunks:
.splitText
to obtain the string content directly: