Skip to content

Commit a654915

Browse files
author
AWS
committed
Amazon Bedrock Runtime Update: This release adds document support to Converse and ConverseStream APIs
1 parent e261ecf commit a654915

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-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": "This release adds document support to Converse and ConverseStream APIs"
6+
}

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

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@
142142
"shape":"ImageBlock",
143143
"documentation":"<p>Image to include in the message. </p> <note> <p>This field is only supported by Anthropic Claude 3 models.</p> </note>"
144144
},
145+
"document":{
146+
"shape":"DocumentBlock",
147+
"documentation":"<p>A document to include in the message.</p>"
148+
},
145149
"toolUse":{
146150
"shape":"ToolUseBlock",
147151
"documentation":"<p>Information about a tool use request from a model. </p>"
@@ -533,6 +537,63 @@
533537
},
534538
"document":true
535539
},
540+
"DocumentBlock":{
541+
"type":"structure",
542+
"required":[
543+
"format",
544+
"name",
545+
"source"
546+
],
547+
"members":{
548+
"format":{
549+
"shape":"DocumentFormat",
550+
"documentation":"<p>The format of a document, or its extension.</p>"
551+
},
552+
"name":{
553+
"shape":"DocumentBlockNameString",
554+
"documentation":"<p>A name for the document.</p>"
555+
},
556+
"source":{
557+
"shape":"DocumentSource",
558+
"documentation":"<p>Contains the content of the document.</p>"
559+
}
560+
},
561+
"documentation":"<p>A document to include in a message when sending a <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> request. You can include up to 5 documents in a request. The maximum document size is 50 MB.</p>"
562+
},
563+
"DocumentBlockNameString":{
564+
"type":"string",
565+
"max":64,
566+
"min":1
567+
},
568+
"DocumentFormat":{
569+
"type":"string",
570+
"enum":[
571+
"pdf",
572+
"csv",
573+
"doc",
574+
"docx",
575+
"xls",
576+
"xlsx",
577+
"html",
578+
"txt",
579+
"md"
580+
]
581+
},
582+
"DocumentSource":{
583+
"type":"structure",
584+
"members":{
585+
"bytes":{
586+
"shape":"DocumentSourceBytesBlob",
587+
"documentation":"<p>A base64-encoded string of a UTF-8 encoded file, that is the document to include in the message.</p>"
588+
}
589+
},
590+
"documentation":"<p>Contains the content of the document included in a message when sending a <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> request or in the response.</p>",
591+
"union":true
592+
},
593+
"DocumentSourceBytesBlob":{
594+
"type":"blob",
595+
"min":1
596+
},
536597
"GuardrailAssessment":{
537598
"type":"structure",
538599
"members":{
@@ -1633,6 +1694,10 @@
16331694
"image":{
16341695
"shape":"ImageBlock",
16351696
"documentation":"<p>A tool result that is an image.</p> <note> <p>This field is only supported by Anthropic Claude 3 models.</p> </note>"
1697+
},
1698+
"document":{
1699+
"shape":"DocumentBlock",
1700+
"documentation":"<p>A tool result that is a document.</p>"
16361701
}
16371702
},
16381703
"documentation":"<p>The tool result content block.</p>",

0 commit comments

Comments
 (0)