Documentation Index
Fetch the complete documentation index at: https://docs.chonkie.ai/llms.txt
Use this file to discover all available pages before exploring further.
Port your chunks to a JSON file with the JSONPorter. This is useful for exporting your chunked data for use in other applications or for archiving.
Initialization
from chonkie import JSONPorter
from chonkie.types.base import Chunk
chunks = [
Chunk(
id="chunk1",
text="This is the first chunk.",
metadata={"source": "document1.txt"}
),
Chunk(
id="chunk2",
text="This is the second chunk.",
metadata={"source": "document2.txt"}
)
]
porter = JSONPorter()
porter.export(chunks)