postgres

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PGVector

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

func NewPGVector

func NewPGVector(db *sqlx.DB, config PGVectorConfig) (*PGVector, error)

func (*PGVector) Clear

func (pv *PGVector) Clear(ctx context.Context) error

func (*PGVector) Delete

func (pv *PGVector) Delete(ctx context.Context, postIDs []string) error

func (*PGVector) Search

func (pv *PGVector) Search(ctx context.Context, embedding []float32, opts embeddings.SearchOptions) ([]embeddings.SearchResult, error)

func (*PGVector) Store

func (pv *PGVector) Store(ctx context.Context, docs []embeddings.PostDocument, embeddings [][]float32) error

type PGVectorConfig

type PGVectorConfig struct {
	Dimensions int `json:"dimensions"`
}

Jump to

Keyboard shortcuts

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