LoadAndSplit reads text data from the io.Reader and splits it into multiple documents using a text splitter.
(ctx context.Context, splitter textsplitter.TextSplitter)
| 51 | // LoadAndSplit reads text data from the io.Reader and splits it into multiple |
| 52 | // documents using a text splitter. |
| 53 | func (h HTML) LoadAndSplit(ctx context.Context, splitter textsplitter.TextSplitter) ([]schema.Document, error) { |
| 54 | docs, err := h.Load(ctx) |
| 55 | if err != nil { |
| 56 | return nil, err |
| 57 | } |
| 58 | return textsplitter.SplitDocuments(splitter, docs) |
| 59 | } |
nothing calls this directly
no test coverage detected