Versions in this module Expand all Collapse all v0 v0.2.0 Jul 14, 2026 Changes in this version + type Backend string + const BackendChroma + const BackendHNSW + const BackendMemory + const BackendPgVector + const BackendQdrant + const BackendSQLite + type ChromaConfig struct + APIKey string + BaseURL string + Database string + Tenant string + type ChromaStore struct + func NewChromaStore(cfg ChromaConfig) *ChromaStore + func (s *ChromaStore) DeleteKeys(ctx context.Context, namespace string, keys []string) error + func (s *ChromaStore) DeleteNamespace(ctx context.Context, namespace string) error + func (s *ChromaStore) Get(ctx context.Context, namespace string, keys []string) ([]Record, error) + func (s *ChromaStore) HasNamespace(ctx context.Context, namespace string) (bool, error) + func (s *ChromaStore) Search(ctx context.Context, query Query) ([]SearchResult, error) + func (s *ChromaStore) Upsert(ctx context.Context, records []Record) error + type Config struct + Backend Backend + ChromaAPIKey string + ChromaDatabase string + ChromaTenant string + ChromaURL string + DB *dbpkg.DB + Dim int + HNSWDir string + PgVectorCreateExtension *bool + PgVectorHNSWEfConstruction int + PgVectorHNSWM int + PgVectorIVFFlatLists int + PgVectorIndexMethod string + QdrantAPIKey string + QdrantHost string + QdrantPort int + QdrantPrefix string + type HNSWStore struct — darwin/amd64, js/wasm, linux/amd64 + func NewHNSWStore(dir string) (*HNSWStore, error) + func (s *HNSWStore) Close() error + func (s *HNSWStore) DeleteKeys(ctx context.Context, namespace string, keys []string) error + func (s *HNSWStore) DeleteNamespace(ctx context.Context, namespace string) error + func (s *HNSWStore) Get(ctx context.Context, namespace string, keys []string) ([]Record, error) + func (s *HNSWStore) HasNamespace(ctx context.Context, namespace string) (bool, error) + func (s *HNSWStore) Search(ctx context.Context, query Query) ([]SearchResult, error) + func (s *HNSWStore) Upsert(ctx context.Context, records []Record) error + type MemoryStore struct + func NewMemoryStore() *MemoryStore + func (s *MemoryStore) DeleteKeys(_ context.Context, namespace string, keys []string) error + func (s *MemoryStore) DeleteNamespace(_ context.Context, namespace string) error + func (s *MemoryStore) Get(_ context.Context, namespace string, keys []string) ([]Record, error) + func (s *MemoryStore) HasNamespace(_ context.Context, namespace string) (bool, error) + func (s *MemoryStore) Search(_ context.Context, query Query) ([]SearchResult, error) + func (s *MemoryStore) Upsert(_ context.Context, records []Record) error + type PgVectorOptions struct + CreateExtension bool + Dim int + HNSWEfConstruction int + HNSWM int + IVFFlatLists int + IndexMethod string + type PgVectorStore struct + func NewPgVectorStore(ctx context.Context, database *dbpkg.DB, options PgVectorOptions) (*PgVectorStore, error) + func (s *PgVectorStore) DeleteKeys(ctx context.Context, namespace string, keys []string) error + func (s *PgVectorStore) DeleteNamespace(ctx context.Context, namespace string) error + func (s *PgVectorStore) Get(ctx context.Context, namespace string, keys []string) ([]Record, error) + func (s *PgVectorStore) HasNamespace(ctx context.Context, namespace string) (bool, error) + func (s *PgVectorStore) Search(ctx context.Context, query Query) ([]SearchResult, error) + func (s *PgVectorStore) Upsert(ctx context.Context, records []Record) error + type QdrantConfig struct + APIKey string + CollPrefix string + DefaultDim int + Host string + Port int + type QdrantStore struct + func NewQdrantStore(_ context.Context, cfg QdrantConfig) (*QdrantStore, error) + func (s *QdrantStore) Close() error + func (s *QdrantStore) DeleteKeys(ctx context.Context, namespace string, keys []string) error + func (s *QdrantStore) DeleteNamespace(ctx context.Context, namespace string) error + func (s *QdrantStore) Get(ctx context.Context, namespace string, keys []string) ([]Record, error) + func (s *QdrantStore) HasNamespace(ctx context.Context, namespace string) (bool, error) + func (s *QdrantStore) Search(ctx context.Context, query Query) ([]SearchResult, error) + func (s *QdrantStore) Upsert(ctx context.Context, records []Record) error + type Query struct + Filter map[string]any + HybridWeight float32 + Namespace string + QueryText string + TopK int + Vector []float32 + type Record struct + Key string + Metadata map[string]string + Namespace string + Text string + Vector []float32 + type SQLiteStore struct + func NewSQLiteStore(database *dbpkg.DB) (*SQLiteStore, error) + func OpenSQLiteStore(path string) (*SQLiteStore, error) + func (s *SQLiteStore) Close() error + func (s *SQLiteStore) CountNamespace(ctx context.Context, namespace string) (int, error) + func (s *SQLiteStore) DeleteKeys(ctx context.Context, namespace string, keys []string) error + func (s *SQLiteStore) DeleteNamespace(ctx context.Context, namespace string) error + func (s *SQLiteStore) Get(ctx context.Context, namespace string, keys []string) ([]Record, error) + func (s *SQLiteStore) HasNamespace(ctx context.Context, namespace string) (bool, error) + func (s *SQLiteStore) Search(ctx context.Context, query Query) ([]SearchResult, error) + func (s *SQLiteStore) Upsert(ctx context.Context, records []Record) error + type SearchResult struct + Record Record + Score float32 + type Store interface + DeleteKeys func(ctx context.Context, namespace string, keys []string) error + DeleteNamespace func(ctx context.Context, namespace string) error + Get func(ctx context.Context, namespace string, keys []string) ([]Record, error) + HasNamespace func(ctx context.Context, namespace string) (bool, error) + Search func(ctx context.Context, query Query) ([]SearchResult, error) + Upsert func(ctx context.Context, records []Record) error + func NewHNSWStore(dir string) (Store, error) + func NewStore(ctx context.Context, cfg Config) (Store, error)