UNPKG

@n8n/n8n-nodes-langchain

Version:
18 lines (17 loc) 744 B
import { type BedrockRuntimeClient } from '@aws-sdk/client-bedrock-runtime'; import { Embeddings } from '@langchain/core/embeddings'; export type BedrockInvokeModelEmbeddingsParams = { client: BedrockRuntimeClient; model: string; additionalModelRequestFields?: Record<string, unknown>; }; export declare class BedrockInvokeModelEmbeddings extends Embeddings { private readonly client; private readonly model; private readonly additionalModelRequestFields; constructor({ client, model, additionalModelRequestFields }: BedrockInvokeModelEmbeddingsParams); private buildRequestBody; private embed; embedDocuments(documents: string[]): Promise<number[][]>; embedQuery(text: string): Promise<number[]>; }