TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Capevace/llm-magic/llms.txt
Use this file to discover all available pages before exploring further.
EmbeddingsBuilder provides a fluent interface for generating vector embeddings from text input. Embeddings can be used for semantic search, similarity comparison, and other vector-based operations.
Configuration Methods
model
Set the embedding model to use.The embedding model identifier string or EmbeddingModel instance
Returns the builder instance for method chaining
input
Set the text input to generate embeddings for.The text to embed, or a closure that returns the text
Returns the builder instance for method chaining
Callback Methods
onTokenStats
Set a callback for token usage statistics.Closure that receives TokenStats with usage information
Returns the builder instance for method chaining
Execution Methods
get
Generate the embeddings for the configured input.EmbeddedData instance containing the vector embeddings and metadata
Thrown if input or model is not set before calling get()