Documentation
¶
Index ¶
- Variables
- type Embedder
- type Option
- type Pinecone
- func (p *Pinecone) IsEmpty(ctx context.Context) (bool, error)
- func (p *Pinecone) LoadFromDocuments(ctx context.Context, documents []document.Document) error
- func (p *Pinecone) SimilaritySearch(ctx context.Context, query string, opts ...Option) (SearchResponses, error)
- func (p *Pinecone) WithAPIKeyAndEnvironment(apiKey, environment string) *Pinecone
- type PineconeCreateIndexOptions
- type PineconeOptions
- type Qdrant
- func (p *Qdrant) IsEmpty(ctx context.Context) (bool, error)
- func (q *Qdrant) LoadFromDocuments(ctx context.Context, documents []document.Document) error
- func (q *Qdrant) SimilaritySearch(ctx context.Context, query string, opts ...Option) (SearchResponses, error)
- func (q *Qdrant) WithAPIKeyAndEdpoint(apiKey, endpoint string) *Qdrant
- type QdrantCreateCollectionOptions
- type QdrantDistance
- type QdrantOptions
- type SearchResponse
- type SearchResponses
- type SimpleVectorIndex
- type SimpleVectorIndexFilterFn
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInternal = "internal index error"
)
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v0.0.5
type Option func(*options)
func WithFilter ¶ added in v0.0.9
func WithFilter(filter interface{}) Option
type Pinecone ¶
type Pinecone struct {
// contains filtered or unexported fields
}
func NewPinecone ¶
func NewPinecone(options PineconeOptions, embedder Embedder) *Pinecone
func (*Pinecone) LoadFromDocuments ¶
func (*Pinecone) SimilaritySearch ¶
func (*Pinecone) WithAPIKeyAndEnvironment ¶ added in v0.0.5
type PineconeCreateIndexOptions ¶ added in v0.0.5
type PineconeOptions ¶ added in v0.0.4
type PineconeOptions struct { IndexName string Namespace string IncludeContent bool BatchUpsertSize *int CreateIndex *PineconeCreateIndexOptions }
type Qdrant ¶ added in v0.0.8
type Qdrant struct {
// contains filtered or unexported fields
}
func NewQdrant ¶ added in v0.0.8
func NewQdrant(options QdrantOptions, embedder Embedder) *Qdrant
func (*Qdrant) LoadFromDocuments ¶ added in v0.0.8
func (*Qdrant) SimilaritySearch ¶ added in v0.0.8
func (*Qdrant) WithAPIKeyAndEdpoint ¶ added in v0.0.8
type QdrantCreateCollectionOptions ¶ added in v0.0.8
type QdrantCreateCollectionOptions struct { Dimension uint64 Distance QdrantDistance OnDisk bool }
type QdrantDistance ¶ added in v0.0.8
type QdrantDistance string
const ( QdrantDistanceCosine QdrantDistance = QdrantDistance(qdrantrequest.DistanceCosine) QdrantDistanceEuclidean QdrantDistance = QdrantDistance(qdrantrequest.DistanceEuclidean) QdrantDistanceDot QdrantDistance = QdrantDistance(qdrantrequest.DistanceDot) )
type QdrantOptions ¶ added in v0.0.8
type QdrantOptions struct { CollectionName string IncludeContent bool BatchUpsertSize *int CreateCollection *QdrantCreateCollectionOptions }
type SearchResponse ¶
type SearchResponses ¶ added in v0.0.5
type SearchResponses []SearchResponse
func (SearchResponses) ToDocuments ¶ added in v0.0.5
func (s SearchResponses) ToDocuments() []document.Document
type SimpleVectorIndex ¶
type SimpleVectorIndex struct {
// contains filtered or unexported fields
}
func NewSimpleVectorIndex ¶
func NewSimpleVectorIndex(name string, outputPath string, embedder Embedder) *SimpleVectorIndex
func (*SimpleVectorIndex) IsEmpty ¶ added in v0.0.5
func (s *SimpleVectorIndex) IsEmpty() (bool, error)
func (*SimpleVectorIndex) LoadFromDocuments ¶
func (*SimpleVectorIndex) SimilaritySearch ¶
func (s *SimpleVectorIndex) SimilaritySearch(ctx context.Context, query string, opts ...Option) (SearchResponses, error)
type SimpleVectorIndexFilterFn ¶ added in v0.0.9
type SimpleVectorIndexFilterFn func([]SearchResponse) []SearchResponse
Click to show internal directories.
Click to hide internal directories.