Optional
fields: BedrockEmbeddingsParamsA client provided by the user that allows them to customze any SDK configuration options.
Model Name to use. Defaults to amazon.titan-embed-text-v1
if not provided
Method to generate embeddings for an array of texts. Calls _embedText method which batches and handles retry logic when calling the AWS Bedrock API.
Array of texts for which to generate embeddings.
Promise that resolves to a 2D array of embeddings for each input document.
Method that takes a document as input and returns a promise that resolves to an embedding for the document. It calls the _embedText method with the document as the input.
Document for which to generate an embedding.
Promise that resolves to an embedding for the input document.
Class that extends the Embeddings class and provides methods for generating embeddings using the Bedrock API.
Example