Documentation
¶
Index ¶
- type AllFilter
- type AnyFilter
- type ContainsFilter
- type EqualsFilter
- type Filter
- type KnowledgeBase
- func (kb *KnowledgeBase) AddDocuments(ctx context.Context, docs []schema.Document, options ...vectorstores.Option) ([]string, error)
- func (kb *KnowledgeBase) AddNamedDocuments(ctx context.Context, docs []NamedDocument, options ...vectorstores.Option) ([]string, error)
- func (kb *KnowledgeBase) SimilaritySearch(ctx context.Context, query string, numDocuments int, ...) ([]schema.Document, error)
- type NamedDocument
- type NotEqualsFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainsFilter ¶
type EqualsFilter ¶
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 (*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 NotEqualsFilter ¶
Click to show internal directories.
Click to hide internal directories.