AwsBedrockEmbedder defaults to cohere.embed-multilingual-v3 with 1024 dimensions. Set input_type for the text being embedded.
aws_bedrock_embedder.py
id="cohere.embed-v4:0". The embedder changes its default vector dimension to 1536. Set output_dimension to use 256, 512, 1024, or 1536 dimensions.
Run the Example
1
Set up your virtual environment
2
Configure AWS credentials
Authenticate with the AWS SDK credential chain, then set the region:
3
Install dependencies
4
Run the example