Documentation
¶
Index ¶
Constants ¶
const ( // QustionCol the question column, which will be embedding QuestionCol = "q" // AnswerCol the answer column, will be added to qustionCol when use qachain and knowledgebase retriever AnswerCol = "a" // FileNameCol the file name column, will show in reference FileNameCol = "file_name" // PageNumberCol the page number column, will show in reference PageNumberCol = "page_number" // ChunkContentCol the chunk content column, will show in reference ChunkContentCol = "chunk_content" // LineNumber the qafile line number column, LineNumber = "line_number" // QAFileName the qafile name QAFileName = "qafile_name" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioWithWhisper ¶ added in v0.2.1
type AudioWithWhisper struct {
// contains filtered or unexported fields
}
AudioWithWhisper represents a audio using whisper document loader.
func NewAudoWithWhisper ¶ added in v0.2.1
func NewAudoWithWhisper(data []byte, fileName, language, output string, vadFilter bool) AudioWithWhisper
NewAudoWithWhisper creates a new audo loader with an io.Reader and optional column names for filtering.
func (AudioWithWhisper) CovertToText ¶ added in v0.2.1
func (aww AudioWithWhisper) CovertToText(ctx context.Context) (string, error)
input will be from the previous LLM
func (AudioWithWhisper) Load ¶ added in v0.2.1
Load reads from the io.Reader and returns a document with the data.
func (AudioWithWhisper) LoadAndSplit ¶ added in v0.2.1
func (aww AudioWithWhisper) 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.
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 PDF ¶ added in v0.2.1
type PDF struct {
// contains filtered or unexported fields
}
func (*PDF) LoadAndSplit ¶ added in v0.2.1
func (p *PDF) LoadAndSplit(ctx context.Context, splitter textsplitter.TextSplitter) ([]schema.Document, error)
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.