Documentation
¶
Index ¶
- Variables
- func AddDocuments(ctx context.Context, log logr.Logger, vs *arcadiav1alpha1.VectorStore, ...) (err error)
- func NewVectorStore(ctx context.Context, vs *arcadiav1alpha1.VectorStore, ...) (v vectorstores.VectorStore, finish func(), err error)
- func RemoveCollection(ctx context.Context, log logr.Logger, vs *arcadiav1alpha1.VectorStore, ...) (err error)
- type PGVectorStore
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnsupportedVectorStoreType = errors.New("unsupported vectorstore type")
)
Functions ¶
func AddDocuments ¶
func AddDocuments(ctx context.Context, log logr.Logger, vs *arcadiav1alpha1.VectorStore, embedder embeddings.Embedder, collectionName string, c client.Client, documents []lanchaingoschema.Document) (err error)
func NewVectorStore ¶
func NewVectorStore(ctx context.Context, vs *arcadiav1alpha1.VectorStore, embedder embeddings.Embedder, collectionName string, c client.Client) (v vectorstores.VectorStore, finish func(), err error)
func RemoveCollection ¶
func RemoveCollection(ctx context.Context, log logr.Logger, vs *arcadiav1alpha1.VectorStore, collectionName string, c client.Client) (err error)
Types ¶
type PGVectorStore ¶
type PGVectorStore struct { *pgx.Conn pgvector.Store *arcadiav1alpha1.PGVector }
func NewPGVectorStore ¶
func NewPGVectorStore(ctx context.Context, vs *arcadiav1alpha1.VectorStore, c client.Client, embedder embeddings.Embedder, collectionName string) (v *PGVectorStore, finish func(), err error)
func (*PGVectorStore) RemoveExist ¶
func (s *PGVectorStore) RemoveExist(ctx context.Context, log logr.Logger, document []lanchaingoschema.Document) (doc []lanchaingoschema.Document, err error)
RemoveExist remove exist document from pgvector Note: it is currently assumed that the embedder of a knowledge base is constant that means the result of embedding a fixed document is fixed, disregarding the case where the embedder changes (and if it does, a lot of processing will need to be done in many places, not just here)
Click to show internal directories.
Click to hide internal directories.