pgvector

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: MIT Imports: 7 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 New

func New(connStr string, dimension int, className string, embedder ragkit.Embedder) *PGVector

func (*PGVector) Close added in v0.3.2

func (p *PGVector) Close() error

func (*PGVector) Delete

func (p *PGVector) Delete(ctx context.Context, id string) error

func (*PGVector) Exists

func (p *PGVector) Exists(ctx context.Context, id string) (bool, error)

func (*PGVector) Index

func (p *PGVector) Index(ctx context.Context, docs ...ragkit.Document) ([]string, error)

func (*PGVector) Retrieve

func (p *PGVector) Retrieve(ctx context.Context, query []float32, topK int, metadataFieldNames ...string) ([]ragkit.RetrievedDoc, error)

func (*PGVector) RetrieveText

func (p *PGVector) RetrieveText(ctx context.Context, text string, topK int, metadataFieldNames ...string) ([]ragkit.RetrievedDoc, error)

func (*PGVector) String

func (p *PGVector) String() string

Jump to

Keyboard shortcuts

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