retriever

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSKendra added in v0.0.10

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

func NewAWSKendra added in v0.0.10

func NewAWSKendra(client KendraClient, index string, optFns ...func(o *AWSKendraOptions)) *AWSKendra

func (*AWSKendra) GetRelevantDocuments added in v0.0.10

func (r *AWSKendra) GetRelevantDocuments(ctx context.Context, query string) ([]schema.Document, error)

type AWSKendraOptions

type AWSKendraOptions struct {
	// Number of documents to query for
	K int

	// Languagecode used for querying.
	LanguageCode string
}

type KendraClient added in v0.0.6

type KendraClient interface {
	Query(ctx context.Context, params *kendra.QueryInput, optFns ...func(*kendra.Options)) (*kendra.QueryOutput, error)
}

type VectorStore added in v0.0.10

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

func NewVectorStore added in v0.0.10

func NewVectorStore(vectorStore schema.VectorStore, optFns ...func(o *VectorStoreOptions)) *VectorStore

func (*VectorStore) GetRelevantDocuments added in v0.0.10

func (r *VectorStore) GetRelevantDocuments(ctx context.Context, query string) ([]schema.Document, error)

GetRelevantDocuments returns documents using the vector store.

type VectorStoreOptions added in v0.0.10

type VectorStoreOptions struct {
	SearchType VectorStoreSearchType
}

type VectorStoreSearchType added in v0.0.10

type VectorStoreSearchType string
const (
	VectorStoreSearchTypeSimilarity VectorStoreSearchType = "similarity"
)

Jump to

Keyboard shortcuts

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