csvloader

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

Loader implements the llm.Loader interface for CSV.

func New

func New(r io.Reader, columns ...string) Loader

New creates a new CSV loader with an io.Reader and optional column names for filtering.

func (Loader) Load

func (c Loader) Load(_ context.Context) ([]llm.Document, error)

Load reads from the io.Reader and returns a single document with the data.

func (Loader) LoadAndSplit

func (c Loader) LoadAndSplit(ctx context.Context, splitter llm.TextSplitter) ([]llm.Document, error)

LoadAndSplit reads text data from the io.Reader and splits it into multiple documents using a text splitter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL