Skip to content

Commit ab8392d

Browse files
author
AWS
committed
Amazon Bedrock Runtime Update: Adds support for Audio Blocks and Streaming Image Output plus new Stop Reasons of malformed_model_output and malformed_tool_use.
1 parent c8300cf commit ab8392d

File tree

2 files changed

+127
-0
lines changed

2 files changed

+127
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Bedrock Runtime",
4+
"contributor": "",
5+
"description": "Adds support for Audio Blocks and Streaming Image Output plus new Stop Reasons of malformed_model_output and malformed_tool_use."
6+
}

services/bedrockruntime/src/main/resources/codegen-resources/service-2.json

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,68 @@
463463
},
464464
"documentation":"<p>A summary of an asynchronous invocation.</p>"
465465
},
466+
"AudioBlock":{
467+
"type":"structure",
468+
"required":[
469+
"format",
470+
"source"
471+
],
472+
"members":{
473+
"format":{
474+
"shape":"AudioFormat",
475+
"documentation":"<p>The format of the audio data, such as MP3, WAV, FLAC, or other supported audio formats.</p>"
476+
},
477+
"source":{
478+
"shape":"AudioSource",
479+
"documentation":"<p>The source of the audio data, which can be provided as raw bytes or an S3 location.</p>"
480+
},
481+
"error":{
482+
"shape":"ErrorBlock",
483+
"documentation":"<p>Error information if the audio block could not be processed or contains invalid data.</p>"
484+
}
485+
},
486+
"documentation":"<p>An audio content block that contains audio data in various supported formats.</p>"
487+
},
488+
"AudioFormat":{
489+
"type":"string",
490+
"enum":[
491+
"mp3",
492+
"opus",
493+
"wav",
494+
"aac",
495+
"flac",
496+
"mp4",
497+
"ogg",
498+
"mkv",
499+
"mka",
500+
"x-aac",
501+
"m4a",
502+
"mpeg",
503+
"mpga",
504+
"pcm",
505+
"webm"
506+
]
507+
},
508+
"AudioSource":{
509+
"type":"structure",
510+
"members":{
511+
"bytes":{
512+
"shape":"AudioSourceBytesBlob",
513+
"documentation":"<p>Audio data encoded in base64.</p>"
514+
},
515+
"s3Location":{
516+
"shape":"S3Location",
517+
"documentation":"<p>A reference to audio data stored in an Amazon S3 bucket. To see which models support S3 uploads, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference-supported-models-features.html\">Supported models and features for Converse</a>.</p>"
518+
}
519+
},
520+
"documentation":"<p>The source of audio data, which can be provided either as raw bytes or a reference to an S3 location.</p>",
521+
"sensitive":true,
522+
"union":true
523+
},
524+
"AudioSourceBytesBlob":{
525+
"type":"blob",
526+
"min":1
527+
},
466528
"AutoToolChoice":{
467529
"type":"structure",
468530
"members":{},
@@ -699,6 +761,10 @@
699761
"shape":"VideoBlock",
700762
"documentation":"<p>Video to include in the message. </p>"
701763
},
764+
"audio":{
765+
"shape":"AudioBlock",
766+
"documentation":"<p>An audio content block containing audio data in the conversation.</p>"
767+
},
702768
"toolUse":{
703769
"shape":"ToolUseBlock",
704770
"documentation":"<p>Information about a tool use request from a model.</p>"
@@ -753,6 +819,10 @@
753819
"citation":{
754820
"shape":"CitationsDelta",
755821
"documentation":"<p>Incremental citation information that is streamed as part of the response generation process.</p>"
822+
},
823+
"image":{
824+
"shape":"ImageBlockDelta",
825+
"documentation":"<p>A streaming delta event containing incremental image data.</p>"
756826
}
757827
},
758828
"documentation":"<p>A block of content in a streaming response.</p>",
@@ -787,6 +857,10 @@
787857
"toolResult":{
788858
"shape":"ToolResultBlockStart",
789859
"documentation":"<p>The </p>"
860+
},
861+
"image":{
862+
"shape":"ImageBlockStart",
863+
"documentation":"<p>The initial event indicating the start of a streaming image block.</p>"
790864
}
791865
},
792866
"documentation":"<p>Content block start information.</p>",
@@ -1431,6 +1505,17 @@
14311505
"type":"blob",
14321506
"min":1
14331507
},
1508+
"ErrorBlock":{
1509+
"type":"structure",
1510+
"members":{
1511+
"message":{
1512+
"shape":"String",
1513+
"documentation":"<p>A human-readable error message describing what went wrong during content processing.</p>"
1514+
}
1515+
},
1516+
"documentation":"<p>A block containing error information when content processing fails.</p>",
1517+
"sensitive":true
1518+
},
14341519
"FoundationModelVersionIdentifier":{
14351520
"type":"string",
14361521
"documentation":"<p>ARN or ID of a Bedrock model</p>",
@@ -2768,10 +2853,39 @@
27682853
"source":{
27692854
"shape":"ImageSource",
27702855
"documentation":"<p>The source for the image.</p>"
2856+
},
2857+
"error":{
2858+
"shape":"ErrorBlock",
2859+
"documentation":"<p>Error information if the image block could not be processed or contains invalid data.</p>"
27712860
}
27722861
},
27732862
"documentation":"<p>Image content for a message.</p>"
27742863
},
2864+
"ImageBlockDelta":{
2865+
"type":"structure",
2866+
"members":{
2867+
"source":{
2868+
"shape":"ImageSource",
2869+
"documentation":"<p>The incremental image source data for this delta event.</p>"
2870+
},
2871+
"error":{
2872+
"shape":"ErrorBlock",
2873+
"documentation":"<p>Error information if this image delta could not be processed.</p>"
2874+
}
2875+
},
2876+
"documentation":"<p>A streaming delta event that contains incremental image data during streaming responses.</p>"
2877+
},
2878+
"ImageBlockStart":{
2879+
"type":"structure",
2880+
"required":["format"],
2881+
"members":{
2882+
"format":{
2883+
"shape":"ImageFormat",
2884+
"documentation":"<p>The format of the image data that will be streamed in subsequent delta events.</p>"
2885+
}
2886+
},
2887+
"documentation":"<p>The initial event in a streaming image block that indicates the start of image content.</p>"
2888+
},
27752889
"ImageFormat":{
27762890
"type":"string",
27772891
"enum":[
@@ -2794,6 +2908,7 @@
27942908
}
27952909
},
27962910
"documentation":"<p>The source for an image.</p>",
2911+
"sensitive":true,
27972912
"union":true
27982913
},
27992914
"ImageSourceBytesBlob":{
@@ -3771,6 +3886,8 @@
37713886
"stop_sequence",
37723887
"guardrail_intervened",
37733888
"content_filtered",
3889+
"malformed_model_output",
3890+
"malformed_tool_use",
37743891
"model_context_window_exceeded"
37753892
]
37763893
},
@@ -4032,6 +4149,10 @@
40324149
"text":{
40334150
"shape":"String",
40344151
"documentation":"<p>The reasoning the model used to return the output.</p>"
4152+
},
4153+
"json":{
4154+
"shape":"Document",
4155+
"documentation":"<p>The JSON schema for the tool result content block. see <a href=\"https://json-schema.org/understanding-json-schema/reference\">JSON Schema Reference</a>.</p>"
40354156
}
40364157
},
40374158
"documentation":"<p>Contains incremental updates to tool results information during streaming responses. This allows clients to build up tool results data progressively as the response is generated.</p>",

0 commit comments

Comments
 (0)