Documentation ¶
Index ¶
Constants ¶
View Source
const ( QuestionCol = "q" AnswerCol = "a" FileNameCol = "file_name" PageNumberCol = "page_number" ChunkContentCol = "chunk_content" LineNumber = "line_number" QAFileName = "qafile_name" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v0.2.0
type Option func(p *QACSV)
Option is a function type that can be used to modify the client.
func WithAnswerColumn ¶ added in v0.2.0
func WithChunkContentColumn ¶ added in v0.2.0
func WithFileNameColumn ¶ added in v0.2.0
func WithPageNumberColumn ¶ added in v0.2.0
func WithQuestionColumn ¶ added in v0.2.0
type QACSV ¶
type QACSV struct {
// contains filtered or unexported fields
}
QACSV represents a QA CSV document loader.
func NewQACSV ¶
NewQACSV creates a new qa csv loader with an io.Reader and optional column names for filtering.
func (QACSV) LoadAndSplit ¶
func (c QACSV) LoadAndSplit(ctx context.Context, splitter textsplitter.TextSplitter) ([]schema.Document, error)
LoadAndSplit reads text data from the io.Reader and splits it into multiple documents using a text splitter.
Click to show internal directories.
Click to hide internal directories.