chromem

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func New

func New(db *chromem.DB, embeddingFunc chromem.EmbeddingFunc) *Store

New creates a new Chromem vector store.

func (*Store) AddDocuments

func (s *Store) AddDocuments(ctx context.Context, docs []vs.Document, collection string) ([]string, error)

func (*Store) CreateCollection

func (s *Store) CreateCollection(_ context.Context, name string) error

func (*Store) RemoveCollection

func (s *Store) RemoveCollection(_ context.Context, collection string) error

func (*Store) RemoveDocument

func (s *Store) RemoveDocument(ctx context.Context, documentID string, collection string) error

func (*Store) SimilaritySearch

func (s *Store) SimilaritySearch(ctx context.Context, query string, numDocuments int, collection string) ([]vs.Document, error)

Jump to

Keyboard shortcuts

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