Documentation ¶
Index ¶
- Constants
- type Store
- func (s *Store) AddDocuments(ctx context.Context, docs []vs.Document, collection string) ([]string, error)
- func (s *Store) CreateCollection(_ context.Context, name string) error
- func (s *Store) ExportCollectionsToFile(ctx context.Context, path string, collections ...string) error
- func (s *Store) ImportCollectionsFromFile(ctx context.Context, path string, collections ...string) error
- func (s *Store) RemoveCollection(_ context.Context, collection string) error
- func (s *Store) RemoveDocument(ctx context.Context, documentID string, collection string, ...) error
- func (s *Store) SimilaritySearch(ctx context.Context, query string, numDocuments int, collection string, ...) ([]vs.Document, error)
Constants ¶
View Source
const VsChromemEmbeddingParallelThread = "VS_CHROMEM_EMBEDDING_PARALLEL_THREAD"
VsChromemEmbeddingParallelThread can be set as an environment variable to control the number of parallel API calls to create embedding for documents. Default is 100
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 (*Store) CreateCollection ¶
func (*Store) ExportCollectionsToFile ¶ added in v0.1.7
func (*Store) ImportCollectionsFromFile ¶ added in v0.1.7
func (*Store) RemoveCollection ¶
func (*Store) RemoveDocument ¶
Click to show internal directories.
Click to hide internal directories.