Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EmbeddingQualificationThreshold defines the minimum acceptable ratio of // successful embeddings to inputs. EmbeddingQualificationThreshold = 0.8 )
Variables ¶
This section is empty.
Functions ¶
func NewEmbedder ¶
NewEmbedder creates a new instance of *onexEmbedder with specified options.
Types ¶
type EmbeddingData ¶
type EmbeddingData struct { Extra Extra `json:"extra,omitempty"` Label string `json:"label,omitempty"` Text string `json:"text,omitempty"` Emb []float32 `json:"emb,omitempty"` }
EmbeddingData represents the structure of data to be embedded.
type EmbeddingType ¶
type EmbeddingType int
EmbeddingType represents the type of embedding being performed.
const ( // TextEmbeddingType indicates an embedding type for text data. TextEmbeddingType EmbeddingType = iota // ImageEmbeddingType indicates an embedding type for image data. ImageEmbeddingType )
type Option ¶
type Option func(emb *onexEmbedder)
Option is a function type that modifies the onexEmbedder configuration.
func WithMaxConcurrency ¶
WithMaxConcurrency returns an Option that sets the maximum concurrency level for the embedder.
func WithRateLimiter ¶
WithRateLimiter returns an Option that sets a custom rate limiter for the embedder.
Click to show internal directories.
Click to hide internal directories.