@ -30,7 +30,7 @@ class BedrockEmbeddings(BaseModel, Embeddings):
region_name = " us-east-1 "
region_name = " us-east-1 "
credentials_profile_name = " default "
credentials_profile_name = " default "
model_id = " amazon.titan-e 1t-medium "
model_id = " amazon.titan-e mbed-text-v1 "
be = BedrockEmbeddings (
be = BedrockEmbeddings (
credentials_profile_name = credentials_profile_name ,
credentials_profile_name = credentials_profile_name ,
@ -54,8 +54,8 @@ class BedrockEmbeddings(BaseModel, Embeddings):
See : https : / / boto3 . amazonaws . com / v1 / documentation / api / latest / guide / credentials . html
See : https : / / boto3 . amazonaws . com / v1 / documentation / api / latest / guide / credentials . html
"""
"""
model_id : str = " amazon.titan-e 1t-medium "
model_id : str = " amazon.titan-e mbed-text-v1 "
""" Id of the model to call, e.g., amazon.titan-e 1t-medium , this is
""" Id of the model to call, e.g., amazon.titan-e mbed-text-v1 , this is
equivalent to the modelId property in the list - foundation - models api """
equivalent to the modelId property in the list - foundation - models api """
model_kwargs : Optional [ Dict ] = None
model_kwargs : Optional [ Dict ] = None
@ -92,7 +92,7 @@ class BedrockEmbeddings(BaseModel, Embeddings):
if values [ " endpoint_url " ] :
if values [ " endpoint_url " ] :
client_params [ " endpoint_url " ] = values [ " endpoint_url " ]
client_params [ " endpoint_url " ] = values [ " endpoint_url " ]
values [ " client " ] = session . client ( " bedrock " , * * client_params )
values [ " client " ] = session . client ( " bedrock -runtime " , * * client_params )
except ImportError :
except ImportError :
raise ModuleNotFoundError (
raise ModuleNotFoundError (