Class: LangChainEmbeddingWrapper
batteries/docs.LangChainEmbeddingWrapper
An Embedding implementation that defers to a LangChain Embeddings
object.
Implements
Constructors
constructor
• new LangChainEmbeddingWrapper(lcEmbedding
)
Parameters
Name | Type |
---|---|
lcEmbedding | Embeddings |
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
Name | Type |
---|---|
text | string |
Returns
Promise
<number
[]>
Implementation of
Defined in
packages/ai-jsx/src/batteries/docs.tsx:324
embedBatch
▸ embedBatch(chunks
): Promise
<number
[][]>
Parameters
Name | Type |
---|---|
chunks | string [] |
Returns
Promise
<number
[][]>