Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Embedder ¶
type Embedder struct {
// contains filtered or unexported fields
}
Embedder generates vector embeddings for text
func (*Embedder) Embed ¶
Embed generates an embedding for a single text Emits usage event immediately via handler if set
func (*Embedder) EmbedBatch ¶
EmbedBatch generates embeddings for multiple texts using intelligent batching If the provider supports batch embeddings, it will use parallel batch API calls Otherwise, it falls back to sequential processing
func (*Embedder) SetUsageHandler ¶
SetUsageHandler sets a callback to be called after each embedding with usage info
type Option ¶
type Option func(*Embedder)
Option is a functional option for configuring the Embedder
func WithBatchSize ¶
WithBatchSize sets the batch size for embedding API calls (default: 50)
func WithMaxConcurrency ¶
WithMaxConcurrency sets the maximum concurrent embedding batch requests (default: 5)