Skip to content

Commit 1896519

Browse files
author
AWS
committed
Amazon Bedrock Runtime Update: Added support for structured outputs to Converse and ConverseStream APIs.
1 parent e2c85b9 commit 1896519

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-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": "Added support for structured outputs to Converse and ConverseStream APIs."
6+
}

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

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,10 @@
10291029
"serviceTier":{
10301030
"shape":"ServiceTier",
10311031
"documentation":"<p>Specifies the processing tier configuration used for serving the request.</p>"
1032+
},
1033+
"outputConfig":{
1034+
"shape":"OutputConfig",
1035+
"documentation":"<p>Output configuration for a model response.</p>"
10321036
}
10331037
}
10341038
},
@@ -1232,6 +1236,10 @@
12321236
"serviceTier":{
12331237
"shape":"ServiceTier",
12341238
"documentation":"<p>Specifies the processing tier configuration used for serving the request.</p>"
1239+
},
1240+
"outputConfig":{
1241+
"shape":"OutputConfig",
1242+
"documentation":"<p>Output configuration for a model response.</p>"
12351243
}
12361244
}
12371245
},
@@ -3308,6 +3316,25 @@
33083316
"type":"string",
33093317
"pattern":"(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}::foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2})|(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{1,20}):(|[0-9]{12}):inference-profile/[a-zA-Z0-9-:.]+)"
33103318
},
3319+
"JsonSchemaDefinition":{
3320+
"type":"structure",
3321+
"required":["schema"],
3322+
"members":{
3323+
"schema":{
3324+
"shape":"String",
3325+
"documentation":"<p> The JSON schema to constrain the model's output. For more information, see <a href=\"https://json-schema.org/understanding-json-schema/reference\">JSON Schema Reference</a>. </p>"
3326+
},
3327+
"name":{
3328+
"shape":"String",
3329+
"documentation":"<p> The name of the JSON schema. </p>"
3330+
},
3331+
"description":{
3332+
"shape":"String",
3333+
"documentation":"<p> A description of the JSON schema. </p>"
3334+
}
3335+
},
3336+
"documentation":"<p> JSON schema structured output format options. </p>"
3337+
},
33113338
"KmsKeyId":{
33123339
"type":"string",
33133340
"max":2048,
@@ -3523,6 +3550,51 @@
35233550
"box":true,
35243551
"min":0
35253552
},
3553+
"OutputConfig":{
3554+
"type":"structure",
3555+
"members":{
3556+
"textFormat":{
3557+
"shape":"OutputFormat",
3558+
"documentation":"<p>Structured output parameters to control the model's text response. </p>"
3559+
}
3560+
},
3561+
"documentation":"<p>Output configuration for a model response in a call to <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html\">Converse</a> or <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html\">ConverseStream</a>.</p>"
3562+
},
3563+
"OutputFormat":{
3564+
"type":"structure",
3565+
"required":[
3566+
"type",
3567+
"structure"
3568+
],
3569+
"members":{
3570+
"type":{
3571+
"shape":"OutputFormatType",
3572+
"documentation":"<p> The type of structured output format. </p>"
3573+
},
3574+
"structure":{
3575+
"shape":"OutputFormatStructure",
3576+
"documentation":"<p> The structure that the model's output must adhere to. </p>"
3577+
}
3578+
},
3579+
"documentation":"<p> Structured output parameters to control the model's response. </p>"
3580+
},
3581+
"OutputFormatStructure":{
3582+
"type":"structure",
3583+
"members":{
3584+
"jsonSchema":{
3585+
"shape":"JsonSchemaDefinition",
3586+
"documentation":"<p> A JSON schema structure that the model's output must adhere to. </p>"
3587+
}
3588+
},
3589+
"documentation":"<p> The structure that the model's output must adhere to. </p>",
3590+
"sensitive":true,
3591+
"union":true
3592+
},
3593+
"OutputFormatType":{
3594+
"type":"string",
3595+
"documentation":"<p> The type of structured output format. Available options are: json_schema. </p>",
3596+
"enum":["json_schema"]
3597+
},
35263598
"PaginationToken":{
35273599
"type":"string",
35283600
"max":2048,
@@ -4285,6 +4357,10 @@
42854357
"inputSchema":{
42864358
"shape":"ToolInputSchema",
42874359
"documentation":"<p>The input schema for the tool in JSON format.</p>"
4360+
},
4361+
"strict":{
4362+
"shape":"Boolean",
4363+
"documentation":"<p>Flag to enable structured output enforcement on a tool usage response.</p>"
42884364
}
42894365
},
42904366
"documentation":"<p>The specification for the tool. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html\">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>"

0 commit comments

Comments
 (0)