bedrockknowledgebases

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllFilter

type AllFilter struct {
	Filters []Filter
}

type AnyFilter

type AnyFilter struct {
	Filters []Filter
}

type ContainsFilter

type ContainsFilter struct {
	Key   string
	Value string
}

type EqualsFilter

type EqualsFilter struct {
	Key   string
	Value string
}

type Filter

type Filter interface {
	// contains filtered or unexported methods
}

Filter is the common interface for representing filters applied during document retrieval from a Bedrock knowledge base.

Filters can be combined using logical operators: AllFilter (AND semantics) and AnyFilter (OR semantics). This allows the construction of complex, nested filter conditions.

The interface is sealed by the unexported isFilter method to prevent external implementations, ensuring forward compatibility.

type KnowledgeBase

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

func New

func New(ctx context.Context, knowledgeBaseID string) (*KnowledgeBase, error)

func (*KnowledgeBase) AddDocuments

func (kb *KnowledgeBase) AddDocuments(ctx context.Context, docs []schema.Document, options ...vectorstores.Option) ([]string, error)

func (*KnowledgeBase) AddNamedDocuments

func (kb *KnowledgeBase) AddNamedDocuments(ctx context.Context, docs []NamedDocument, options ...vectorstores.Option) ([]string, error)

func (*KnowledgeBase) SimilaritySearch

func (kb *KnowledgeBase) SimilaritySearch(ctx context.Context, query string, numDocuments int, options ...vectorstores.Option) (
	[]schema.Document, error,
)

type NamedDocument

type NamedDocument struct {
	Name     string
	Document schema.Document
}

type NotEqualsFilter

type NotEqualsFilter struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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