pgvector

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package pgvector provides a MemoryStore backed by PostgreSQL with the pgvector extension. Register type: "pgvector".

Metadata keys:

dsn           — PostgreSQL DSN (required)
table         — table name, default daimon_documents
embedding_url — OpenAI-compatible endpoint for embedding generation
dimensions    — embedding dimensions, default 1536

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store uses PostgreSQL + pgvector for vector similarity search.

func New

func New(cfg memory.StoreConfig) (*Store, error)

New creates a Store and initialises the table and index.

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, id string) error

func (*Store) Query

func (s *Store) Query(ctx context.Context, query string, topK int) ([]memory.Result, error)

func (*Store) Upsert

func (s *Store) Upsert(ctx context.Context, id, content string, metadata map[string]string) (string, error)

Jump to

Keyboard shortcuts

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