sqlite_vec

package
v0.6.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 (v *VectorStore) AddDocuments(ctx context.Context, docs []vs.Document, collection string) ([]string, error)

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 (v *VectorStore) ExportCollectionsToFile(ctx context.Context, path string, collections ...string) error

func (*VectorStore) GetDocuments

func (v *VectorStore) GetDocuments(ctx context.Context, collection string, where map[string]string, whereDocument []cg.WhereDocument) ([]vs.Document, error)

func (*VectorStore) ImportCollectionsFromFile

func (v *VectorStore) ImportCollectionsFromFile(ctx context.Context, path string, collections ...string) error

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

func (v *VectorStore) SimilaritySearch(ctx context.Context, query string, numDocuments int, collection string, where map[string]string, whereDocument []cg.WhereDocument) ([]vs.Document, error)

Jump to

Keyboard shortcuts

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