(&self)
| 310 | } |
| 311 | |
| 312 | fn validate_config(&self) -> GraphBitResult<()> { |
| 313 | if self.chunk_size == 0 { |
| 314 | return Err(GraphBitError::validation( |
| 315 | "text_splitter", |
| 316 | "Chunk size must be greater than 0", |
| 317 | )); |
| 318 | } |
| 319 | Ok(()) |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | /// Token-based text splitter |