@aws-sdk/client-bedrock-runtime 3.919.0 → 3.921.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -407,6 +407,8 @@ const CachePointType = {
407
407
  exports.CitationLocation = void 0;
408
408
  (function (CitationLocation) {
409
409
  CitationLocation.visit = (value, visitor) => {
410
+ if (value.web !== undefined)
411
+ return visitor.web(value.web);
410
412
  if (value.documentChar !== undefined)
411
413
  return visitor.documentChar(value.documentChar);
412
414
  if (value.documentPage !== undefined)
@@ -559,6 +561,9 @@ const ToolResultStatus = {
559
561
  ERROR: "error",
560
562
  SUCCESS: "success",
561
563
  };
564
+ const ToolUseType = {
565
+ SERVER_TOOL_USE: "server_tool_use",
566
+ };
562
567
  exports.ContentBlock = void 0;
563
568
  (function (ContentBlock) {
564
569
  ContentBlock.visit = (value, visitor) => {
@@ -638,6 +643,8 @@ exports.Tool = void 0;
638
643
  Tool.visit = (value, visitor) => {
639
644
  if (value.toolSpec !== undefined)
640
645
  return visitor.toolSpec(value.toolSpec);
646
+ if (value.systemTool !== undefined)
647
+ return visitor.systemTool(value.systemTool);
641
648
  if (value.cachePoint !== undefined)
642
649
  return visitor.cachePoint(value.cachePoint);
643
650
  return visitor._(value.$unknown[0], value.$unknown[1]);
@@ -717,6 +724,14 @@ exports.ReasoningContentBlockDelta = void 0;
717
724
  return visitor._(value.$unknown[0], value.$unknown[1]);
718
725
  };
719
726
  })(exports.ReasoningContentBlockDelta || (exports.ReasoningContentBlockDelta = {}));
727
+ exports.ToolResultBlockDelta = void 0;
728
+ (function (ToolResultBlockDelta) {
729
+ ToolResultBlockDelta.visit = (value, visitor) => {
730
+ if (value.text !== undefined)
731
+ return visitor.text(value.text);
732
+ return visitor._(value.$unknown[0], value.$unknown[1]);
733
+ };
734
+ })(exports.ToolResultBlockDelta || (exports.ToolResultBlockDelta = {}));
720
735
  exports.ContentBlockDelta = void 0;
721
736
  (function (ContentBlockDelta) {
722
737
  ContentBlockDelta.visit = (value, visitor) => {
@@ -724,6 +739,8 @@ exports.ContentBlockDelta = void 0;
724
739
  return visitor.text(value.text);
725
740
  if (value.toolUse !== undefined)
726
741
  return visitor.toolUse(value.toolUse);
742
+ if (value.toolResult !== undefined)
743
+ return visitor.toolResult(value.toolResult);
727
744
  if (value.reasoningContent !== undefined)
728
745
  return visitor.reasoningContent(value.reasoningContent);
729
746
  if (value.citation !== undefined)
@@ -736,6 +753,8 @@ exports.ContentBlockStart = void 0;
736
753
  ContentBlockStart.visit = (value, visitor) => {
737
754
  if (value.toolUse !== undefined)
738
755
  return visitor.toolUse(value.toolUse);
756
+ if (value.toolResult !== undefined)
757
+ return visitor.toolResult(value.toolResult);
739
758
  return visitor._(value.$unknown[0], value.$unknown[1]);
740
759
  };
741
760
  })(exports.ContentBlockStart || (exports.ContentBlockStart = {}));
@@ -1125,6 +1144,8 @@ const ContentBlockDeltaFilterSensitiveLog = (obj) => {
1125
1144
  return { text: obj.text };
1126
1145
  if (obj.toolUse !== undefined)
1127
1146
  return { toolUse: obj.toolUse };
1147
+ if (obj.toolResult !== undefined)
1148
+ return { toolResult: obj.toolResult.map((item) => item) };
1128
1149
  if (obj.reasoningContent !== undefined)
1129
1150
  return { reasoningContent: smithyClient.SENSITIVE_STRING };
1130
1151
  if (obj.citation !== undefined)
@@ -2229,6 +2250,7 @@ const se_SystemContentBlocks = (input, context) => {
2229
2250
  const se_Tool = (input, context) => {
2230
2251
  return exports.Tool.visit(input, {
2231
2252
  cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
2253
+ systemTool: (value) => ({ systemTool: smithyClient._json(value) }),
2232
2254
  toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value) }),
2233
2255
  _: (name, value) => ({ [name]: value }),
2234
2256
  });
@@ -2250,6 +2272,7 @@ const se_ToolResultBlock = (input, context) => {
2250
2272
  content: (_) => se_ToolResultContentBlocks(_, context),
2251
2273
  status: [],
2252
2274
  toolUseId: [],
2275
+ type: [],
2253
2276
  });
2254
2277
  };
2255
2278
  const se_ToolResultContentBlock = (input, context) => {
@@ -2288,6 +2311,7 @@ const se_ToolUseBlock = (input, context) => {
2288
2311
  input: (_) => se_Document(_),
2289
2312
  name: [],
2290
2313
  toolUseId: [],
2314
+ type: [],
2291
2315
  });
2292
2316
  };
2293
2317
  const se_VideoBlock = (input, context) => {
@@ -2397,6 +2421,11 @@ const de_ContentBlockDelta = (output, context) => {
2397
2421
  if (smithyClient.expectString(output.text) !== undefined) {
2398
2422
  return { text: smithyClient.expectString(output.text) };
2399
2423
  }
2424
+ if (output.toolResult != null) {
2425
+ return {
2426
+ toolResult: smithyClient._json(output.toolResult),
2427
+ };
2428
+ }
2400
2429
  if (output.toolUse != null) {
2401
2430
  return {
2402
2431
  toolUse: smithyClient._json(output.toolUse),
@@ -2755,6 +2784,7 @@ const de_ToolResultBlock = (output, context) => {
2755
2784
  content: (_) => de_ToolResultContentBlocks(_, context),
2756
2785
  status: smithyClient.expectString,
2757
2786
  toolUseId: smithyClient.expectString,
2787
+ type: smithyClient.expectString,
2758
2788
  });
2759
2789
  };
2760
2790
  const de_ToolResultContentBlock = (output, context) => {
@@ -2796,6 +2826,7 @@ const de_ToolUseBlock = (output, context) => {
2796
2826
  input: (_) => de_Document(_),
2797
2827
  name: smithyClient.expectString,
2798
2828
  toolUseId: smithyClient.expectString,
2829
+ type: smithyClient.expectString,
2799
2830
  });
2800
2831
  };
2801
2832
  const de_VideoBlock = (output, context) => {
@@ -3176,6 +3207,7 @@ exports.StopReason = StopReason;
3176
3207
  exports.SystemContentBlockFilterSensitiveLog = SystemContentBlockFilterSensitiveLog;
3177
3208
  exports.ThrottlingException = ThrottlingException;
3178
3209
  exports.ToolResultStatus = ToolResultStatus;
3210
+ exports.ToolUseType = ToolUseType;
3179
3211
  exports.Trace = Trace;
3180
3212
  exports.ValidationException = ValidationException;
3181
3213
  exports.VideoFormat = VideoFormat;
@@ -274,6 +274,8 @@ export const CachePointType = {
274
274
  export var CitationLocation;
275
275
  (function (CitationLocation) {
276
276
  CitationLocation.visit = (value, visitor) => {
277
+ if (value.web !== undefined)
278
+ return visitor.web(value.web);
277
279
  if (value.documentChar !== undefined)
278
280
  return visitor.documentChar(value.documentChar);
279
281
  if (value.documentPage !== undefined)
@@ -426,6 +428,9 @@ export const ToolResultStatus = {
426
428
  ERROR: "error",
427
429
  SUCCESS: "success",
428
430
  };
431
+ export const ToolUseType = {
432
+ SERVER_TOOL_USE: "server_tool_use",
433
+ };
429
434
  export var ContentBlock;
430
435
  (function (ContentBlock) {
431
436
  ContentBlock.visit = (value, visitor) => {
@@ -505,6 +510,8 @@ export var Tool;
505
510
  Tool.visit = (value, visitor) => {
506
511
  if (value.toolSpec !== undefined)
507
512
  return visitor.toolSpec(value.toolSpec);
513
+ if (value.systemTool !== undefined)
514
+ return visitor.systemTool(value.systemTool);
508
515
  if (value.cachePoint !== undefined)
509
516
  return visitor.cachePoint(value.cachePoint);
510
517
  return visitor._(value.$unknown[0], value.$unknown[1]);
@@ -584,6 +591,14 @@ export var ReasoningContentBlockDelta;
584
591
  return visitor._(value.$unknown[0], value.$unknown[1]);
585
592
  };
586
593
  })(ReasoningContentBlockDelta || (ReasoningContentBlockDelta = {}));
594
+ export var ToolResultBlockDelta;
595
+ (function (ToolResultBlockDelta) {
596
+ ToolResultBlockDelta.visit = (value, visitor) => {
597
+ if (value.text !== undefined)
598
+ return visitor.text(value.text);
599
+ return visitor._(value.$unknown[0], value.$unknown[1]);
600
+ };
601
+ })(ToolResultBlockDelta || (ToolResultBlockDelta = {}));
587
602
  export var ContentBlockDelta;
588
603
  (function (ContentBlockDelta) {
589
604
  ContentBlockDelta.visit = (value, visitor) => {
@@ -591,6 +606,8 @@ export var ContentBlockDelta;
591
606
  return visitor.text(value.text);
592
607
  if (value.toolUse !== undefined)
593
608
  return visitor.toolUse(value.toolUse);
609
+ if (value.toolResult !== undefined)
610
+ return visitor.toolResult(value.toolResult);
594
611
  if (value.reasoningContent !== undefined)
595
612
  return visitor.reasoningContent(value.reasoningContent);
596
613
  if (value.citation !== undefined)
@@ -603,6 +620,8 @@ export var ContentBlockStart;
603
620
  ContentBlockStart.visit = (value, visitor) => {
604
621
  if (value.toolUse !== undefined)
605
622
  return visitor.toolUse(value.toolUse);
623
+ if (value.toolResult !== undefined)
624
+ return visitor.toolResult(value.toolResult);
606
625
  return visitor._(value.$unknown[0], value.$unknown[1]);
607
626
  };
608
627
  })(ContentBlockStart || (ContentBlockStart = {}));
@@ -992,6 +1011,8 @@ export const ContentBlockDeltaFilterSensitiveLog = (obj) => {
992
1011
  return { text: obj.text };
993
1012
  if (obj.toolUse !== undefined)
994
1013
  return { toolUse: obj.toolUse };
1014
+ if (obj.toolResult !== undefined)
1015
+ return { toolResult: obj.toolResult.map((item) => item) };
995
1016
  if (obj.reasoningContent !== undefined)
996
1017
  return { reasoningContent: SENSITIVE_STRING };
997
1018
  if (obj.citation !== undefined)
@@ -959,6 +959,7 @@ const se_SystemContentBlocks = (input, context) => {
959
959
  const se_Tool = (input, context) => {
960
960
  return Tool.visit(input, {
961
961
  cachePoint: (value) => ({ cachePoint: _json(value) }),
962
+ systemTool: (value) => ({ systemTool: _json(value) }),
962
963
  toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value, context) }),
963
964
  _: (name, value) => ({ [name]: value }),
964
965
  });
@@ -980,6 +981,7 @@ const se_ToolResultBlock = (input, context) => {
980
981
  content: (_) => se_ToolResultContentBlocks(_, context),
981
982
  status: [],
982
983
  toolUseId: [],
984
+ type: [],
983
985
  });
984
986
  };
985
987
  const se_ToolResultContentBlock = (input, context) => {
@@ -1018,6 +1020,7 @@ const se_ToolUseBlock = (input, context) => {
1018
1020
  input: (_) => se_Document(_, context),
1019
1021
  name: [],
1020
1022
  toolUseId: [],
1023
+ type: [],
1021
1024
  });
1022
1025
  };
1023
1026
  const se_VideoBlock = (input, context) => {
@@ -1127,6 +1130,11 @@ const de_ContentBlockDelta = (output, context) => {
1127
1130
  if (__expectString(output.text) !== undefined) {
1128
1131
  return { text: __expectString(output.text) };
1129
1132
  }
1133
+ if (output.toolResult != null) {
1134
+ return {
1135
+ toolResult: _json(output.toolResult),
1136
+ };
1137
+ }
1130
1138
  if (output.toolUse != null) {
1131
1139
  return {
1132
1140
  toolUse: _json(output.toolUse),
@@ -1485,6 +1493,7 @@ const de_ToolResultBlock = (output, context) => {
1485
1493
  content: (_) => de_ToolResultContentBlocks(_, context),
1486
1494
  status: __expectString,
1487
1495
  toolUseId: __expectString,
1496
+ type: __expectString,
1488
1497
  });
1489
1498
  };
1490
1499
  const de_ToolResultContentBlock = (output, context) => {
@@ -1526,6 +1535,7 @@ const de_ToolUseBlock = (output, context) => {
1526
1535
  input: (_) => de_Document(_, context),
1527
1536
  name: __expectString,
1528
1537
  toolUseId: __expectString,
1538
+ type: __expectString,
1529
1539
  });
1530
1540
  };
1531
1541
  const de_VideoBlock = (output, context) => {
@@ -89,6 +89,7 @@ declare const ConverseCommand_base: {
89
89
  * toolUseId: "STRING_VALUE", // required
90
90
  * name: "STRING_VALUE", // required
91
91
  * input: "DOCUMENT_VALUE", // required
92
+ * type: "server_tool_use",
92
93
  * },
93
94
  * toolResult: { // ToolResultBlock
94
95
  * toolUseId: "STRING_VALUE", // required
@@ -137,6 +138,7 @@ declare const ConverseCommand_base: {
137
138
  * },
138
139
  * ],
139
140
  * status: "success" || "error",
141
+ * type: "STRING_VALUE",
140
142
  * },
141
143
  * guardContent: { // GuardrailConverseContentBlock Union: only one key present
142
144
  * text: { // GuardrailConverseTextBlock
@@ -177,6 +179,10 @@ declare const ConverseCommand_base: {
177
179
  * },
178
180
  * ],
179
181
  * location: { // CitationLocation Union: only one key present
182
+ * web: { // WebLocation
183
+ * url: "STRING_VALUE",
184
+ * domain: "STRING_VALUE",
185
+ * },
180
186
  * documentChar: { // DocumentCharLocation
181
187
  * documentIndex: Number("int"),
182
188
  * start: Number("int"),
@@ -240,6 +246,9 @@ declare const ConverseCommand_base: {
240
246
  * json: "DOCUMENT_VALUE",
241
247
  * },
242
248
  * },
249
+ * systemTool: { // SystemTool
250
+ * name: "STRING_VALUE", // required
251
+ * },
243
252
  * cachePoint: "<CachePointBlock>",
244
253
  * },
245
254
  * ],
@@ -326,6 +335,7 @@ declare const ConverseCommand_base: {
326
335
  * // toolUseId: "STRING_VALUE", // required
327
336
  * // name: "STRING_VALUE", // required
328
337
  * // input: "DOCUMENT_VALUE", // required
338
+ * // type: "server_tool_use",
329
339
  * // },
330
340
  * // toolResult: { // ToolResultBlock
331
341
  * // toolUseId: "STRING_VALUE", // required
@@ -374,6 +384,7 @@ declare const ConverseCommand_base: {
374
384
  * // },
375
385
  * // ],
376
386
  * // status: "success" || "error",
387
+ * // type: "STRING_VALUE",
377
388
  * // },
378
389
  * // guardContent: { // GuardrailConverseContentBlock Union: only one key present
379
390
  * // text: { // GuardrailConverseTextBlock
@@ -414,6 +425,10 @@ declare const ConverseCommand_base: {
414
425
  * // },
415
426
  * // ],
416
427
  * // location: { // CitationLocation Union: only one key present
428
+ * // web: { // WebLocation
429
+ * // url: "STRING_VALUE",
430
+ * // domain: "STRING_VALUE",
431
+ * // },
417
432
  * // documentChar: { // DocumentCharLocation
418
433
  * // documentIndex: Number("int"),
419
434
  * // start: Number("int"),
@@ -89,6 +89,7 @@ declare const ConverseStreamCommand_base: {
89
89
  * toolUseId: "STRING_VALUE", // required
90
90
  * name: "STRING_VALUE", // required
91
91
  * input: "DOCUMENT_VALUE", // required
92
+ * type: "server_tool_use",
92
93
  * },
93
94
  * toolResult: { // ToolResultBlock
94
95
  * toolUseId: "STRING_VALUE", // required
@@ -137,6 +138,7 @@ declare const ConverseStreamCommand_base: {
137
138
  * },
138
139
  * ],
139
140
  * status: "success" || "error",
141
+ * type: "STRING_VALUE",
140
142
  * },
141
143
  * guardContent: { // GuardrailConverseContentBlock Union: only one key present
142
144
  * text: { // GuardrailConverseTextBlock
@@ -177,6 +179,10 @@ declare const ConverseStreamCommand_base: {
177
179
  * },
178
180
  * ],
179
181
  * location: { // CitationLocation Union: only one key present
182
+ * web: { // WebLocation
183
+ * url: "STRING_VALUE",
184
+ * domain: "STRING_VALUE",
185
+ * },
180
186
  * documentChar: { // DocumentCharLocation
181
187
  * documentIndex: Number("int"),
182
188
  * start: Number("int"),
@@ -240,6 +246,9 @@ declare const ConverseStreamCommand_base: {
240
246
  * json: "DOCUMENT_VALUE",
241
247
  * },
242
248
  * },
249
+ * systemTool: { // SystemTool
250
+ * name: "STRING_VALUE", // required
251
+ * },
243
252
  * cachePoint: "<CachePointBlock>",
244
253
  * },
245
254
  * ],
@@ -285,6 +294,12 @@ declare const ConverseStreamCommand_base: {
285
294
  * // toolUse: { // ToolUseBlockStart
286
295
  * // toolUseId: "STRING_VALUE", // required
287
296
  * // name: "STRING_VALUE", // required
297
+ * // type: "server_tool_use",
298
+ * // },
299
+ * // toolResult: { // ToolResultBlockStart
300
+ * // toolUseId: "STRING_VALUE", // required
301
+ * // type: "STRING_VALUE",
302
+ * // status: "success" || "error",
288
303
  * // },
289
304
  * // },
290
305
  * // contentBlockIndex: Number("int"), // required
@@ -295,6 +310,11 @@ declare const ConverseStreamCommand_base: {
295
310
  * // toolUse: { // ToolUseBlockDelta
296
311
  * // input: "STRING_VALUE", // required
297
312
  * // },
313
+ * // toolResult: [ // ToolResultBlocksDelta
314
+ * // { // ToolResultBlockDelta Union: only one key present
315
+ * // text: "STRING_VALUE",
316
+ * // },
317
+ * // ],
298
318
  * // reasoningContent: { // ReasoningContentBlockDelta Union: only one key present
299
319
  * // text: "STRING_VALUE",
300
320
  * // redactedContent: new Uint8Array(),
@@ -308,6 +328,10 @@ declare const ConverseStreamCommand_base: {
308
328
  * // },
309
329
  * // ],
310
330
  * // location: { // CitationLocation Union: only one key present
331
+ * // web: { // WebLocation
332
+ * // url: "STRING_VALUE",
333
+ * // domain: "STRING_VALUE",
334
+ * // },
311
335
  * // documentChar: { // DocumentCharLocation
312
336
  * // documentIndex: Number("int"),
313
337
  * // start: Number("int"),
@@ -94,6 +94,7 @@ declare const CountTokensCommand_base: {
94
94
  * toolUseId: "STRING_VALUE", // required
95
95
  * name: "STRING_VALUE", // required
96
96
  * input: "DOCUMENT_VALUE", // required
97
+ * type: "server_tool_use",
97
98
  * },
98
99
  * toolResult: { // ToolResultBlock
99
100
  * toolUseId: "STRING_VALUE", // required
@@ -142,6 +143,7 @@ declare const CountTokensCommand_base: {
142
143
  * },
143
144
  * ],
144
145
  * status: "success" || "error",
146
+ * type: "STRING_VALUE",
145
147
  * },
146
148
  * guardContent: { // GuardrailConverseContentBlock Union: only one key present
147
149
  * text: { // GuardrailConverseTextBlock
@@ -182,6 +184,10 @@ declare const CountTokensCommand_base: {
182
184
  * },
183
185
  * ],
184
186
  * location: { // CitationLocation Union: only one key present
187
+ * web: { // WebLocation
188
+ * url: "STRING_VALUE",
189
+ * domain: "STRING_VALUE",
190
+ * },
185
191
  * documentChar: { // DocumentCharLocation
186
192
  * documentIndex: Number("int"),
187
193
  * start: Number("int"),