Skip to content

Commit d96bdee

Browse files
This release introduces our latest bedrock runtime API, InvokeModelWithBidirectionalStream. The API supports both input and output streams and is supported by only HTTP2.0.
1 parent 534d72f commit d96bdee

File tree

4 files changed

+277
-9
lines changed

4 files changed

+277
-9
lines changed

generator/ServiceModels/bedrock-runtime/bedrock-runtime-2023-09-30.api.json

Lines changed: 87 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"output":{"shape":"ConverseResponse"},
4343
"errors":[
4444
{"shape":"AccessDeniedException"},
45-
{"shape":"ResourceNotFoundException"},
4645
{"shape":"ThrottlingException"},
46+
{"shape":"ResourceNotFoundException"},
4747
{"shape":"ModelTimeoutException"},
4848
{"shape":"InternalServerException"},
4949
{"shape":"ServiceUnavailableException"},
@@ -63,8 +63,8 @@
6363
"output":{"shape":"ConverseStreamResponse"},
6464
"errors":[
6565
{"shape":"AccessDeniedException"},
66-
{"shape":"ResourceNotFoundException"},
6766
{"shape":"ThrottlingException"},
67+
{"shape":"ResourceNotFoundException"},
6868
{"shape":"ModelTimeoutException"},
6969
{"shape":"InternalServerException"},
7070
{"shape":"ServiceUnavailableException"},
@@ -106,8 +106,31 @@
106106
{"shape":"InternalServerException"},
107107
{"shape":"ServiceUnavailableException"},
108108
{"shape":"ValidationException"},
109+
{"shape":"ServiceQuotaExceededException"},
109110
{"shape":"ModelNotReadyException"},
111+
{"shape":"ModelErrorException"}
112+
]
113+
},
114+
"InvokeModelWithBidirectionalStream":{
115+
"name":"InvokeModelWithBidirectionalStream",
116+
"http":{
117+
"method":"POST",
118+
"requestUri":"/model/{modelId}/invoke-with-bidirectional-stream",
119+
"responseCode":200
120+
},
121+
"input":{"shape":"InvokeModelWithBidirectionalStreamRequest"},
122+
"output":{"shape":"InvokeModelWithBidirectionalStreamResponse"},
123+
"errors":[
124+
{"shape":"AccessDeniedException"},
125+
{"shape":"ResourceNotFoundException"},
126+
{"shape":"ThrottlingException"},
127+
{"shape":"ModelTimeoutException"},
128+
{"shape":"InternalServerException"},
129+
{"shape":"ServiceUnavailableException"},
130+
{"shape":"ModelStreamErrorException"},
131+
{"shape":"ValidationException"},
110132
{"shape":"ServiceQuotaExceededException"},
133+
{"shape":"ModelNotReadyException"},
111134
{"shape":"ModelErrorException"}
112135
]
113136
},
@@ -129,8 +152,8 @@
129152
{"shape":"ServiceUnavailableException"},
130153
{"shape":"ModelStreamErrorException"},
131154
{"shape":"ValidationException"},
132-
{"shape":"ModelNotReadyException"},
133155
{"shape":"ServiceQuotaExceededException"},
156+
{"shape":"ModelNotReadyException"},
134157
{"shape":"ModelErrorException"}
135158
]
136159
},
@@ -161,8 +184,8 @@
161184
"output":{"shape":"StartAsyncInvokeResponse"},
162185
"errors":[
163186
{"shape":"AccessDeniedException"},
164-
{"shape":"ResourceNotFoundException"},
165187
{"shape":"ThrottlingException"},
188+
{"shape":"ResourceNotFoundException"},
166189
{"shape":"InternalServerException"},
167190
{"shape":"ServiceUnavailableException"},
168191
{"shape":"ValidationException"},
@@ -311,6 +334,22 @@
311334
"members":{
312335
}
313336
},
337+
"BidirectionalInputPayloadPart":{
338+
"type":"structure",
339+
"members":{
340+
"bytes":{"shape":"PartBody"}
341+
},
342+
"event":true,
343+
"sensitive":true
344+
},
345+
"BidirectionalOutputPayloadPart":{
346+
"type":"structure",
347+
"members":{
348+
"bytes":{"shape":"PartBody"}
349+
},
350+
"event":true,
351+
"sensitive":true
352+
},
314353
"Blob":{"type":"blob"},
315354
"Body":{
316355
"type":"blob",
@@ -1429,6 +1468,50 @@
14291468
},
14301469
"payload":"body"
14311470
},
1471+
"InvokeModelWithBidirectionalStreamInput":{
1472+
"type":"structure",
1473+
"members":{
1474+
"chunk":{"shape":"BidirectionalInputPayloadPart"}
1475+
},
1476+
"eventstream":true
1477+
},
1478+
"InvokeModelWithBidirectionalStreamOutput":{
1479+
"type":"structure",
1480+
"members":{
1481+
"chunk":{"shape":"BidirectionalOutputPayloadPart"},
1482+
"internalServerException":{"shape":"InternalServerException"},
1483+
"modelStreamErrorException":{"shape":"ModelStreamErrorException"},
1484+
"validationException":{"shape":"ValidationException"},
1485+
"throttlingException":{"shape":"ThrottlingException"},
1486+
"modelTimeoutException":{"shape":"ModelTimeoutException"},
1487+
"serviceUnavailableException":{"shape":"ServiceUnavailableException"}
1488+
},
1489+
"eventstream":true
1490+
},
1491+
"InvokeModelWithBidirectionalStreamRequest":{
1492+
"type":"structure",
1493+
"required":[
1494+
"modelId",
1495+
"body"
1496+
],
1497+
"members":{
1498+
"modelId":{
1499+
"shape":"InvokeModelIdentifier",
1500+
"location":"uri",
1501+
"locationName":"modelId"
1502+
},
1503+
"body":{"shape":"InvokeModelWithBidirectionalStreamInput"}
1504+
},
1505+
"payload":"body"
1506+
},
1507+
"InvokeModelWithBidirectionalStreamResponse":{
1508+
"type":"structure",
1509+
"required":["body"],
1510+
"members":{
1511+
"body":{"shape":"InvokeModelWithBidirectionalStreamOutput"}
1512+
},
1513+
"payload":"body"
1514+
},
14321515
"InvokeModelWithResponseStreamRequest":{
14331516
"type":"structure",
14341517
"required":["modelId"],

0 commit comments

Comments
 (0)