Versions in this module Expand all Collapse all v0 v0.0.1 Aug 9, 2024 Changes in this version + const ChromaURLKeyEnvVarName + const DefaultDistanceFunc + const DefaultNameSpace + const DefaultNameSpaceKey + const OpenAIAPIKeyEnvVarName + const OpenAIOrgIDEnvVarName + var ErrAddDocument = errors.New("error adding document") + var ErrInvalidOptions = errors.New("invalid options") + var ErrInvalidScoreThreshold = errors.New("score threshold must be between 0 and 1") + var ErrNewClient = errors.New("error creating collection") + var ErrRemoveCollection = errors.New("error resetting collection") + var ErrUnexpectedResponseLength = errors.New("unexpected length of response") + var ErrUnsupportedOptions = errors.New("unsupported options") + type Option func(p *Store) + func WithChromaURL(chromaURL string) Option + func WithDistanceFunction(distanceFunction chromatypes.DistanceFunction) Option + func WithEmbedder(e embeddings.Embedder) Option + func WithIncludes(includes []chromatypes.QueryEnum) Option + func WithNameSpace(nameSpace string) Option + func WithOpenAIAPIKey(openAiAPIKey string) Option + func WithOpenAIOrganization(openAiOrganization string) Option + type Store struct + func New(opts ...Option) (Store, error) + func (s Store) AddDocuments(ctx context.Context, docs []schema.Document, options ...vectorstores.Option) ([]string, error) + func (s Store) RemoveCollection() error + func (s Store) SimilaritySearch(ctx context.Context, query string, numDocuments int, ...) ([]schema.Document, error)