Documentation ¶
Index ¶
- type Metric
- type Option
- func WithAPIKey(apiKey string) Option
- func WithDimensions(dimensions int) Option
- func WithEnvironment(environment string) Option
- func WithIndexName(indexName string) Option
- func WithMetric(metric Metric) Option
- func WithNamespace(namespace string) Option
- func WithPodType(podType string) Option
- func WithPods(pods int) Option
- type SparseValues
- 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(ctx context.Context, query []float32, k int) ([]llmcomposer.ScoredDocument, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*VectorStore)
func WithAPIKey ¶
func WithDimensions ¶
func WithEnvironment ¶
func WithIndexName ¶
func WithMetric ¶
func WithNamespace ¶
func WithPodType ¶
type SparseValues ¶
type VectorStore ¶
type VectorStore struct {
// contains filtered or unexported fields
}
func NewVectorStore ¶
func NewVectorStore(ctx context.Context, embeddings llmcomposer.Embeddings, opts ...Option) (*VectorStore, 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(ctx context.Context, query []float32, k int) ([]llmcomposer.ScoredDocument, error)
Click to show internal directories.
Click to hide internal directories.