Documentation ¶
Index ¶
- Constants
- type Option
- type VectorStore
- func (s *VectorStore) AddDocuments(ctx context.Context, documents ...llmcomposer.Document) error
- func (s *VectorStore) SimilaritySearch(ctx context.Context, query string, k int) ([]llmcomposer.Document, error)
- func (s *VectorStore) SimilaritySearchVectorWithScore(_ context.Context, query []float32, k int) ([]llmcomposer.ScoredDocument, error)
Constants ¶
View Source
const ( DefaultPath = "vector_store.db" DefaultBucket = "embeddings" DefaultPermission = 0600 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*VectorStore)
func WithBucket ¶
func WithPermission ¶
func WithTimeout ¶
type VectorStore ¶
type VectorStore struct {
// contains filtered or unexported fields
}
func NewVectorStore ¶
func NewVectorStore(embeddings llmcomposer.Embeddings, opts ...Option) (*VectorStore, func(), error)
func (*VectorStore) AddDocuments ¶
func (s *VectorStore) AddDocuments(ctx context.Context, documents ...llmcomposer.Document) error
func (*VectorStore) SimilaritySearch ¶
func (s *VectorStore) SimilaritySearch(ctx context.Context, query string, k int) ([]llmcomposer.Document, error)
func (*VectorStore) SimilaritySearchVectorWithScore ¶
func (s *VectorStore) SimilaritySearchVectorWithScore(_ context.Context, query []float32, k int) ([]llmcomposer.ScoredDocument, error)
Click to show internal directories.
Click to hide internal directories.