Documentation ¶
Index ¶
- Constants
- type ChromemStore
- func (s *ChromemStore) AddDocuments(ctx context.Context, docs []vs.Document, collection string) ([]string, error)
- func (s *ChromemStore) CreateCollection(_ context.Context, name string) error
- func (s *ChromemStore) ExportCollectionsToFile(ctx context.Context, path string, collections ...string) error
- func (s *ChromemStore) GetDocuments(ctx context.Context, collection string, where map[string]string, ...) ([]vs.Document, error)
- func (s *ChromemStore) ImportCollectionsFromFile(ctx context.Context, path string, collections ...string) error
- func (s *ChromemStore) RemoveCollection(_ context.Context, collection string) error
- func (s *ChromemStore) RemoveDocument(ctx context.Context, documentID string, collection string, ...) error
- func (s *ChromemStore) 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 ChromemStore ¶ added in v0.4.11
type ChromemStore struct {
// contains filtered or unexported fields
}
func New ¶
func New(dsn string, embeddingFunc chromem.EmbeddingFunc) (*ChromemStore, error)
New creates a new Chromem vector store. Three types are supported: 1. In-memory: chromem://:memory: 2. Persistent: chromem://path/to/db-file 3. In-memory, loaded from archive: chromem://archive://path/to/archive-file
func (*ChromemStore) AddDocuments ¶ added in v0.4.11
func (*ChromemStore) CreateCollection ¶ added in v0.4.11
func (s *ChromemStore) CreateCollection(_ context.Context, name string) error
func (*ChromemStore) ExportCollectionsToFile ¶ added in v0.4.11
func (*ChromemStore) GetDocuments ¶ added in v0.4.11
func (*ChromemStore) ImportCollectionsFromFile ¶ added in v0.4.11
func (*ChromemStore) RemoveCollection ¶ added in v0.4.11
func (s *ChromemStore) RemoveCollection(_ context.Context, collection string) error
func (*ChromemStore) RemoveDocument ¶ added in v0.4.11
Click to show internal directories.
Click to hide internal directories.