Skip to content

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.

EmbeddingsByType

Map of modality type to embedding function

TransformComponent<Promise<BaseNode<Metadata>[]>>

A transformation component that adds embeddings to nodes

const pipeline = new IngestionPipeline({
transformations: [
new SentenceSplitter({ chunkSize: 1024 }),
embeddings({
text: getOpenAIEmbedding("text-embedding-3-small"),
}),
],
});