Documentation
¶
Index ¶
- type PGVector
- func (pv *PGVector) Clear(ctx context.Context) error
- func (pv *PGVector) Delete(ctx context.Context, postIDs []string) error
- func (pv *PGVector) Search(ctx context.Context, embedding []float32, opts embeddings.SearchOptions) ([]embeddings.SearchResult, error)
- func (pv *PGVector) Store(ctx context.Context, docs []embeddings.PostDocument, embeddings [][]float32) error
- type PGVectorConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PGVector ¶
type PGVector struct {
// contains filtered or unexported fields
}
func NewPGVector ¶
func NewPGVector(db *sqlx.DB, config PGVectorConfig) (*PGVector, error)
func (*PGVector) Search ¶
func (pv *PGVector) Search(ctx context.Context, embedding []float32, opts embeddings.SearchOptions) ([]embeddings.SearchResult, error)
func (*PGVector) Store ¶
func (pv *PGVector) Store(ctx context.Context, docs []embeddings.PostDocument, embeddings [][]float32) error
type PGVectorConfig ¶
type PGVectorConfig struct {
Dimensions int `json:"dimensions"`
}
Click to show internal directories.
Click to hide internal directories.