ChunkingStrategy. This is useful when you need to split documents based on specific separators, apply custom logic, or handle domain-specific content formats.
1
Create a Python file
2
Add the following code to your Python file
custom_chunking.py
3
Create a virtual environment
Open the
Terminal and create a python virtual environment.4
Install libraries
5
Run PgVector
6
Run the script
Custom Chunking Params
| Parameter | Type | Default | Description |
|---|---|---|---|
separator | str | "---" | The string used to split the document content into chunks. |