Documentation ¶
Index ¶
- Constants
- type Options
- type VectorStore
- func (s *VectorStore) AddDocuments(ctx context.Context, documents ...flowllm.Document) error
- func (s *VectorStore) SimilaritySearch(ctx context.Context, query string, k int) ([]flowllm.Document, error)
- func (s *VectorStore) SimilaritySearchVectorWithScore(_ context.Context, query []float32, k int) ([]flowllm.ScoredDocument, error)
Constants ¶
View Source
const ( DefaultPath = "vector_store.db" DefaultBucket = "embeddings" DefaultPermission = 0600 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VectorStore ¶
type VectorStore struct {
// contains filtered or unexported fields
}
VectorStore is a vector store backed by BoltDB. It implements the flowllm.VectorStore interface, and it is ideal for small to medium-sized collections of vectors.
func NewVectorStore ¶
func NewVectorStore(embeddings flowllm.Embeddings, opts Options) (*VectorStore, func(), error)
NewVectorStore creates a new Bolt vector store.
func (*VectorStore) AddDocuments ¶
func (*VectorStore) SimilaritySearch ¶
func (*VectorStore) SimilaritySearchVectorWithScore ¶
func (s *VectorStore) SimilaritySearchVectorWithScore(_ context.Context, query []float32, k int) ([]flowllm.ScoredDocument, error)
Click to show internal directories.
Click to hide internal directories.