@aws-sdk/client-bedrock-runtime 3.919.0 → 3.920.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 +32 -0
- package/dist-es/models/models_0.js +21 -0
- package/dist-es/protocols/Aws_restJson1.js +10 -0
- package/dist-types/commands/ConverseCommand.d.ts +15 -0
- package/dist-types/commands/ConverseStreamCommand.d.ts +24 -0
- package/dist-types/commands/CountTokensCommand.d.ts +6 -0
- package/dist-types/models/models_0.d.ts +199 -35
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +85 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/package.json +16 -16
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"),
|
|
@@ -1391,7 +1391,7 @@ export interface GuardrailRegexFilter {
|
|
|
1391
1391
|
detected?: boolean | undefined;
|
|
1392
1392
|
}
|
|
1393
1393
|
/**
|
|
1394
|
-
* <p>The assessment for
|
|
1394
|
+
* <p>The assessment for a Personally Identifiable Information (PII) policy. </p>
|
|
1395
1395
|
* @public
|
|
1396
1396
|
*/
|
|
1397
1397
|
export interface GuardrailSensitiveInformationPolicyAssessment {
|
|
@@ -1784,20 +1784,48 @@ export interface DocumentPageLocation {
|
|
|
1784
1784
|
*/
|
|
1785
1785
|
end?: number | undefined;
|
|
1786
1786
|
}
|
|
1787
|
+
/**
|
|
1788
|
+
* <p>Provides the URL and domain information for the website that was cited when performing a web search.</p>
|
|
1789
|
+
* @public
|
|
1790
|
+
*/
|
|
1791
|
+
export interface WebLocation {
|
|
1792
|
+
/**
|
|
1793
|
+
* <p>The URL that was cited when performing a web search.</p>
|
|
1794
|
+
* @public
|
|
1795
|
+
*/
|
|
1796
|
+
url?: string | undefined;
|
|
1797
|
+
/**
|
|
1798
|
+
* <p>The domain that was cited when performing a web search.</p>
|
|
1799
|
+
* @public
|
|
1800
|
+
*/
|
|
1801
|
+
domain?: string | undefined;
|
|
1802
|
+
}
|
|
1787
1803
|
/**
|
|
1788
1804
|
* <p>Specifies the precise location within a source document where cited content can be found. This can include character-level positions, page numbers, or document chunks depending on the document type and indexing method.</p>
|
|
1789
1805
|
* @public
|
|
1790
1806
|
*/
|
|
1791
|
-
export type CitationLocation = CitationLocation.DocumentCharMember | CitationLocation.DocumentChunkMember | CitationLocation.DocumentPageMember | CitationLocation.$UnknownMember;
|
|
1807
|
+
export type CitationLocation = CitationLocation.DocumentCharMember | CitationLocation.DocumentChunkMember | CitationLocation.DocumentPageMember | CitationLocation.WebMember | CitationLocation.$UnknownMember;
|
|
1792
1808
|
/**
|
|
1793
1809
|
* @public
|
|
1794
1810
|
*/
|
|
1795
1811
|
export declare namespace CitationLocation {
|
|
1812
|
+
/**
|
|
1813
|
+
* <p>The web URL that was cited for this reference.</p>
|
|
1814
|
+
* @public
|
|
1815
|
+
*/
|
|
1816
|
+
interface WebMember {
|
|
1817
|
+
web: WebLocation;
|
|
1818
|
+
documentChar?: never;
|
|
1819
|
+
documentPage?: never;
|
|
1820
|
+
documentChunk?: never;
|
|
1821
|
+
$unknown?: never;
|
|
1822
|
+
}
|
|
1796
1823
|
/**
|
|
1797
1824
|
* <p>The character-level location within the document where the cited content is found.</p>
|
|
1798
1825
|
* @public
|
|
1799
1826
|
*/
|
|
1800
1827
|
interface DocumentCharMember {
|
|
1828
|
+
web?: never;
|
|
1801
1829
|
documentChar: DocumentCharLocation;
|
|
1802
1830
|
documentPage?: never;
|
|
1803
1831
|
documentChunk?: never;
|
|
@@ -1808,6 +1836,7 @@ export declare namespace CitationLocation {
|
|
|
1808
1836
|
* @public
|
|
1809
1837
|
*/
|
|
1810
1838
|
interface DocumentPageMember {
|
|
1839
|
+
web?: never;
|
|
1811
1840
|
documentChar?: never;
|
|
1812
1841
|
documentPage: DocumentPageLocation;
|
|
1813
1842
|
documentChunk?: never;
|
|
@@ -1818,6 +1847,7 @@ export declare namespace CitationLocation {
|
|
|
1818
1847
|
* @public
|
|
1819
1848
|
*/
|
|
1820
1849
|
interface DocumentChunkMember {
|
|
1850
|
+
web?: never;
|
|
1821
1851
|
documentChar?: never;
|
|
1822
1852
|
documentPage?: never;
|
|
1823
1853
|
documentChunk: DocumentChunkLocation;
|
|
@@ -1827,12 +1857,14 @@ export declare namespace CitationLocation {
|
|
|
1827
1857
|
* @public
|
|
1828
1858
|
*/
|
|
1829
1859
|
interface $UnknownMember {
|
|
1860
|
+
web?: never;
|
|
1830
1861
|
documentChar?: never;
|
|
1831
1862
|
documentPage?: never;
|
|
1832
1863
|
documentChunk?: never;
|
|
1833
1864
|
$unknown: [string, any];
|
|
1834
1865
|
}
|
|
1835
1866
|
interface Visitor<T> {
|
|
1867
|
+
web: (value: WebLocation) => T;
|
|
1836
1868
|
documentChar: (value: DocumentCharLocation) => T;
|
|
1837
1869
|
documentPage: (value: DocumentPageLocation) => T;
|
|
1838
1870
|
documentChunk: (value: DocumentChunkLocation) => T;
|
|
@@ -1943,7 +1975,7 @@ export interface CitationsContentBlock {
|
|
|
1943
1975
|
*/
|
|
1944
1976
|
export interface CitationsConfig {
|
|
1945
1977
|
/**
|
|
1946
|
-
* <p>Specifies whether document
|
|
1978
|
+
* <p>Specifies whether citations from the selected document should be used in the model's response. When set to true, the model can generate citations that reference the source documents used to inform the response.</p>
|
|
1947
1979
|
* @public
|
|
1948
1980
|
*/
|
|
1949
1981
|
enabled: boolean | undefined;
|
|
@@ -2188,7 +2220,7 @@ export declare const GuardrailConverseContentQualifier: {
|
|
|
2188
2220
|
*/
|
|
2189
2221
|
export type GuardrailConverseContentQualifier = (typeof GuardrailConverseContentQualifier)[keyof typeof GuardrailConverseContentQualifier];
|
|
2190
2222
|
/**
|
|
2191
|
-
* <p>A text block that contains text that you want to assess with a guardrail. For more information, see <a>GuardrailConverseContentBlock</a>.</p>
|
|
2223
|
+
* <p>A text block that contains text that you want to assess with a guardrail. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_GuardrailConverseContentBlock.html">GuardrailConverseContentBlock</a>.</p>
|
|
2192
2224
|
* @public
|
|
2193
2225
|
*/
|
|
2194
2226
|
export interface GuardrailConverseTextBlock {
|
|
@@ -2453,7 +2485,7 @@ export interface VideoBlock {
|
|
|
2453
2485
|
source: VideoSource | undefined;
|
|
2454
2486
|
}
|
|
2455
2487
|
/**
|
|
2456
|
-
* <p>The tool result content block.</p>
|
|
2488
|
+
* <p>The tool result content block. 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>
|
|
2457
2489
|
* @public
|
|
2458
2490
|
*/
|
|
2459
2491
|
export type ToolResultContentBlock = ToolResultContentBlock.DocumentMember | ToolResultContentBlock.ImageMember | ToolResultContentBlock.JsonMember | ToolResultContentBlock.TextMember | ToolResultContentBlock.VideoMember | ToolResultContentBlock.$UnknownMember;
|
|
@@ -2462,7 +2494,7 @@ export type ToolResultContentBlock = ToolResultContentBlock.DocumentMember | Too
|
|
|
2462
2494
|
*/
|
|
2463
2495
|
export declare namespace ToolResultContentBlock {
|
|
2464
2496
|
/**
|
|
2465
|
-
* <p>A tool result that is JSON format data
|
|
2497
|
+
* <p>A tool result that is JSON format data. </p>
|
|
2466
2498
|
* @public
|
|
2467
2499
|
*/
|
|
2468
2500
|
interface JsonMember {
|
|
@@ -2474,7 +2506,7 @@ export declare namespace ToolResultContentBlock {
|
|
|
2474
2506
|
$unknown?: never;
|
|
2475
2507
|
}
|
|
2476
2508
|
/**
|
|
2477
|
-
* <p>A tool result that is text
|
|
2509
|
+
* <p>A tool result that is text. </p>
|
|
2478
2510
|
* @public
|
|
2479
2511
|
*/
|
|
2480
2512
|
interface TextMember {
|
|
@@ -2486,7 +2518,7 @@ export declare namespace ToolResultContentBlock {
|
|
|
2486
2518
|
$unknown?: never;
|
|
2487
2519
|
}
|
|
2488
2520
|
/**
|
|
2489
|
-
* <p>A tool result that is an image
|
|
2521
|
+
* <p>A tool result that is an image. </p> <note> <p>This field is only supported by Amazon Nova and Anthropic Claude 3 and 4 models.</p> </note>
|
|
2490
2522
|
* @public
|
|
2491
2523
|
*/
|
|
2492
2524
|
interface ImageMember {
|
|
@@ -2555,12 +2587,12 @@ export declare const ToolResultStatus: {
|
|
|
2555
2587
|
*/
|
|
2556
2588
|
export type ToolResultStatus = (typeof ToolResultStatus)[keyof typeof ToolResultStatus];
|
|
2557
2589
|
/**
|
|
2558
|
-
* <p>A tool result block that contains the results for a tool request that the model previously made.</p>
|
|
2590
|
+
* <p>A tool result block that contains the results for a tool request that the model previously made. 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>
|
|
2559
2591
|
* @public
|
|
2560
2592
|
*/
|
|
2561
2593
|
export interface ToolResultBlock {
|
|
2562
2594
|
/**
|
|
2563
|
-
* <p>The ID of the tool request that this is the result for
|
|
2595
|
+
* <p>The ID of the tool request that this is the result for. </p>
|
|
2564
2596
|
* @public
|
|
2565
2597
|
*/
|
|
2566
2598
|
toolUseId: string | undefined;
|
|
@@ -2570,13 +2602,29 @@ export interface ToolResultBlock {
|
|
|
2570
2602
|
*/
|
|
2571
2603
|
content: ToolResultContentBlock[] | undefined;
|
|
2572
2604
|
/**
|
|
2573
|
-
* <p>The status for the tool result content block.</p> <note> <p>This field is only supported Anthropic Claude 3 models.</p> </note>
|
|
2605
|
+
* <p>The status for the tool result content block.</p> <note> <p>This field is only supported by Amazon Nova and Anthropic Claude 3 and 4 models.</p> </note>
|
|
2574
2606
|
* @public
|
|
2575
2607
|
*/
|
|
2576
2608
|
status?: ToolResultStatus | undefined;
|
|
2609
|
+
/**
|
|
2610
|
+
* <p>The type for the tool result content block.</p>
|
|
2611
|
+
* @public
|
|
2612
|
+
*/
|
|
2613
|
+
type?: string | undefined;
|
|
2577
2614
|
}
|
|
2578
2615
|
/**
|
|
2579
|
-
*
|
|
2616
|
+
* @public
|
|
2617
|
+
* @enum
|
|
2618
|
+
*/
|
|
2619
|
+
export declare const ToolUseType: {
|
|
2620
|
+
readonly SERVER_TOOL_USE: "server_tool_use";
|
|
2621
|
+
};
|
|
2622
|
+
/**
|
|
2623
|
+
* @public
|
|
2624
|
+
*/
|
|
2625
|
+
export type ToolUseType = (typeof ToolUseType)[keyof typeof ToolUseType];
|
|
2626
|
+
/**
|
|
2627
|
+
* <p>A tool use content block. Contains information about a tool that the model is requesting be run., The model uses the result from the tool to generate a response. 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>
|
|
2580
2628
|
* @public
|
|
2581
2629
|
*/
|
|
2582
2630
|
export interface ToolUseBlock {
|
|
@@ -2595,6 +2643,11 @@ export interface ToolUseBlock {
|
|
|
2595
2643
|
* @public
|
|
2596
2644
|
*/
|
|
2597
2645
|
input: __DocumentType | undefined;
|
|
2646
|
+
/**
|
|
2647
|
+
* <p>The type for the tool request.</p>
|
|
2648
|
+
* @public
|
|
2649
|
+
*/
|
|
2650
|
+
type?: ToolUseType | undefined;
|
|
2598
2651
|
}
|
|
2599
2652
|
/**
|
|
2600
2653
|
* <p>A block of content for a message that you pass to, or receive from, a model with the <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> API operations.</p>
|
|
@@ -2708,7 +2761,7 @@ export declare namespace ContentBlock {
|
|
|
2708
2761
|
$unknown?: never;
|
|
2709
2762
|
}
|
|
2710
2763
|
/**
|
|
2711
|
-
* <p>Contains the content to assess with the guardrail. If you don't specify <code>guardContent</code> in a call to the Converse API, the guardrail (if passed in the Converse API) assesses the entire message.</p> <p>For more information, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i
|
|
2764
|
+
* <p>Contains the content to assess with the guardrail. If you don't specify <code>guardContent</code> in a call to the Converse API, the guardrail (if passed in the Converse API) assesses the entire message.</p> <p>For more information, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.</p>
|
|
2712
2765
|
* @public
|
|
2713
2766
|
*/
|
|
2714
2767
|
interface GuardContentMember {
|
|
@@ -2888,7 +2941,7 @@ export declare namespace PromptVariableValues {
|
|
|
2888
2941
|
const visit: <T>(value: PromptVariableValues, visitor: Visitor<T>) => T;
|
|
2889
2942
|
}
|
|
2890
2943
|
/**
|
|
2891
|
-
* <p>
|
|
2944
|
+
* <p>Contains configurations for instructions to provide the model for how to handle input. To learn more, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference-call.html">Using the Converse API</a>.</p>
|
|
2892
2945
|
* @public
|
|
2893
2946
|
*/
|
|
2894
2947
|
export type SystemContentBlock = SystemContentBlock.CachePointMember | SystemContentBlock.GuardContentMember | SystemContentBlock.TextMember | SystemContentBlock.$UnknownMember;
|
|
@@ -2944,19 +2997,19 @@ export declare namespace SystemContentBlock {
|
|
|
2944
2997
|
const visit: <T>(value: SystemContentBlock, visitor: Visitor<T>) => T;
|
|
2945
2998
|
}
|
|
2946
2999
|
/**
|
|
2947
|
-
* <p>The model must request at least one tool (no text is generated). For example, <code>\{"any" : \{\}\}</code
|
|
3000
|
+
* <p>The model must request at least one tool (no text is generated). For example, <code>\{"any" : \{\}\}</code>. 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>
|
|
2948
3001
|
* @public
|
|
2949
3002
|
*/
|
|
2950
3003
|
export interface AnyToolChoice {
|
|
2951
3004
|
}
|
|
2952
3005
|
/**
|
|
2953
|
-
* <p>The Model automatically decides if a tool should be called or whether to generate text instead. For example, <code>\{"auto" : \{\}\}</code
|
|
3006
|
+
* <p>The Model automatically decides if a tool should be called or whether to generate text instead. For example, <code>\{"auto" : \{\}\}</code>. 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>
|
|
2954
3007
|
* @public
|
|
2955
3008
|
*/
|
|
2956
3009
|
export interface AutoToolChoice {
|
|
2957
3010
|
}
|
|
2958
3011
|
/**
|
|
2959
|
-
* <p>The model must request a specific tool. For example, <code>\{"tool" : \{"name" : "Your tool name"\}\}</code
|
|
3012
|
+
* <p>The model must request a specific tool. For example, <code>\{"tool" : \{"name" : "Your tool name"\}\}</code>. 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> <note> <p>This field is only supported by Anthropic Claude 3 models.</p> </note>
|
|
2960
3013
|
* @public
|
|
2961
3014
|
*/
|
|
2962
3015
|
export interface SpecificToolChoice {
|
|
@@ -2967,7 +3020,7 @@ export interface SpecificToolChoice {
|
|
|
2967
3020
|
name: string | undefined;
|
|
2968
3021
|
}
|
|
2969
3022
|
/**
|
|
2970
|
-
* <p>Determines which tools the model should request in a call to <code>Converse</code> or <code>ConverseStream</code>. <
|
|
3023
|
+
* <p>Determines which tools the model should request in a call to <code>Converse</code> or <code>ConverseStream</code>. 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>
|
|
2971
3024
|
* @public
|
|
2972
3025
|
*/
|
|
2973
3026
|
export type ToolChoice = ToolChoice.AnyMember | ToolChoice.AutoMember | ToolChoice.ToolMember | ToolChoice.$UnknownMember;
|
|
@@ -2996,7 +3049,7 @@ export declare namespace ToolChoice {
|
|
|
2996
3049
|
$unknown?: never;
|
|
2997
3050
|
}
|
|
2998
3051
|
/**
|
|
2999
|
-
* <p>The Model must request the specified tool. Only supported by Anthropic Claude 3 models. </p>
|
|
3052
|
+
* <p>The Model must request the specified tool. Only supported by Anthropic Claude 3 and Amazon Nova models. </p>
|
|
3000
3053
|
* @public
|
|
3001
3054
|
*/
|
|
3002
3055
|
interface ToolMember {
|
|
@@ -3023,7 +3076,18 @@ export declare namespace ToolChoice {
|
|
|
3023
3076
|
const visit: <T>(value: ToolChoice, visitor: Visitor<T>) => T;
|
|
3024
3077
|
}
|
|
3025
3078
|
/**
|
|
3026
|
-
* <p>
|
|
3079
|
+
* <p>Specifies a system-defined tool for the model to use. <i>System-defined tools</i> are tools that are created and provided by the model provider.</p>
|
|
3080
|
+
* @public
|
|
3081
|
+
*/
|
|
3082
|
+
export interface SystemTool {
|
|
3083
|
+
/**
|
|
3084
|
+
* <p>The name of the system-defined tool that you want to call. </p>
|
|
3085
|
+
* @public
|
|
3086
|
+
*/
|
|
3087
|
+
name: string | undefined;
|
|
3088
|
+
}
|
|
3089
|
+
/**
|
|
3090
|
+
* <p>The schema for the tool. The top level schema type must be <code>object</code>. 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>
|
|
3027
3091
|
* @public
|
|
3028
3092
|
*/
|
|
3029
3093
|
export type ToolInputSchema = ToolInputSchema.JsonMember | ToolInputSchema.$UnknownMember;
|
|
@@ -3053,7 +3117,7 @@ export declare namespace ToolInputSchema {
|
|
|
3053
3117
|
const visit: <T>(value: ToolInputSchema, visitor: Visitor<T>) => T;
|
|
3054
3118
|
}
|
|
3055
3119
|
/**
|
|
3056
|
-
* <p>The specification for the tool.</p>
|
|
3120
|
+
* <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>
|
|
3057
3121
|
* @public
|
|
3058
3122
|
*/
|
|
3059
3123
|
export interface ToolSpecification {
|
|
@@ -3074,20 +3138,31 @@ export interface ToolSpecification {
|
|
|
3074
3138
|
inputSchema: ToolInputSchema | undefined;
|
|
3075
3139
|
}
|
|
3076
3140
|
/**
|
|
3077
|
-
* <p>Information about a tool that you can use with the Converse API. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">
|
|
3141
|
+
* <p>Information about a tool that you can use with the Converse API. 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>
|
|
3078
3142
|
* @public
|
|
3079
3143
|
*/
|
|
3080
|
-
export type Tool = Tool.CachePointMember | Tool.ToolSpecMember | Tool.$UnknownMember;
|
|
3144
|
+
export type Tool = Tool.CachePointMember | Tool.SystemToolMember | Tool.ToolSpecMember | Tool.$UnknownMember;
|
|
3081
3145
|
/**
|
|
3082
3146
|
* @public
|
|
3083
3147
|
*/
|
|
3084
3148
|
export declare namespace Tool {
|
|
3085
3149
|
/**
|
|
3086
|
-
* <p>The specfication for the tool
|
|
3150
|
+
* <p>The specfication for the tool. </p>
|
|
3087
3151
|
* @public
|
|
3088
3152
|
*/
|
|
3089
3153
|
interface ToolSpecMember {
|
|
3090
3154
|
toolSpec: ToolSpecification;
|
|
3155
|
+
systemTool?: never;
|
|
3156
|
+
cachePoint?: never;
|
|
3157
|
+
$unknown?: never;
|
|
3158
|
+
}
|
|
3159
|
+
/**
|
|
3160
|
+
* <p>Specifies the system-defined tool that you want use.</p>
|
|
3161
|
+
* @public
|
|
3162
|
+
*/
|
|
3163
|
+
interface SystemToolMember {
|
|
3164
|
+
toolSpec?: never;
|
|
3165
|
+
systemTool: SystemTool;
|
|
3091
3166
|
cachePoint?: never;
|
|
3092
3167
|
$unknown?: never;
|
|
3093
3168
|
}
|
|
@@ -3097,6 +3172,7 @@ export declare namespace Tool {
|
|
|
3097
3172
|
*/
|
|
3098
3173
|
interface CachePointMember {
|
|
3099
3174
|
toolSpec?: never;
|
|
3175
|
+
systemTool?: never;
|
|
3100
3176
|
cachePoint: CachePointBlock;
|
|
3101
3177
|
$unknown?: never;
|
|
3102
3178
|
}
|
|
@@ -3105,11 +3181,13 @@ export declare namespace Tool {
|
|
|
3105
3181
|
*/
|
|
3106
3182
|
interface $UnknownMember {
|
|
3107
3183
|
toolSpec?: never;
|
|
3184
|
+
systemTool?: never;
|
|
3108
3185
|
cachePoint?: never;
|
|
3109
3186
|
$unknown: [string, any];
|
|
3110
3187
|
}
|
|
3111
3188
|
interface Visitor<T> {
|
|
3112
3189
|
toolSpec: (value: ToolSpecification) => T;
|
|
3190
|
+
systemTool: (value: SystemTool) => T;
|
|
3113
3191
|
cachePoint: (value: CachePointBlock) => T;
|
|
3114
3192
|
_: (name: string, value: any) => T;
|
|
3115
3193
|
}
|
|
@@ -3121,12 +3199,12 @@ export declare namespace Tool {
|
|
|
3121
3199
|
*/
|
|
3122
3200
|
export interface ToolConfiguration {
|
|
3123
3201
|
/**
|
|
3124
|
-
* <p>An array of tools that you want to pass to a model
|
|
3202
|
+
* <p>An array of tools that you want to pass to a model. </p>
|
|
3125
3203
|
* @public
|
|
3126
3204
|
*/
|
|
3127
3205
|
tools: Tool[] | undefined;
|
|
3128
3206
|
/**
|
|
3129
|
-
* <p>If supported by model, forces the model to request a tool
|
|
3207
|
+
* <p>If supported by model, forces the model to request a tool. </p>
|
|
3130
3208
|
* @public
|
|
3131
3209
|
*/
|
|
3132
3210
|
toolChoice?: ToolChoice | undefined;
|
|
@@ -3250,7 +3328,7 @@ export declare const StopReason: {
|
|
|
3250
3328
|
*/
|
|
3251
3329
|
export type StopReason = (typeof StopReason)[keyof typeof StopReason];
|
|
3252
3330
|
/**
|
|
3253
|
-
* <p>A Top level guardrail trace object. For more information, see <a>ConverseTrace</a>.</p>
|
|
3331
|
+
* <p>A Top level guardrail trace object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseTrace.html">ConverseTrace</a>.</p>
|
|
3254
3332
|
* @public
|
|
3255
3333
|
*/
|
|
3256
3334
|
export interface GuardrailTraceAssessment {
|
|
@@ -3287,7 +3365,7 @@ export interface PromptRouterTrace {
|
|
|
3287
3365
|
invokedModelId?: string | undefined;
|
|
3288
3366
|
}
|
|
3289
3367
|
/**
|
|
3290
|
-
* <p>The trace object in a response from <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a
|
|
3368
|
+
* <p>The trace object in a response from <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a>.</p>
|
|
3291
3369
|
* @public
|
|
3292
3370
|
*/
|
|
3293
3371
|
export interface ConverseTrace {
|
|
@@ -3433,7 +3511,7 @@ export declare const GuardrailStreamProcessingMode: {
|
|
|
3433
3511
|
*/
|
|
3434
3512
|
export type GuardrailStreamProcessingMode = (typeof GuardrailStreamProcessingMode)[keyof typeof GuardrailStreamProcessingMode];
|
|
3435
3513
|
/**
|
|
3436
|
-
* <p>Configuration information for a guardrail that you use with the <a>ConverseStream</a> action. </p>
|
|
3514
|
+
* <p>Configuration information for a guardrail that you use with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a> action. </p>
|
|
3437
3515
|
* @public
|
|
3438
3516
|
*/
|
|
3439
3517
|
export interface GuardrailStreamConfiguration {
|
|
@@ -3606,6 +3684,36 @@ export declare namespace ReasoningContentBlockDelta {
|
|
|
3606
3684
|
}
|
|
3607
3685
|
const visit: <T>(value: ReasoningContentBlockDelta, visitor: Visitor<T>) => T;
|
|
3608
3686
|
}
|
|
3687
|
+
/**
|
|
3688
|
+
* <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>
|
|
3689
|
+
* @public
|
|
3690
|
+
*/
|
|
3691
|
+
export type ToolResultBlockDelta = ToolResultBlockDelta.TextMember | ToolResultBlockDelta.$UnknownMember;
|
|
3692
|
+
/**
|
|
3693
|
+
* @public
|
|
3694
|
+
*/
|
|
3695
|
+
export declare namespace ToolResultBlockDelta {
|
|
3696
|
+
/**
|
|
3697
|
+
* <p>The reasoning the model used to return the output.</p>
|
|
3698
|
+
* @public
|
|
3699
|
+
*/
|
|
3700
|
+
interface TextMember {
|
|
3701
|
+
text: string;
|
|
3702
|
+
$unknown?: never;
|
|
3703
|
+
}
|
|
3704
|
+
/**
|
|
3705
|
+
* @public
|
|
3706
|
+
*/
|
|
3707
|
+
interface $UnknownMember {
|
|
3708
|
+
text?: never;
|
|
3709
|
+
$unknown: [string, any];
|
|
3710
|
+
}
|
|
3711
|
+
interface Visitor<T> {
|
|
3712
|
+
text: (value: string) => T;
|
|
3713
|
+
_: (name: string, value: any) => T;
|
|
3714
|
+
}
|
|
3715
|
+
const visit: <T>(value: ToolResultBlockDelta, visitor: Visitor<T>) => T;
|
|
3716
|
+
}
|
|
3609
3717
|
/**
|
|
3610
3718
|
* <p>The delta for a tool use block.</p>
|
|
3611
3719
|
* @public
|
|
@@ -3621,7 +3729,7 @@ export interface ToolUseBlockDelta {
|
|
|
3621
3729
|
* <p>A block of content in a streaming response.</p>
|
|
3622
3730
|
* @public
|
|
3623
3731
|
*/
|
|
3624
|
-
export type ContentBlockDelta = ContentBlockDelta.CitationMember | ContentBlockDelta.ReasoningContentMember | ContentBlockDelta.TextMember | ContentBlockDelta.ToolUseMember | ContentBlockDelta.$UnknownMember;
|
|
3732
|
+
export type ContentBlockDelta = ContentBlockDelta.CitationMember | ContentBlockDelta.ReasoningContentMember | ContentBlockDelta.TextMember | ContentBlockDelta.ToolResultMember | ContentBlockDelta.ToolUseMember | ContentBlockDelta.$UnknownMember;
|
|
3625
3733
|
/**
|
|
3626
3734
|
* @public
|
|
3627
3735
|
*/
|
|
@@ -3633,6 +3741,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3633
3741
|
interface TextMember {
|
|
3634
3742
|
text: string;
|
|
3635
3743
|
toolUse?: never;
|
|
3744
|
+
toolResult?: never;
|
|
3636
3745
|
reasoningContent?: never;
|
|
3637
3746
|
citation?: never;
|
|
3638
3747
|
$unknown?: never;
|
|
@@ -3644,6 +3753,19 @@ export declare namespace ContentBlockDelta {
|
|
|
3644
3753
|
interface ToolUseMember {
|
|
3645
3754
|
text?: never;
|
|
3646
3755
|
toolUse: ToolUseBlockDelta;
|
|
3756
|
+
toolResult?: never;
|
|
3757
|
+
reasoningContent?: never;
|
|
3758
|
+
citation?: never;
|
|
3759
|
+
$unknown?: never;
|
|
3760
|
+
}
|
|
3761
|
+
/**
|
|
3762
|
+
* <p>An incremental update that contains the results from a tool call.</p>
|
|
3763
|
+
* @public
|
|
3764
|
+
*/
|
|
3765
|
+
interface ToolResultMember {
|
|
3766
|
+
text?: never;
|
|
3767
|
+
toolUse?: never;
|
|
3768
|
+
toolResult: ToolResultBlockDelta[];
|
|
3647
3769
|
reasoningContent?: never;
|
|
3648
3770
|
citation?: never;
|
|
3649
3771
|
$unknown?: never;
|
|
@@ -3655,6 +3777,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3655
3777
|
interface ReasoningContentMember {
|
|
3656
3778
|
text?: never;
|
|
3657
3779
|
toolUse?: never;
|
|
3780
|
+
toolResult?: never;
|
|
3658
3781
|
reasoningContent: ReasoningContentBlockDelta;
|
|
3659
3782
|
citation?: never;
|
|
3660
3783
|
$unknown?: never;
|
|
@@ -3666,6 +3789,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3666
3789
|
interface CitationMember {
|
|
3667
3790
|
text?: never;
|
|
3668
3791
|
toolUse?: never;
|
|
3792
|
+
toolResult?: never;
|
|
3669
3793
|
reasoningContent?: never;
|
|
3670
3794
|
citation: CitationsDelta;
|
|
3671
3795
|
$unknown?: never;
|
|
@@ -3676,6 +3800,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3676
3800
|
interface $UnknownMember {
|
|
3677
3801
|
text?: never;
|
|
3678
3802
|
toolUse?: never;
|
|
3803
|
+
toolResult?: never;
|
|
3679
3804
|
reasoningContent?: never;
|
|
3680
3805
|
citation?: never;
|
|
3681
3806
|
$unknown: [string, any];
|
|
@@ -3683,6 +3808,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3683
3808
|
interface Visitor<T> {
|
|
3684
3809
|
text: (value: string) => T;
|
|
3685
3810
|
toolUse: (value: ToolUseBlockDelta) => T;
|
|
3811
|
+
toolResult: (value: ToolResultBlockDelta[]) => T;
|
|
3686
3812
|
reasoningContent: (value: ReasoningContentBlockDelta) => T;
|
|
3687
3813
|
citation: (value: CitationsDelta) => T;
|
|
3688
3814
|
_: (name: string, value: any) => T;
|
|
@@ -3706,7 +3832,28 @@ export interface ContentBlockDeltaEvent {
|
|
|
3706
3832
|
contentBlockIndex: number | undefined;
|
|
3707
3833
|
}
|
|
3708
3834
|
/**
|
|
3709
|
-
* <p>The start of a tool use
|
|
3835
|
+
* <p>The start of a tool result block. 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>
|
|
3836
|
+
* @public
|
|
3837
|
+
*/
|
|
3838
|
+
export interface ToolResultBlockStart {
|
|
3839
|
+
/**
|
|
3840
|
+
* <p>The ID of the tool that was used to generate this tool result block.</p>
|
|
3841
|
+
* @public
|
|
3842
|
+
*/
|
|
3843
|
+
toolUseId: string | undefined;
|
|
3844
|
+
/**
|
|
3845
|
+
* <p>The type for the tool that was used to generate this tool result block.</p>
|
|
3846
|
+
* @public
|
|
3847
|
+
*/
|
|
3848
|
+
type?: string | undefined;
|
|
3849
|
+
/**
|
|
3850
|
+
* <p>The status of the tool result block.</p>
|
|
3851
|
+
* @public
|
|
3852
|
+
*/
|
|
3853
|
+
status?: ToolResultStatus | undefined;
|
|
3854
|
+
}
|
|
3855
|
+
/**
|
|
3856
|
+
* <p>The start of a tool use block. 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>
|
|
3710
3857
|
* @public
|
|
3711
3858
|
*/
|
|
3712
3859
|
export interface ToolUseBlockStart {
|
|
@@ -3720,12 +3867,17 @@ export interface ToolUseBlockStart {
|
|
|
3720
3867
|
* @public
|
|
3721
3868
|
*/
|
|
3722
3869
|
name: string | undefined;
|
|
3870
|
+
/**
|
|
3871
|
+
* <p>The type for the tool request.</p>
|
|
3872
|
+
* @public
|
|
3873
|
+
*/
|
|
3874
|
+
type?: ToolUseType | undefined;
|
|
3723
3875
|
}
|
|
3724
3876
|
/**
|
|
3725
3877
|
* <p>Content block start information.</p>
|
|
3726
3878
|
* @public
|
|
3727
3879
|
*/
|
|
3728
|
-
export type ContentBlockStart = ContentBlockStart.ToolUseMember | ContentBlockStart.$UnknownMember;
|
|
3880
|
+
export type ContentBlockStart = ContentBlockStart.ToolResultMember | ContentBlockStart.ToolUseMember | ContentBlockStart.$UnknownMember;
|
|
3729
3881
|
/**
|
|
3730
3882
|
* @public
|
|
3731
3883
|
*/
|
|
@@ -3736,6 +3888,16 @@ export declare namespace ContentBlockStart {
|
|
|
3736
3888
|
*/
|
|
3737
3889
|
interface ToolUseMember {
|
|
3738
3890
|
toolUse: ToolUseBlockStart;
|
|
3891
|
+
toolResult?: never;
|
|
3892
|
+
$unknown?: never;
|
|
3893
|
+
}
|
|
3894
|
+
/**
|
|
3895
|
+
* <p>The </p>
|
|
3896
|
+
* @public
|
|
3897
|
+
*/
|
|
3898
|
+
interface ToolResultMember {
|
|
3899
|
+
toolUse?: never;
|
|
3900
|
+
toolResult: ToolResultBlockStart;
|
|
3739
3901
|
$unknown?: never;
|
|
3740
3902
|
}
|
|
3741
3903
|
/**
|
|
@@ -3743,10 +3905,12 @@ export declare namespace ContentBlockStart {
|
|
|
3743
3905
|
*/
|
|
3744
3906
|
interface $UnknownMember {
|
|
3745
3907
|
toolUse?: never;
|
|
3908
|
+
toolResult?: never;
|
|
3746
3909
|
$unknown: [string, any];
|
|
3747
3910
|
}
|
|
3748
3911
|
interface Visitor<T> {
|
|
3749
3912
|
toolUse: (value: ToolUseBlockStart) => T;
|
|
3913
|
+
toolResult: (value: ToolResultBlockStart) => T;
|
|
3750
3914
|
_: (name: string, value: any) => T;
|
|
3751
3915
|
}
|
|
3752
3916
|
const visit: <T>(value: ContentBlockStart, visitor: Visitor<T>) => T;
|
|
@@ -3817,7 +3981,7 @@ export interface ConverseStreamMetrics {
|
|
|
3817
3981
|
latencyMs: number | undefined;
|
|
3818
3982
|
}
|
|
3819
3983
|
/**
|
|
3820
|
-
* <p>The trace object in a response from <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a
|
|
3984
|
+
* <p>The trace object in a response from <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>.</p>
|
|
3821
3985
|
* @public
|
|
3822
3986
|
*/
|
|
3823
3987
|
export interface ConverseStreamTrace {
|
|
@@ -4034,7 +4198,7 @@ export declare namespace ConverseStreamOutput {
|
|
|
4034
4198
|
$unknown?: never;
|
|
4035
4199
|
}
|
|
4036
4200
|
/**
|
|
4037
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide
|
|
4201
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide.</p>
|
|
4038
4202
|
* @public
|
|
4039
4203
|
*/
|
|
4040
4204
|
interface ValidationExceptionMember {
|
|
@@ -4052,7 +4216,7 @@ export declare namespace ConverseStreamOutput {
|
|
|
4052
4216
|
$unknown?: never;
|
|
4053
4217
|
}
|
|
4054
4218
|
/**
|
|
4055
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide
|
|
4219
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide.</p>
|
|
4056
4220
|
* @public
|
|
4057
4221
|
*/
|
|
4058
4222
|
interface ThrottlingExceptionMember {
|
|
@@ -11,7 +11,7 @@ export declare const getRuntimeConfig: (config: BedrockRuntimeClientConfig) => {
|
|
|
11
11
|
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
|
|
12
12
|
authSchemePreference: string[] | import("@smithy/types").Provider<string[]>;
|
|
13
13
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
14
|
-
credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit) => import("@
|
|
14
|
+
credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit) => import("@aws-sdk/credential-provider-node/dist-types/runtime/memoize-chain").MemoizedRuntimeConfigAwsCredentialIdentityProvider);
|
|
15
15
|
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
|
|
16
16
|
eventStreamPayloadHandlerProvider: import("@smithy/types").EventStreamPayloadHandlerProvider;
|
|
17
17
|
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|
|
@@ -684,37 +684,54 @@ export interface DocumentPageLocation {
|
|
|
684
684
|
start?: number | undefined;
|
|
685
685
|
end?: number | undefined;
|
|
686
686
|
}
|
|
687
|
+
export interface WebLocation {
|
|
688
|
+
url?: string | undefined;
|
|
689
|
+
domain?: string | undefined;
|
|
690
|
+
}
|
|
687
691
|
export type CitationLocation =
|
|
688
692
|
| CitationLocation.DocumentCharMember
|
|
689
693
|
| CitationLocation.DocumentChunkMember
|
|
690
694
|
| CitationLocation.DocumentPageMember
|
|
695
|
+
| CitationLocation.WebMember
|
|
691
696
|
| CitationLocation.$UnknownMember;
|
|
692
697
|
export declare namespace CitationLocation {
|
|
698
|
+
interface WebMember {
|
|
699
|
+
web: WebLocation;
|
|
700
|
+
documentChar?: never;
|
|
701
|
+
documentPage?: never;
|
|
702
|
+
documentChunk?: never;
|
|
703
|
+
$unknown?: never;
|
|
704
|
+
}
|
|
693
705
|
interface DocumentCharMember {
|
|
706
|
+
web?: never;
|
|
694
707
|
documentChar: DocumentCharLocation;
|
|
695
708
|
documentPage?: never;
|
|
696
709
|
documentChunk?: never;
|
|
697
710
|
$unknown?: never;
|
|
698
711
|
}
|
|
699
712
|
interface DocumentPageMember {
|
|
713
|
+
web?: never;
|
|
700
714
|
documentChar?: never;
|
|
701
715
|
documentPage: DocumentPageLocation;
|
|
702
716
|
documentChunk?: never;
|
|
703
717
|
$unknown?: never;
|
|
704
718
|
}
|
|
705
719
|
interface DocumentChunkMember {
|
|
720
|
+
web?: never;
|
|
706
721
|
documentChar?: never;
|
|
707
722
|
documentPage?: never;
|
|
708
723
|
documentChunk: DocumentChunkLocation;
|
|
709
724
|
$unknown?: never;
|
|
710
725
|
}
|
|
711
726
|
interface $UnknownMember {
|
|
727
|
+
web?: never;
|
|
712
728
|
documentChar?: never;
|
|
713
729
|
documentPage?: never;
|
|
714
730
|
documentChunk?: never;
|
|
715
731
|
$unknown: [string, any];
|
|
716
732
|
}
|
|
717
733
|
interface Visitor<T> {
|
|
734
|
+
web: (value: WebLocation) => T;
|
|
718
735
|
documentChar: (value: DocumentCharLocation) => T;
|
|
719
736
|
documentPage: (value: DocumentPageLocation) => T;
|
|
720
737
|
documentChunk: (value: DocumentChunkLocation) => T;
|
|
@@ -1123,11 +1140,17 @@ export interface ToolResultBlock {
|
|
|
1123
1140
|
toolUseId: string | undefined;
|
|
1124
1141
|
content: ToolResultContentBlock[] | undefined;
|
|
1125
1142
|
status?: ToolResultStatus | undefined;
|
|
1143
|
+
type?: string | undefined;
|
|
1126
1144
|
}
|
|
1145
|
+
export declare const ToolUseType: {
|
|
1146
|
+
readonly SERVER_TOOL_USE: "server_tool_use";
|
|
1147
|
+
};
|
|
1148
|
+
export type ToolUseType = (typeof ToolUseType)[keyof typeof ToolUseType];
|
|
1127
1149
|
export interface ToolUseBlock {
|
|
1128
1150
|
toolUseId: string | undefined;
|
|
1129
1151
|
name: string | undefined;
|
|
1130
1152
|
input: __DocumentType | undefined;
|
|
1153
|
+
type?: ToolUseType | undefined;
|
|
1131
1154
|
}
|
|
1132
1155
|
export type ContentBlock =
|
|
1133
1156
|
| ContentBlock.CachePointMember
|
|
@@ -1418,6 +1441,9 @@ export declare namespace ToolChoice {
|
|
|
1418
1441
|
}
|
|
1419
1442
|
const visit: <T>(value: ToolChoice, visitor: Visitor<T>) => T;
|
|
1420
1443
|
}
|
|
1444
|
+
export interface SystemTool {
|
|
1445
|
+
name: string | undefined;
|
|
1446
|
+
}
|
|
1421
1447
|
export type ToolInputSchema =
|
|
1422
1448
|
| ToolInputSchema.JsonMember
|
|
1423
1449
|
| ToolInputSchema.$UnknownMember;
|
|
@@ -1443,26 +1469,37 @@ export interface ToolSpecification {
|
|
|
1443
1469
|
}
|
|
1444
1470
|
export type Tool =
|
|
1445
1471
|
| Tool.CachePointMember
|
|
1472
|
+
| Tool.SystemToolMember
|
|
1446
1473
|
| Tool.ToolSpecMember
|
|
1447
1474
|
| Tool.$UnknownMember;
|
|
1448
1475
|
export declare namespace Tool {
|
|
1449
1476
|
interface ToolSpecMember {
|
|
1450
1477
|
toolSpec: ToolSpecification;
|
|
1478
|
+
systemTool?: never;
|
|
1479
|
+
cachePoint?: never;
|
|
1480
|
+
$unknown?: never;
|
|
1481
|
+
}
|
|
1482
|
+
interface SystemToolMember {
|
|
1483
|
+
toolSpec?: never;
|
|
1484
|
+
systemTool: SystemTool;
|
|
1451
1485
|
cachePoint?: never;
|
|
1452
1486
|
$unknown?: never;
|
|
1453
1487
|
}
|
|
1454
1488
|
interface CachePointMember {
|
|
1455
1489
|
toolSpec?: never;
|
|
1490
|
+
systemTool?: never;
|
|
1456
1491
|
cachePoint: CachePointBlock;
|
|
1457
1492
|
$unknown?: never;
|
|
1458
1493
|
}
|
|
1459
1494
|
interface $UnknownMember {
|
|
1460
1495
|
toolSpec?: never;
|
|
1496
|
+
systemTool?: never;
|
|
1461
1497
|
cachePoint?: never;
|
|
1462
1498
|
$unknown: [string, any];
|
|
1463
1499
|
}
|
|
1464
1500
|
interface Visitor<T> {
|
|
1465
1501
|
toolSpec: (value: ToolSpecification) => T;
|
|
1502
|
+
systemTool: (value: SystemTool) => T;
|
|
1466
1503
|
cachePoint: (value: CachePointBlock) => T;
|
|
1467
1504
|
_: (name: string, value: any) => T;
|
|
1468
1505
|
}
|
|
@@ -1640,6 +1677,24 @@ export declare namespace ReasoningContentBlockDelta {
|
|
|
1640
1677
|
}
|
|
1641
1678
|
const visit: <T>(value: ReasoningContentBlockDelta, visitor: Visitor<T>) => T;
|
|
1642
1679
|
}
|
|
1680
|
+
export type ToolResultBlockDelta =
|
|
1681
|
+
| ToolResultBlockDelta.TextMember
|
|
1682
|
+
| ToolResultBlockDelta.$UnknownMember;
|
|
1683
|
+
export declare namespace ToolResultBlockDelta {
|
|
1684
|
+
interface TextMember {
|
|
1685
|
+
text: string;
|
|
1686
|
+
$unknown?: never;
|
|
1687
|
+
}
|
|
1688
|
+
interface $UnknownMember {
|
|
1689
|
+
text?: never;
|
|
1690
|
+
$unknown: [string, any];
|
|
1691
|
+
}
|
|
1692
|
+
interface Visitor<T> {
|
|
1693
|
+
text: (value: string) => T;
|
|
1694
|
+
_: (name: string, value: any) => T;
|
|
1695
|
+
}
|
|
1696
|
+
const visit: <T>(value: ToolResultBlockDelta, visitor: Visitor<T>) => T;
|
|
1697
|
+
}
|
|
1643
1698
|
export interface ToolUseBlockDelta {
|
|
1644
1699
|
input: string | undefined;
|
|
1645
1700
|
}
|
|
@@ -1647,12 +1702,14 @@ export type ContentBlockDelta =
|
|
|
1647
1702
|
| ContentBlockDelta.CitationMember
|
|
1648
1703
|
| ContentBlockDelta.ReasoningContentMember
|
|
1649
1704
|
| ContentBlockDelta.TextMember
|
|
1705
|
+
| ContentBlockDelta.ToolResultMember
|
|
1650
1706
|
| ContentBlockDelta.ToolUseMember
|
|
1651
1707
|
| ContentBlockDelta.$UnknownMember;
|
|
1652
1708
|
export declare namespace ContentBlockDelta {
|
|
1653
1709
|
interface TextMember {
|
|
1654
1710
|
text: string;
|
|
1655
1711
|
toolUse?: never;
|
|
1712
|
+
toolResult?: never;
|
|
1656
1713
|
reasoningContent?: never;
|
|
1657
1714
|
citation?: never;
|
|
1658
1715
|
$unknown?: never;
|
|
@@ -1660,6 +1717,15 @@ export declare namespace ContentBlockDelta {
|
|
|
1660
1717
|
interface ToolUseMember {
|
|
1661
1718
|
text?: never;
|
|
1662
1719
|
toolUse: ToolUseBlockDelta;
|
|
1720
|
+
toolResult?: never;
|
|
1721
|
+
reasoningContent?: never;
|
|
1722
|
+
citation?: never;
|
|
1723
|
+
$unknown?: never;
|
|
1724
|
+
}
|
|
1725
|
+
interface ToolResultMember {
|
|
1726
|
+
text?: never;
|
|
1727
|
+
toolUse?: never;
|
|
1728
|
+
toolResult: ToolResultBlockDelta[];
|
|
1663
1729
|
reasoningContent?: never;
|
|
1664
1730
|
citation?: never;
|
|
1665
1731
|
$unknown?: never;
|
|
@@ -1667,6 +1733,7 @@ export declare namespace ContentBlockDelta {
|
|
|
1667
1733
|
interface ReasoningContentMember {
|
|
1668
1734
|
text?: never;
|
|
1669
1735
|
toolUse?: never;
|
|
1736
|
+
toolResult?: never;
|
|
1670
1737
|
reasoningContent: ReasoningContentBlockDelta;
|
|
1671
1738
|
citation?: never;
|
|
1672
1739
|
$unknown?: never;
|
|
@@ -1674,6 +1741,7 @@ export declare namespace ContentBlockDelta {
|
|
|
1674
1741
|
interface CitationMember {
|
|
1675
1742
|
text?: never;
|
|
1676
1743
|
toolUse?: never;
|
|
1744
|
+
toolResult?: never;
|
|
1677
1745
|
reasoningContent?: never;
|
|
1678
1746
|
citation: CitationsDelta;
|
|
1679
1747
|
$unknown?: never;
|
|
@@ -1681,6 +1749,7 @@ export declare namespace ContentBlockDelta {
|
|
|
1681
1749
|
interface $UnknownMember {
|
|
1682
1750
|
text?: never;
|
|
1683
1751
|
toolUse?: never;
|
|
1752
|
+
toolResult?: never;
|
|
1684
1753
|
reasoningContent?: never;
|
|
1685
1754
|
citation?: never;
|
|
1686
1755
|
$unknown: [string, any];
|
|
@@ -1688,6 +1757,7 @@ export declare namespace ContentBlockDelta {
|
|
|
1688
1757
|
interface Visitor<T> {
|
|
1689
1758
|
text: (value: string) => T;
|
|
1690
1759
|
toolUse: (value: ToolUseBlockDelta) => T;
|
|
1760
|
+
toolResult: (value: ToolResultBlockDelta[]) => T;
|
|
1691
1761
|
reasoningContent: (value: ReasoningContentBlockDelta) => T;
|
|
1692
1762
|
citation: (value: CitationsDelta) => T;
|
|
1693
1763
|
_: (name: string, value: any) => T;
|
|
@@ -1698,24 +1768,39 @@ export interface ContentBlockDeltaEvent {
|
|
|
1698
1768
|
delta: ContentBlockDelta | undefined;
|
|
1699
1769
|
contentBlockIndex: number | undefined;
|
|
1700
1770
|
}
|
|
1771
|
+
export interface ToolResultBlockStart {
|
|
1772
|
+
toolUseId: string | undefined;
|
|
1773
|
+
type?: string | undefined;
|
|
1774
|
+
status?: ToolResultStatus | undefined;
|
|
1775
|
+
}
|
|
1701
1776
|
export interface ToolUseBlockStart {
|
|
1702
1777
|
toolUseId: string | undefined;
|
|
1703
1778
|
name: string | undefined;
|
|
1779
|
+
type?: ToolUseType | undefined;
|
|
1704
1780
|
}
|
|
1705
1781
|
export type ContentBlockStart =
|
|
1782
|
+
| ContentBlockStart.ToolResultMember
|
|
1706
1783
|
| ContentBlockStart.ToolUseMember
|
|
1707
1784
|
| ContentBlockStart.$UnknownMember;
|
|
1708
1785
|
export declare namespace ContentBlockStart {
|
|
1709
1786
|
interface ToolUseMember {
|
|
1710
1787
|
toolUse: ToolUseBlockStart;
|
|
1788
|
+
toolResult?: never;
|
|
1789
|
+
$unknown?: never;
|
|
1790
|
+
}
|
|
1791
|
+
interface ToolResultMember {
|
|
1792
|
+
toolUse?: never;
|
|
1793
|
+
toolResult: ToolResultBlockStart;
|
|
1711
1794
|
$unknown?: never;
|
|
1712
1795
|
}
|
|
1713
1796
|
interface $UnknownMember {
|
|
1714
1797
|
toolUse?: never;
|
|
1798
|
+
toolResult?: never;
|
|
1715
1799
|
$unknown: [string, any];
|
|
1716
1800
|
}
|
|
1717
1801
|
interface Visitor<T> {
|
|
1718
1802
|
toolUse: (value: ToolUseBlockStart) => T;
|
|
1803
|
+
toolResult: (value: ToolResultBlockStart) => T;
|
|
1719
1804
|
_: (name: string, value: any) => T;
|
|
1720
1805
|
}
|
|
1721
1806
|
const visit: <T>(value: ContentBlockStart, visitor: Visitor<T>) => T;
|
|
@@ -14,9 +14,7 @@ export declare const getRuntimeConfig: (config: BedrockRuntimeClientConfig) => {
|
|
|
14
14
|
| ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider)
|
|
15
15
|
| ((
|
|
16
16
|
init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit
|
|
17
|
-
) => import("@
|
|
18
|
-
import("@smithy/types").AwsCredentialIdentity
|
|
19
|
-
>);
|
|
17
|
+
) => import("@aws-sdk/credential-provider-node/dist-types/runtime/memoize-chain").MemoizedRuntimeConfigAwsCredentialIdentityProvider);
|
|
20
18
|
defaultUserAgentProvider: (
|
|
21
19
|
config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved
|
|
22
20
|
) => Promise<import("@smithy/types").UserAgent>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.920.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -20,21 +20,21 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/core": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
-
"@aws-sdk/eventstream-handler-node": "3.
|
|
26
|
-
"@aws-sdk/middleware-eventstream": "3.
|
|
27
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
28
|
-
"@aws-sdk/middleware-logger": "3.
|
|
29
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
30
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
31
|
-
"@aws-sdk/middleware-websocket": "3.
|
|
32
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
33
|
-
"@aws-sdk/token-providers": "3.
|
|
34
|
-
"@aws-sdk/types": "3.
|
|
35
|
-
"@aws-sdk/util-endpoints": "3.
|
|
36
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
37
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
23
|
+
"@aws-sdk/core": "3.920.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.920.0",
|
|
25
|
+
"@aws-sdk/eventstream-handler-node": "3.920.0",
|
|
26
|
+
"@aws-sdk/middleware-eventstream": "3.920.0",
|
|
27
|
+
"@aws-sdk/middleware-host-header": "3.920.0",
|
|
28
|
+
"@aws-sdk/middleware-logger": "3.920.0",
|
|
29
|
+
"@aws-sdk/middleware-recursion-detection": "3.920.0",
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.920.0",
|
|
31
|
+
"@aws-sdk/middleware-websocket": "3.920.0",
|
|
32
|
+
"@aws-sdk/region-config-resolver": "3.920.0",
|
|
33
|
+
"@aws-sdk/token-providers": "3.920.0",
|
|
34
|
+
"@aws-sdk/types": "3.920.0",
|
|
35
|
+
"@aws-sdk/util-endpoints": "3.920.0",
|
|
36
|
+
"@aws-sdk/util-user-agent-browser": "3.920.0",
|
|
37
|
+
"@aws-sdk/util-user-agent-node": "3.920.0",
|
|
38
38
|
"@smithy/config-resolver": "^4.4.0",
|
|
39
39
|
"@smithy/core": "^3.17.1",
|
|
40
40
|
"@smithy/eventstream-serde-browser": "^4.2.3",
|