Documentation ¶
Index ¶
- func Migrate(db *gorm.DB) error
- type Index
- type PgVectorClient
- func (p *PgVectorClient) Get(ctx context.Context, oid int64, name string, group int) (*vector.Element, error)
- func (p *PgVectorClient) Search(ctx context.Context, query vector.VectorDocQuery, vectors []float32, k int) ([]*vector.Doc, error)
- func (p *PgVectorClient) Store(ctx context.Context, element *vector.Element, extra map[string]any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Index ¶
type Index struct { ID string `gorm:"column:id;primaryKey"` Name string `gorm:"column:name;type:varchar(256);index:index_name"` OID int64 `gorm:"column:oid;index:index_oid"` Group int `gorm:"column:idx_group;index:index_group"` ParentID int64 `gorm:"column:parent_entry_id;index:index_parent_id"` Content string `gorm:"column:content"` Vector string `gorm:"column:vector;type:vector(1536)"` Extra string `gorm:"column:metadata"` CreatedAt int64 `gorm:"column:created_at"` ChangedAt int64 `gorm:"column:changed_at"` }
type PgVectorClient ¶
type PgVectorClient struct {
// contains filtered or unexported fields
}
func NewPgVectorClient ¶
func NewPgVectorClient(log logger.Logger, postgresUrl string) (*PgVectorClient, error)
Click to show internal directories.
Click to hide internal directories.