Skip to main content

Class: LangChainEmbeddingWrapper

batteries/docs.LangChainEmbeddingWrapper

An Embedding implementation that defers to a LangChain Embeddings object.

Implements

Constructors

constructor

new LangChainEmbeddingWrapper(lcEmbedding)

Parameters

NameType
lcEmbeddingEmbeddings

Defined in

packages/ai-jsx/src/batteries/docs.tsx:322

Properties

lcEmbedding

Readonly lcEmbedding: Embeddings

Defined in

packages/ai-jsx/src/batteries/docs.tsx:322

Methods

embed

embed(text): Promise<number[]>

Parameters

NameType
textstring

Returns

Promise<number[]>

Implementation of

Embedding.embed

Defined in

packages/ai-jsx/src/batteries/docs.tsx:324


embedBatch

embedBatch(chunks): Promise<number[][]>

Parameters

NameType
chunksstring[]

Returns

Promise<number[][]>

Implementation of

Embedding.embedBatch

Defined in

packages/ai-jsx/src/batteries/docs.tsx:328