Skip to content

Commit 2e60dda

Browse files
author
awstools
committed
feat(client-bedrock-runtime): Add support for system tool and web citation response.
1 parent c094d90 commit 2e60dda

File tree

6 files changed

+465
-64
lines changed

6 files changed

+465
-64
lines changed

clients/client-bedrock-runtime/src/commands/ConverseCommand.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
9595
* toolUseId: "STRING_VALUE", // required
9696
* name: "STRING_VALUE", // required
9797
* input: "DOCUMENT_VALUE", // required
98+
* type: "server_tool_use",
9899
* },
99100
* toolResult: { // ToolResultBlock
100101
* toolUseId: "STRING_VALUE", // required
@@ -143,6 +144,7 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
143144
* },
144145
* ],
145146
* status: "success" || "error",
147+
* type: "STRING_VALUE",
146148
* },
147149
* guardContent: { // GuardrailConverseContentBlock Union: only one key present
148150
* text: { // GuardrailConverseTextBlock
@@ -183,6 +185,10 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
183185
* },
184186
* ],
185187
* location: { // CitationLocation Union: only one key present
188+
* web: { // WebLocation
189+
* url: "STRING_VALUE",
190+
* domain: "STRING_VALUE",
191+
* },
186192
* documentChar: { // DocumentCharLocation
187193
* documentIndex: Number("int"),
188194
* start: Number("int"),
@@ -246,6 +252,9 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
246252
* json: "DOCUMENT_VALUE",
247253
* },
248254
* },
255+
* systemTool: { // SystemTool
256+
* name: "STRING_VALUE", // required
257+
* },
249258
* cachePoint: "<CachePointBlock>",
250259
* },
251260
* ],
@@ -332,6 +341,7 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
332341
* // toolUseId: "STRING_VALUE", // required
333342
* // name: "STRING_VALUE", // required
334343
* // input: "DOCUMENT_VALUE", // required
344+
* // type: "server_tool_use",
335345
* // },
336346
* // toolResult: { // ToolResultBlock
337347
* // toolUseId: "STRING_VALUE", // required
@@ -380,6 +390,7 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
380390
* // },
381391
* // ],
382392
* // status: "success" || "error",
393+
* // type: "STRING_VALUE",
383394
* // },
384395
* // guardContent: { // GuardrailConverseContentBlock Union: only one key present
385396
* // text: { // GuardrailConverseTextBlock
@@ -420,6 +431,10 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
420431
* // },
421432
* // ],
422433
* // location: { // CitationLocation Union: only one key present
434+
* // web: { // WebLocation
435+
* // url: "STRING_VALUE",
436+
* // domain: "STRING_VALUE",
437+
* // },
423438
* // documentChar: { // DocumentCharLocation
424439
* // documentIndex: Number("int"),
425440
* // start: Number("int"),

clients/client-bedrock-runtime/src/commands/ConverseStreamCommand.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
9595
* toolUseId: "STRING_VALUE", // required
9696
* name: "STRING_VALUE", // required
9797
* input: "DOCUMENT_VALUE", // required
98+
* type: "server_tool_use",
9899
* },
99100
* toolResult: { // ToolResultBlock
100101
* toolUseId: "STRING_VALUE", // required
@@ -143,6 +144,7 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
143144
* },
144145
* ],
145146
* status: "success" || "error",
147+
* type: "STRING_VALUE",
146148
* },
147149
* guardContent: { // GuardrailConverseContentBlock Union: only one key present
148150
* text: { // GuardrailConverseTextBlock
@@ -183,6 +185,10 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
183185
* },
184186
* ],
185187
* location: { // CitationLocation Union: only one key present
188+
* web: { // WebLocation
189+
* url: "STRING_VALUE",
190+
* domain: "STRING_VALUE",
191+
* },
186192
* documentChar: { // DocumentCharLocation
187193
* documentIndex: Number("int"),
188194
* start: Number("int"),
@@ -246,6 +252,9 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
246252
* json: "DOCUMENT_VALUE",
247253
* },
248254
* },
255+
* systemTool: { // SystemTool
256+
* name: "STRING_VALUE", // required
257+
* },
249258
* cachePoint: "<CachePointBlock>",
250259
* },
251260
* ],
@@ -291,6 +300,12 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
291300
* // toolUse: { // ToolUseBlockStart
292301
* // toolUseId: "STRING_VALUE", // required
293302
* // name: "STRING_VALUE", // required
303+
* // type: "server_tool_use",
304+
* // },
305+
* // toolResult: { // ToolResultBlockStart
306+
* // toolUseId: "STRING_VALUE", // required
307+
* // type: "STRING_VALUE",
308+
* // status: "success" || "error",
294309
* // },
295310
* // },
296311
* // contentBlockIndex: Number("int"), // required
@@ -301,6 +316,11 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
301316
* // toolUse: { // ToolUseBlockDelta
302317
* // input: "STRING_VALUE", // required
303318
* // },
319+
* // toolResult: [ // ToolResultBlocksDelta
320+
* // { // ToolResultBlockDelta Union: only one key present
321+
* // text: "STRING_VALUE",
322+
* // },
323+
* // ],
304324
* // reasoningContent: { // ReasoningContentBlockDelta Union: only one key present
305325
* // text: "STRING_VALUE",
306326
* // redactedContent: new Uint8Array(),
@@ -314,6 +334,10 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
314334
* // },
315335
* // ],
316336
* // location: { // CitationLocation Union: only one key present
337+
* // web: { // WebLocation
338+
* // url: "STRING_VALUE",
339+
* // domain: "STRING_VALUE",
340+
* // },
317341
* // documentChar: { // DocumentCharLocation
318342
* // documentIndex: Number("int"),
319343
* // start: Number("int"),

clients/client-bedrock-runtime/src/commands/CountTokensCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export interface CountTokensCommandOutput extends CountTokensResponse, __Metadat
9595
* toolUseId: "STRING_VALUE", // required
9696
* name: "STRING_VALUE", // required
9797
* input: "DOCUMENT_VALUE", // required
98+
* type: "server_tool_use",
9899
* },
99100
* toolResult: { // ToolResultBlock
100101
* toolUseId: "STRING_VALUE", // required
@@ -143,6 +144,7 @@ export interface CountTokensCommandOutput extends CountTokensResponse, __Metadat
143144
* },
144145
* ],
145146
* status: "success" || "error",
147+
* type: "STRING_VALUE",
146148
* },
147149
* guardContent: { // GuardrailConverseContentBlock Union: only one key present
148150
* text: { // GuardrailConverseTextBlock
@@ -183,6 +185,10 @@ export interface CountTokensCommandOutput extends CountTokensResponse, __Metadat
183185
* },
184186
* ],
185187
* location: { // CitationLocation Union: only one key present
188+
* web: { // WebLocation
189+
* url: "STRING_VALUE",
190+
* domain: "STRING_VALUE",
191+
* },
186192
* documentChar: { // DocumentCharLocation
187193
* documentIndex: Number("int"),
188194
* start: Number("int"),

0 commit comments

Comments
 (0)