docs/docs/integrations/embedding-models/amazon-bedrock.md
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-bedrock</artifactId>
<version>1.13.1</version>
</dependency>
In order to use Amazon Bedrock embeddings, you need to configure AWS credentials.
One of the options is to set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.
More information can be found here.
BedrockCohereEmbeddingModelSupport is provided for Bedrock Cohere embedding models, enabling the use of the following versions:
cohere.embed-english-v3cohere.embed-multilingual-v3These models are ideal for generating high-quality text embeddings for English and multilingual text processing tasks.
Below is an example of how to configure and use a Bedrock embedding model:
BedrockCohereEmbeddingModel embeddingModel = BedrockCohereEmbeddingModel
.builder()
.region(Region.US_EAST_1)
.model("cohere.embed-multilingual-v3")
.inputType(BedrockCohereEmbeddingModel.InputType.SEARCH_QUERY)
.truncation(BedrockCohereEmbeddingModel.Truncate.NONE)
.build();
BedrockTitanEmbeddingModelBedrockCohereEmbeddingModel