Skip to content

Commit d743b54

Browse files
victor-upmeetVictor Thuillier
and
Victor Thuillier
authored
Create BedrockRuntime client with InvokeModel operation (#1849)
* Create BedrockRuntime client with InvokeModel operation * Fix documentation URL * Fix BedrockRuntime InvokeModel documentation example * Regenrate BedrockRuntime InvokeModel * Input and Result unit tests for BedrockRuntime InvokeModel operation * Fix BedrockRuntime tests * Fix BedrockRuntime tests * Fix SymfonyBundle Changelog * Upgraded Symfony/Bundle branch-alias dev-master from 1.13-dev to 1.14-dev * Removed .idea files * Remove BedrockRuntime service endpoint- and smoke properties --------- Co-authored-by: Victor Thuillier <victor@Users-MacBook-Pro.local>
1 parent 529976d commit d743b54

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
- AWS api-change: Added `us-isof-east-1` and `us-isof-south-1` regions
8+
- Support for BedrockRuntime
89

910
## 1.24.1
1011

src/AwsClientFactory.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use AsyncAws\AppSync\AppSyncClient;
88
use AsyncAws\Athena\AthenaClient;
9+
use AsyncAws\BedrockRuntime\BedrockRuntimeClient;
910
use AsyncAws\CloudFormation\CloudFormationClient;
1011
use AsyncAws\CloudFront\CloudFrontClient;
1112
use AsyncAws\CloudWatch\CloudWatchClient;
@@ -118,6 +119,19 @@ public function appSync(): AppSyncClient
118119
return $this->serviceCache[__METHOD__];
119120
}
120121

122+
public function bedrockRuntime(): BedrockRuntimeClient
123+
{
124+
if (!class_exists(BedrockRuntimeClient::class)) {
125+
throw MissingDependency::create('async-aws/bedrock-runtime', 'BedrockRuntime');
126+
}
127+
128+
if (!isset($this->serviceCache[__METHOD__])) {
129+
$this->serviceCache[__METHOD__] = new BedrockRuntimeClient($this->configuration, $this->credentialProvider, $this->httpClient, $this->logger);
130+
}
131+
132+
return $this->serviceCache[__METHOD__];
133+
}
134+
121135
public function cloudFormation(): CloudFormationClient
122136
{
123137
if (!class_exists(CloudFormationClient::class)) {

0 commit comments

Comments
 (0)