Documentation ¶
Index ¶
- type VectorStore
- func (v *VectorStore) AddDocuments(ctx context.Context, docs []vs.Document, collection string) ([]string, error)
- func (v *VectorStore) Close() error
- func (v *VectorStore) CreateCollection(ctx context.Context, collection string) error
- func (v *VectorStore) ExportCollectionsToFile(ctx context.Context, path string, collections ...string) error
- func (v *VectorStore) GetDocuments(ctx context.Context, collection string, where map[string]string, ...) ([]vs.Document, error)
- func (v *VectorStore) ImportCollectionsFromFile(ctx context.Context, path string, collections ...string) error
- func (v *VectorStore) RemoveCollection(ctx context.Context, collection string) error
- func (v *VectorStore) RemoveDocument(ctx context.Context, documentID string, collection string, ...) error
- func (v *VectorStore) SimilaritySearch(ctx context.Context, query string, numDocuments int, collection string, ...) ([]vs.Document, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VectorStore ¶
type VectorStore struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, dsn string, embeddingFunc cg.EmbeddingFunc) (*VectorStore, error)
func (*VectorStore) AddDocuments ¶
func (*VectorStore) Close ¶
func (v *VectorStore) Close() error
func (*VectorStore) CreateCollection ¶
func (v *VectorStore) CreateCollection(ctx context.Context, collection string) error
func (*VectorStore) ExportCollectionsToFile ¶
func (*VectorStore) GetDocuments ¶
func (*VectorStore) ImportCollectionsFromFile ¶
func (*VectorStore) RemoveCollection ¶
func (v *VectorStore) RemoveCollection(ctx context.Context, collection string) error
func (*VectorStore) RemoveDocument ¶
func (v *VectorStore) RemoveDocument(ctx context.Context, documentID string, collection string, where map[string]string, whereDocument []cg.WhereDocument) error
func (*VectorStore) SimilaritySearch ¶
Click to show internal directories.
Click to hide internal directories.