Skip to content

Commit

Permalink
Merge pull request geekan#1644 from TorgemanTarak/pass-region-name-to…
Browse files Browse the repository at this point in the history
…-the-client

pass the reigion name to the boto3.session.client to use region gated…
  • Loading branch information
shenchucheng authored Dec 18, 2024
2 parents 0ab21e3 + f439c67 commit 4954729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metagpt/provider/bedrock_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init_client(self, service_name: Literal["bedrock-runtime", "bedrock"]):
"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
Expand Down

0 comments on commit 4954729

Please sign in to comment.