LoadAndSplit reads text data from the io.Reader and splits it into multiple documents using a text splitter.
(ctx context.Context, splitter textsplitter.TextSplitter)
| 73 | // LoadAndSplit reads text data from the io.Reader and splits it into multiple |
| 74 | // documents using a text splitter. |
| 75 | func (c CSV) LoadAndSplit(ctx context.Context, splitter textsplitter.TextSplitter) ([]schema.Document, error) { |
| 76 | docs, err := c.Load(ctx) |
| 77 | if err != nil { |
| 78 | return nil, err |
| 79 | } |
| 80 | |
| 81 | return textsplitter.SplitDocuments(splitter, docs) |
| 82 | } |
nothing calls this directly
no test coverage detected