qapipeline

package
v0.0.12-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index added in v0.0.11

type Index interface {
	Query(context.Context, string, ...indexoption.Option) (index.SearchResults, error)
}

type Mode added in v0.0.11

type Mode string
const (
	ModeSimple Mode = "simple"
	ModeRefine Mode = "refine"
)

type QAPipeline

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

func New

func New(llmEngine pipeline.LlmEngine) *QAPipeline

func (*QAPipeline) Query added in v0.0.11

func (q *QAPipeline) Query(ctx context.Context, query string, opts ...indexoption.Option) (types.M, error)

func (*QAPipeline) Run

func (q *QAPipeline) Run(ctx context.Context, query string, documents []document.Document) (types.M, error)

func (*QAPipeline) WithIndex added in v0.0.11

func (q *QAPipeline) WithIndex(index Index) *QAPipeline

func (*QAPipeline) WithMode added in v0.0.11

func (q *QAPipeline) WithMode(mode Mode) *QAPipeline

func (*QAPipeline) WithPrompt

func (q *QAPipeline) WithPrompt(chat *chat.Chat) *QAPipeline

Jump to

Keyboard shortcuts

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