db

package
v0.0.0-...-389fe15 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LibSQL

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

func NewLibSQL

func NewLibSQL(ctx context.Context, dbPath string) (*LibSQL, error)

func (*LibSQL) Close

func (l *LibSQL) Close() error

func (*LibSQL) CreateEmbeddingsTable

func (l *LibSQL) CreateEmbeddingsTable(ctx context.Context, db *sql.DB) error

func (*LibSQL) DoesEmbeddingExist

func (l *LibSQL) DoesEmbeddingExist(ctx context.Context, text string) (bool, error)

func (*LibSQL) FindSimilar

func (l *LibSQL) FindSimilar(ctx context.Context, queryEmbedding []float32, limit int) ([]string, error)

func (*LibSQL) StoreEmbedding

func (l *LibSQL) StoreEmbedding(ctx context.Context, text string, embedding []float32, category string) error

Jump to

Keyboard shortcuts

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