LoadAndSplit loads from a source and splits the documents using a text splitter.
(ctx context.Context, splitter textsplitter.TextSplitter)
| 152 | |
| 153 | // LoadAndSplit loads from a source and splits the documents using a text splitter. |
| 154 | func (l *RecursiveDirectoryLoader) LoadAndSplit(ctx context.Context, splitter textsplitter.TextSplitter) ([]schema.Document, error) { |
| 155 | docs, err := l.Load(ctx) |
| 156 | if err != nil { |
| 157 | return nil, err |
| 158 | } |
| 159 | return textsplitter.SplitDocuments(splitter, docs) |
| 160 | } |
nothing calls this directly
no test coverage detected