pgvector

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PGVectorOption

type PGVectorOption func(s *PGVectorStorage)

func WithDatabaseName

func WithDatabaseName(databaseName string) PGVectorOption

func WithDatabasePrefix

func WithDatabasePrefix(databasePrefix string) PGVectorOption

func WithDatabaseSchema

func WithDatabaseSchema(databaseSchema string) PGVectorOption

func WithEmbeddingVectorDimensions

func WithEmbeddingVectorDimensions(dimensions uint32) PGVectorOption

func WithPartitionsEnabled

func WithPartitionsEnabled(enabled bool) PGVectorOption

type PGVectorStorage

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

func NewPGVectorStorage

func NewPGVectorStorage(db *sql.DB, options ...PGVectorOption) PGVectorStorage

func (*PGVectorStorage) DeleteFile

func (s *PGVectorStorage) DeleteFile(ctx context.Context, source storage.SourceUUID, file storage.FileUUID) error

func (*PGVectorStorage) DeleteSource

func (s *PGVectorStorage) DeleteSource(ctx context.Context, sourceUUID storage.SourceUUID) error

func (*PGVectorStorage) FinishFileProcessing

func (s *PGVectorStorage) FinishFileProcessing(ctx context.Context, source storage.SourceUUID, file storage.FileUUID, parsed bool, parseError string, parsePartsErrors []string) error

func (*PGVectorStorage) GetOrCreateFile

func (s *PGVectorStorage) GetOrCreateFile(ctx context.Context, sourceUUID storage.SourceUUID, path string, eTag string, processorVersion storage.ProcessorVersion) (*storage.File, bool, error)

func (*PGVectorStorage) GetOrCreateSource

func (s *PGVectorStorage) GetOrCreateSource(ctx context.Context, sourceUUID storage.SourceUUID) (*storage.DataSource, error)

func (*PGVectorStorage) Install

func (s *PGVectorStorage) Install(ctx context.Context) error

Make sure that all the tables are created inside PGVector and its ready to work. You can run this safelly several times.

func (*PGVectorStorage) PutEmbedding

func (s *PGVectorStorage) PutEmbedding(ctx context.Context, source storage.SourceUUID, file storage.FileUUID, chunk string, embeddingVector []float32) error

func (*PGVectorStorage) SearchSimilarEmbedddings

func (s *PGVectorStorage) SearchSimilarEmbedddings(ctx context.Context, embeddingVector []float32, sources []storage.SourceUUID, limit uint32) ([]storage.Embedding, error)

func (*PGVectorStorage) UnInstall

func (s *PGVectorStorage) UnInstall(ctx context.Context) error

Completelly removes itselve from the database

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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