sqlitevec

package
v0.0.0-...-72464e7 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	// contains filtered or unexported fields
}

func NewIndex

func NewIndex(conn *sqlite3.Conn, llm llm.Client, model string, maxWords int) *Index

func (*Index) All

func (i *Index) All(ctx context.Context, yield func(model.SectionID) bool) error

All implements port.Index.

func (*Index) DeleteByID

func (i *Index) DeleteByID(ctx context.Context, ids ...model.SectionID) error

DeleteByID implements port.Index.

func (*Index) DeleteBySource

func (i *Index) DeleteBySource(ctx context.Context, source *url.URL) error

DeleteBySource implements port.Index.

func (*Index) GenerateSnapshot

func (i *Index) GenerateSnapshot(ctx context.Context) (io.ReadCloser, error)

GenerateSnapshot implements snapshot.Snapshotable.

func (*Index) Index

func (i *Index) Index(ctx context.Context, document model.Document, funcs ...port.IndexOptionFunc) error

Index implements port.Index.

func (*Index) RestoreSnapshot

func (i *Index) RestoreSnapshot(ctx context.Context, r io.Reader) error

RestoreSnapshot implements snapshot.Snapshotable.

func (*Index) Search

func (i *Index) Search(ctx context.Context, query string, opts port.IndexSearchOptions) ([]*port.IndexSearchResult, error)

Search implements port.Index.

type SnapshottedMetadata

type SnapshottedMetadata struct {
	Model string
}

type SnapshottedRecord

type SnapshottedRecord struct {
	Source      string
	SectionID   string
	Embeddings  []byte
	Collections []string
}

Jump to

Keyboard shortcuts

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