Documentation ¶
Overview ¶
Package vectorstore provides functionality for storing and managing vector embeddings.
Index ¶
- func ToRetriever(vectorStore schema.VectorStore, ...) schema.Retriever
- type Pinecone
- type PineconeOptions
- type Weaviate
- func (vs *Weaviate) AddDocuments(ctx context.Context, docs []schema.Document) error
- func (vs *Weaviate) CreateClassIfNotExist(ctx context.Context) error
- func (vs *Weaviate) Delete(ctx context.Context, uuid string) error
- func (vs *Weaviate) SimilaritySearch(ctx context.Context, query string) ([]schema.Document, error)
- type WeaviateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToRetriever ¶
func ToRetriever(vectorStore schema.VectorStore, optFns ...func(o *retriever.VectorStoreOptions)) schema.Retriever
ToRetriever takes a vector store and returns a retriever
Types ¶
type Pinecone ¶ added in v0.0.12
type Pinecone struct {
// contains filtered or unexported fields
}
func NewPinecone ¶ added in v0.0.12
func (*Pinecone) AddDocuments ¶ added in v0.0.12
type PineconeOptions ¶ added in v0.0.12
type Weaviate ¶ added in v0.0.40
type Weaviate struct {
// contains filtered or unexported fields
}
Weaviate represents a Weaviate vector store.
func NewWeaviate ¶ added in v0.0.40
func NewWeaviate(client *weaviate.Client, embedder schema.Embedder, optFns ...func(*WeaviateOptions)) *Weaviate
NewWeaviate creates a new Weaviate vector store with the given Weaviate client, embedder, and optional configuration options.
func (*Weaviate) AddDocuments ¶ added in v0.0.40
AddDocuments adds a batch of documents to the Weaviate vector store.
func (*Weaviate) CreateClassIfNotExist ¶ added in v0.0.41
CreateClassIfNotExist checks if the Weaviate class for the vector store exists, and creates it if it doesn't.
type WeaviateOptions ¶ added in v0.0.40
type WeaviateOptions struct { // TextKey is the name of the property in the Weaviate objects where the text content is stored. TextKey string // TopK is the number of documents to retrieve in similarity search. TopK int // IndexName is the name of the index to store the vectors. IndexName string // AdditionalFields is a list of additional fields to retrieve during similarity search. AdditionalFields []string }
WeaviateOptions contains options for configuring the Weaviate vector store.
Click to show internal directories.
Click to hide internal directories.