flows

package
v0.4.14 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IngestionFlow

type IngestionFlow struct {
	Globals         IngestionFlowGlobals
	Filetypes       []string
	Load            documentloader.LoaderFunc
	Splitter        dstypes.TextSplitter
	Transformations []dstypes.DocumentTransformer
}

func NewDefaultIngestionFlow

func NewDefaultIngestionFlow(filetype string, textsplitterOpts *textsplitter.TextSplitterOpts) (IngestionFlow, error)

func (*IngestionFlow) FillDefaults

func (f *IngestionFlow) FillDefaults(filetype string, textsplitterOpts *textsplitter.TextSplitterOpts) error

func (*IngestionFlow) Run

func (f *IngestionFlow) Run(ctx context.Context, reader io.Reader) ([]vs.Document, error)

func (*IngestionFlow) SupportsFiletype

func (f *IngestionFlow) SupportsFiletype(filetype string) bool

func (*IngestionFlow) Transform

func (f *IngestionFlow) Transform(ctx context.Context, docs []vs.Document) ([]vs.Document, error)

type IngestionFlowGlobals added in v0.4.8

type IngestionFlowGlobals struct {
	SplitterOpts map[string]any
}

type RetrievalFlow

type RetrievalFlow struct {
	QueryModifiers []querymodifiers.QueryModifier
	Retriever      retrievers.Retriever
	Postprocessors []postprocessors.Postprocessor
}

func (*RetrievalFlow) FillDefaults

func (f *RetrievalFlow) FillDefaults(topK int)

func (*RetrievalFlow) Run

func (f *RetrievalFlow) Run(ctx context.Context, store store.Store, query string, datasetIDs []string, opts *RetrievalFlowOpts) (*dstypes.RetrievalResponse, error)

type RetrievalFlowOpts added in v0.4.7

type RetrievalFlowOpts struct {
	Where         map[string]string
	WhereDocument []chromem.WhereDocument
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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