Trait for all text splitter implementations
| 163 | |
| 164 | /// Trait for all text splitter implementations |
| 165 | pub trait TextSplitterTrait: Send + Sync { |
| 166 | /// Split text into chunks |
| 167 | fn split_text(&self, text: &str) -> GraphBitResult<Vec<TextChunk>>; |
| 168 | |
| 169 | /// Get the splitter configuration |
| 170 | fn config(&self) -> &TextSplitterConfig; |
| 171 | |
| 172 | /// Validate configuration parameters |
| 173 | fn validate_config(&self) -> GraphBitResult<()>; |
| 174 | } |
| 175 | |
| 176 | /// Character-based text splitter |
| 177 | pub struct CharacterSplitter { |
nothing calls this directly
no outgoing calls
no test coverage detected