import boto3
from chromadb.utils.embedding_functions import AmazonBedrockEmbeddingFunction
session = boto3.Session(profile_name="profile", region_name="us-east-1")
bedrock_ef = AmazonBedrockEmbeddingFunction(
session=session,
model_name="amazon.titan-embed-text-v1"
)
texts = ["Hello, world!", "How are you?"]
embeddings = bedrock_ef(texts)