retrievers

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicRetriever

type BasicRetriever struct {
	TopK int
}

func (*BasicRetriever) Retrieve

func (r *BasicRetriever) Retrieve(ctx context.Context, store store.Store, query string, datasetID string) ([]vs.Document, error)

type Retriever

type Retriever interface {
	Retrieve(ctx context.Context, store store.Store, query string, datasetID string) ([]vs.Document, error)
}

func GetDefaultRetriever

func GetDefaultRetriever() Retriever

func GetRetriever

func GetRetriever(name string) (Retriever, error)

type RoutingRetriever added in v0.1.8

type RoutingRetriever struct {
	Model             llm.LLMConfig
	AvailableDatasets []string
	TopK              int
}

func (*RoutingRetriever) Retrieve added in v0.1.8

func (r *RoutingRetriever) Retrieve(ctx context.Context, store store.Store, query string, datasetID string) ([]vs.Document, error)

type SubqueryRetriever added in v0.1.8

type SubqueryRetriever struct {
	Model llm.LLMConfig
	Limit int
	TopK  int
}

func (SubqueryRetriever) Retrieve added in v0.1.8

func (s SubqueryRetriever) Retrieve(ctx context.Context, store store.Store, query string, datasetID string) ([]vs.Document, error)

Jump to

Keyboard shortcuts

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