Loading...
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

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

Properties

lcEmbedding

Readonly lcEmbedding: Embeddings

Defined in

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

Methods

embed

embed(text): Promise<number[]>

Parameters

NameType
textstring

Returns

Promise<number[]>

Implementation of

Embedding.embed

Defined in

ai-jsx/src/batteries/docs.tsx:326


embedBatch

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

Parameters

NameType
chunksstring[]

Returns

Promise<number[][]>

Implementation of

Embedding.embedBatch

Defined in

ai-jsx/src/batteries/docs.tsx:330