calcEmbeddings
calcEmbeddings(
embeddingFuncs):TransformComponent<Promise<BaseNode<Metadata>[]>>
Defined in: packages/core/src/embeddings/transformation.ts:33
Creates a transformation that adds embeddings to nodes based on their modality type.
Parameters
Section titled “Parameters”embeddingFuncs
Section titled “embeddingFuncs”Map of modality type to embedding function
Returns
Section titled “Returns”TransformComponent<Promise<BaseNode<Metadata>[]>>
A transformation component that adds embeddings to nodes
Example
Section titled “Example”const pipeline = new IngestionPipeline({ transformations: [ new SentenceSplitter({ chunkSize: 1024 }), embeddings({ text: getOpenAIEmbedding("text-embedding-3-small"), }), ],});