pass the reigion name to the boto3.session.client to use region gated models on bedrock

This commit is contained in:
TorgemanTarak 2024-12-16 15:04:49 +01:00
parent 0ab21e3b37
commit d360800cbf
No known key found for this signature in database

View file

@ -38,7 +38,7 @@ class BedrockLLM(BaseLLM):
"region_name": os.environ.get("AWS_DEFAULT_REGION", self.config.region_name),
}
session = boto3.Session(**self.__credential_kwargs)
client = session.client(service_name)
client = session.client(service_name,region_name = self.__credential_kwargs["region_name"])
return client
@property