Versions in this module Expand all Collapse all v0 v0.6.2 Jul 2, 2025 v0.6.1 Jun 30, 2025 Changes in this version + func Retriever(g *genkit.Genkit, name string) ai.Retriever + type BaseIndex struct + func NewBaseIndex(indexName, indexType string, strategy DistanceStrategy, ...) BaseIndex + type Column struct + DataType string + Name string + Nullable bool + type Config struct + ContentColumn string + Embedder ai.Embedder + EmbedderOptions any + EmbeddingColumn string + IDColumn string + IgnoreMetadataColumns []string + MetadataColumns []string + MetadataJSONColumn string + SchemaName string + TableName string + type CosineDistance struct + func (c CosineDistance) String() string + type DistanceStrategy interface + String func() string + type DocStore struct + func DefineRetriever(ctx context.Context, g *genkit.Genkit, p *Postgres, cfg *Config) (*DocStore, ai.Retriever, error) + func (ds *DocStore) Index(ctx context.Context, docs []*ai.Document) error + func (ds *DocStore) Retrieve(ctx context.Context, req *ai.RetrieverRequest) (*ai.RetrieverResponse, error) + type Euclidean struct + func (e Euclidean) String() string + type HNSWOptions struct + EfConstruction int + M int + func (h HNSWOptions) Options() string + type IVFFlatOptions struct + Lists int + func (i IVFFlatOptions) Options() string + type Index interface + Options func() string + type InnerProduct struct + func (i InnerProduct) String() string + type IpType string + const PRIVATE + const PUBLIC + type Option func(p *engineConfig) + func WithCloudSQLInstance(projectID, region, instance string) Option + func WithDatabase(database string) Option + func WithIAMAccountEmail(email string) Option + func WithIPType(ipType IpType) Option + func WithPassword(password string) Option + func WithPool(pool *pgxpool.Pool) Option + func WithUser(user string) Option + type Postgres struct + func (p *Postgres) ApplyVectorIndex(ctx context.Context, config *Config, index BaseIndex, name string, ...) error + func (p *Postgres) DropVectorIndex(ctx context.Context, config *Config, indexName string) error + func (p *Postgres) Init(ctx context.Context, g *genkit.Genkit) error + func (p *Postgres) IsValidIndex(ctx context.Context, config *Config, indexName string) (bool, error) + func (p *Postgres) Name() string + func (p *Postgres) ReIndex(ctx context.Context, config *Config) error + func (p *Postgres) ReIndexWithName(ctx context.Context, indexName string) error + type PostgresEngine struct + Pool *pgxpool.Pool + func NewPostgresEngine(ctx context.Context, opts ...Option) (*PostgresEngine, error) + func (pgEngine *PostgresEngine) Close() + func (pgEngine *PostgresEngine) GetClient() *pgxpool.Pool + func (pgEngine *PostgresEngine) InitVectorstoreTable(ctx context.Context, opts VectorstoreTableOptions) error + type RetrieverOptions struct + DistanceStrategy DistanceStrategy + Filter any + K int + type VectorstoreTableOptions struct + ContentColumnName string + EmbeddingColumn string + IDColumn Column + MetadataColumns []Column + MetadataJSONColumn string + OverwriteExisting bool + SchemaName string + StoreMetadata bool + TableName string + VectorSize int