Documentation
¶
Index ¶
- type CSVStreamParser
- func (p *CSVStreamParser) GetSupportedTypes() []string
- func (p *CSVStreamParser) Parse(ctx context.Context, content []byte, metadata map[string]any) (*core.Document, error)
- func (p *CSVStreamParser) ParseStream(ctx context.Context, r io.Reader, metadata map[string]any) (<-chan *core.Document, error)
- func (p *CSVStreamParser) Supports(contentType string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSVStreamParser ¶
type CSVStreamParser struct {
// contains filtered or unexported fields
}
CSVStreamParser reads CSV files and streams them out. It bundles N rows into a single Document to balance chunking granularity.
func DefaultCSVStreamParser ¶ added in v1.1.3
func DefaultCSVStreamParser(rowsPerDocument int, hasHeader bool) *CSVStreamParser
func (*CSVStreamParser) GetSupportedTypes ¶
func (p *CSVStreamParser) GetSupportedTypes() []string
func (*CSVStreamParser) Parse ¶
func (p *CSVStreamParser) Parse(ctx context.Context, content []byte, metadata map[string]any) (*core.Document, error)
Parse implements core.Parser interface.
func (*CSVStreamParser) ParseStream ¶
func (*CSVStreamParser) Supports ¶
func (p *CSVStreamParser) Supports(contentType string) bool
Click to show internal directories.
Click to hide internal directories.