Documentation
¶
Overview ¶
Package sqlitevec provides a SQLite-backed vector driver using sqlite-vec.
Index ¶
- type Config
- type Driver
- func (d *Driver) Add(ctx context.Context, docs []vector.Document) error
- func (d *Driver) Close() error
- func (d *Driver) Delete(ctx context.Context, ids []string) error
- func (d *Driver) Get(ctx context.Context, ids []string) ([]vector.Document, error)
- func (d *Driver) Query(ctx context.Context, embedding []float32, topK int) ([]vector.QueryResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// DBPath is the path to the SQLite database file.
// Use ":memory:" for an in-memory database.
DBPath string
// Dimensions is the number of dimensions for the embedding vectors.
// Defaults to DefaultDimensions if zero.
Dimensions uint
}
Config holds configuration for the SQLite vec driver.
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements vector.Driver using SQLite with sqlite-vec.
func (*Driver) Add ¶
Add stores documents with their embeddings. If a document with the same ID already exists, it is updated.
Click to show internal directories.
Click to hide internal directories.