Skip to content

Commit 33a9318

Browse files
Update API model
1 parent 160cdad commit 33a9318

File tree

7 files changed

+668
-151
lines changed

7 files changed

+668
-151
lines changed

tools/code-generation/smithy/api-descriptions/bedrock-runtime.json

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,36 @@
10611061
"smithy.api#documentation": "<p>The Model automatically decides if a tool should be called or whether to generate text instead.\n For example, <code>{\"auto\" : {}}</code>.</p>"
10621062
}
10631063
},
1064+
"com.amazonaws.bedrockruntime#BidirectionalInputPayloadPart": {
1065+
"type": "structure",
1066+
"members": {
1067+
"bytes": {
1068+
"target": "com.amazonaws.bedrockruntime#PartBody",
1069+
"traits": {
1070+
"smithy.api#documentation": "<p>The audio content for the bidirectional input.</p>"
1071+
}
1072+
}
1073+
},
1074+
"traits": {
1075+
"smithy.api#documentation": "<p>Payload content for the bidirectional input. The input is an audio stream.</p>",
1076+
"smithy.api#sensitive": {}
1077+
}
1078+
},
1079+
"com.amazonaws.bedrockruntime#BidirectionalOutputPayloadPart": {
1080+
"type": "structure",
1081+
"members": {
1082+
"bytes": {
1083+
"target": "com.amazonaws.bedrockruntime#PartBody",
1084+
"traits": {
1085+
"smithy.api#documentation": "<p>The speech output of the bidirectional stream.</p>"
1086+
}
1087+
}
1088+
},
1089+
"traits": {
1090+
"smithy.api#documentation": "<p>Output from the bidirectional stream. The output is speech and a text transcription.</p>",
1091+
"smithy.api#sensitive": {}
1092+
}
1093+
},
10641094
"com.amazonaws.bedrockruntime#Body": {
10651095
"type": "blob",
10661096
"traits": {
@@ -3714,6 +3744,9 @@
37143744
{
37153745
"target": "com.amazonaws.bedrockruntime#InvokeModel"
37163746
},
3747+
{
3748+
"target": "com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStream"
3749+
},
37173750
{
37183751
"target": "com.amazonaws.bedrockruntime#InvokeModelWithResponseStream"
37193752
}
@@ -3898,6 +3931,164 @@
38983931
"smithy.api#output": {}
38993932
}
39003933
},
3934+
"com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStream": {
3935+
"type": "operation",
3936+
"input": {
3937+
"target": "com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamRequest"
3938+
},
3939+
"output": {
3940+
"target": "com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamResponse"
3941+
},
3942+
"errors": [
3943+
{
3944+
"target": "com.amazonaws.bedrockruntime#AccessDeniedException"
3945+
},
3946+
{
3947+
"target": "com.amazonaws.bedrockruntime#InternalServerException"
3948+
},
3949+
{
3950+
"target": "com.amazonaws.bedrockruntime#ModelErrorException"
3951+
},
3952+
{
3953+
"target": "com.amazonaws.bedrockruntime#ModelNotReadyException"
3954+
},
3955+
{
3956+
"target": "com.amazonaws.bedrockruntime#ModelStreamErrorException"
3957+
},
3958+
{
3959+
"target": "com.amazonaws.bedrockruntime#ModelTimeoutException"
3960+
},
3961+
{
3962+
"target": "com.amazonaws.bedrockruntime#ResourceNotFoundException"
3963+
},
3964+
{
3965+
"target": "com.amazonaws.bedrockruntime#ServiceQuotaExceededException"
3966+
},
3967+
{
3968+
"target": "com.amazonaws.bedrockruntime#ServiceUnavailableException"
3969+
},
3970+
{
3971+
"target": "com.amazonaws.bedrockruntime#ThrottlingException"
3972+
},
3973+
{
3974+
"target": "com.amazonaws.bedrockruntime#ValidationException"
3975+
}
3976+
],
3977+
"traits": {
3978+
"smithy.api#documentation": "<p>Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream. The response is returned in a stream that remains open for 8 minutes. A single session can contain multiple prompts and responses from the model. The prompts to the model are provided as audio files and the model's responses are spoken back to the user and transcribed.</p>\n <p>It is possible for users to interrupt the model's response with a new prompt, which will halt the response speech. The model will retain contextual awareness of the conversation while pivoting to respond to the new prompt.</p>",
3979+
"smithy.api#http": {
3980+
"code": 200,
3981+
"method": "POST",
3982+
"uri": "/model/{modelId}/invoke-with-bidirectional-stream"
3983+
}
3984+
}
3985+
},
3986+
"com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamInput": {
3987+
"type": "union",
3988+
"members": {
3989+
"chunk": {
3990+
"target": "com.amazonaws.bedrockruntime#BidirectionalInputPayloadPart",
3991+
"traits": {
3992+
"smithy.api#documentation": "<p>The audio chunk that is used as input for the invocation step.</p>"
3993+
}
3994+
}
3995+
},
3996+
"traits": {
3997+
"smithy.api#documentation": "<p>Payload content, the speech chunk, for the bidirectional input of the invocation step.</p>",
3998+
"smithy.api#streaming": {}
3999+
}
4000+
},
4001+
"com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamOutput": {
4002+
"type": "union",
4003+
"members": {
4004+
"chunk": {
4005+
"target": "com.amazonaws.bedrockruntime#BidirectionalOutputPayloadPart",
4006+
"traits": {
4007+
"smithy.api#documentation": "<p>The speech chunk that was provided as output from the invocation step.</p>"
4008+
}
4009+
},
4010+
"internalServerException": {
4011+
"target": "com.amazonaws.bedrockruntime#InternalServerException",
4012+
"traits": {
4013+
"smithy.api#documentation": "<p>The request encountered an unknown internal error.</p>"
4014+
}
4015+
},
4016+
"modelStreamErrorException": {
4017+
"target": "com.amazonaws.bedrockruntime#ModelStreamErrorException",
4018+
"traits": {
4019+
"smithy.api#documentation": "<p>The request encountered an error with the model stream.</p>"
4020+
}
4021+
},
4022+
"validationException": {
4023+
"target": "com.amazonaws.bedrockruntime#ValidationException",
4024+
"traits": {
4025+
"smithy.api#documentation": "<p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>"
4026+
}
4027+
},
4028+
"throttlingException": {
4029+
"target": "com.amazonaws.bedrockruntime#ThrottlingException",
4030+
"traits": {
4031+
"smithy.api#documentation": "<p>The request was denied due to request throttling.</p>"
4032+
}
4033+
},
4034+
"modelTimeoutException": {
4035+
"target": "com.amazonaws.bedrockruntime#ModelTimeoutException",
4036+
"traits": {
4037+
"smithy.api#documentation": "<p>The connection was closed because a request was not received within the timeout period.</p>"
4038+
}
4039+
},
4040+
"serviceUnavailableException": {
4041+
"target": "com.amazonaws.bedrockruntime#ServiceUnavailableException",
4042+
"traits": {
4043+
"smithy.api#documentation": "<p>The request has failed due to a temporary failure of the server.</p>"
4044+
}
4045+
}
4046+
},
4047+
"traits": {
4048+
"smithy.api#documentation": "<p>Output from the bidirectional stream that was used for model invocation.</p>",
4049+
"smithy.api#streaming": {}
4050+
}
4051+
},
4052+
"com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamRequest": {
4053+
"type": "structure",
4054+
"members": {
4055+
"modelId": {
4056+
"target": "com.amazonaws.bedrockruntime#InvokeModelIdentifier",
4057+
"traits": {
4058+
"smithy.api#documentation": "<p>The model ID or ARN of the model ID to use. Currently, only <code>amazon.nova-sonic-v1:0</code> is supported.</p>",
4059+
"smithy.api#httpLabel": {},
4060+
"smithy.api#required": {}
4061+
}
4062+
},
4063+
"body": {
4064+
"target": "com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamInput",
4065+
"traits": {
4066+
"smithy.api#documentation": "<p>The prompt and inference parameters in the format specified in the <code>BidirectionalInputPayloadPart</code> in the header. You must provide the body in JSON format. To see the format and content of the request and response bodies for different models, refer to <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html\">Inference parameters</a>. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html\">Run inference</a> in the Bedrock User Guide.</p>",
4067+
"smithy.api#httpPayload": {},
4068+
"smithy.api#required": {}
4069+
}
4070+
}
4071+
},
4072+
"traits": {
4073+
"smithy.api#input": {}
4074+
}
4075+
},
4076+
"com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamResponse": {
4077+
"type": "structure",
4078+
"members": {
4079+
"body": {
4080+
"target": "com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamOutput",
4081+
"traits": {
4082+
"smithy.api#documentation": "<p>Streaming response from the model in the format specified by the <code>BidirectionalOutputPayloadPart</code> header.</p>",
4083+
"smithy.api#httpPayload": {},
4084+
"smithy.api#required": {}
4085+
}
4086+
}
4087+
},
4088+
"traits": {
4089+
"smithy.api#output": {}
4090+
}
4091+
},
39014092
"com.amazonaws.bedrockruntime#InvokeModelWithResponseStream": {
39024093
"type": "operation",
39034094
"input": {

0 commit comments

Comments
 (0)