@aws-sdk/client-bedrock-runtime 3.778.0 → 3.779.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 +18 -0
- package/dist-es/models/models_0.js +13 -0
- package/dist-es/protocols/Aws_restJson1.js +8 -0
- package/dist-types/commands/ConverseCommand.d.ts +12 -0
- package/dist-types/commands/ConverseStreamCommand.d.ts +9 -0
- package/dist-types/models/models_0.d.ts +87 -3
- package/dist-types/ts3.4/models/models_0.d.ts +56 -1
- package/package.json +1 -1
package/dist-cjs/index.js
CHANGED
|
@@ -30,6 +30,7 @@ __export(index_exports, {
|
|
|
30
30
|
BedrockRuntime: () => BedrockRuntime,
|
|
31
31
|
BedrockRuntimeClient: () => BedrockRuntimeClient,
|
|
32
32
|
BedrockRuntimeServiceException: () => BedrockRuntimeServiceException,
|
|
33
|
+
CachePointType: () => CachePointType,
|
|
33
34
|
ConflictException: () => ConflictException,
|
|
34
35
|
ContentBlock: () => ContentBlock,
|
|
35
36
|
ContentBlockDelta: () => ContentBlockDelta,
|
|
@@ -582,6 +583,9 @@ var GuardrailTrace = {
|
|
|
582
583
|
DISABLED: "disabled",
|
|
583
584
|
ENABLED: "enabled"
|
|
584
585
|
};
|
|
586
|
+
var CachePointType = {
|
|
587
|
+
DEFAULT: "default"
|
|
588
|
+
};
|
|
585
589
|
var DocumentFormat = {
|
|
586
590
|
CSV: "csv",
|
|
587
591
|
DOC: "doc",
|
|
@@ -689,6 +693,7 @@ var ContentBlock;
|
|
|
689
693
|
if (value.toolUse !== void 0) return visitor.toolUse(value.toolUse);
|
|
690
694
|
if (value.toolResult !== void 0) return visitor.toolResult(value.toolResult);
|
|
691
695
|
if (value.guardContent !== void 0) return visitor.guardContent(value.guardContent);
|
|
696
|
+
if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint);
|
|
692
697
|
if (value.reasoningContent !== void 0) return visitor.reasoningContent(value.reasoningContent);
|
|
693
698
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
694
699
|
}, "visit");
|
|
@@ -713,6 +718,7 @@ var SystemContentBlock;
|
|
|
713
718
|
SystemContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
714
719
|
if (value.text !== void 0) return visitor.text(value.text);
|
|
715
720
|
if (value.guardContent !== void 0) return visitor.guardContent(value.guardContent);
|
|
721
|
+
if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint);
|
|
716
722
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
717
723
|
}, "visit");
|
|
718
724
|
})(SystemContentBlock || (SystemContentBlock = {}));
|
|
@@ -736,6 +742,7 @@ var Tool;
|
|
|
736
742
|
((Tool2) => {
|
|
737
743
|
Tool2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
738
744
|
if (value.toolSpec !== void 0) return visitor.toolSpec(value.toolSpec);
|
|
745
|
+
if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint);
|
|
739
746
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
740
747
|
}, "visit");
|
|
741
748
|
})(Tool || (Tool = {}));
|
|
@@ -988,6 +995,7 @@ var ContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
|
988
995
|
if (obj.toolResult !== void 0) return { toolResult: obj.toolResult };
|
|
989
996
|
if (obj.guardContent !== void 0)
|
|
990
997
|
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
|
|
998
|
+
if (obj.cachePoint !== void 0) return { cachePoint: obj.cachePoint };
|
|
991
999
|
if (obj.reasoningContent !== void 0) return { reasoningContent: import_smithy_client.SENSITIVE_STRING };
|
|
992
1000
|
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
993
1001
|
}, "ContentBlockFilterSensitiveLog");
|
|
@@ -999,6 +1007,7 @@ var SystemContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
|
999
1007
|
if (obj.text !== void 0) return { text: obj.text };
|
|
1000
1008
|
if (obj.guardContent !== void 0)
|
|
1001
1009
|
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
|
|
1010
|
+
if (obj.cachePoint !== void 0) return { cachePoint: obj.cachePoint };
|
|
1002
1011
|
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
1003
1012
|
}, "SystemContentBlockFilterSensitiveLog");
|
|
1004
1013
|
var ConverseRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
@@ -1786,6 +1795,7 @@ var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context
|
|
|
1786
1795
|
}, "de_ValidationException_event");
|
|
1787
1796
|
var se_ContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1788
1797
|
return ContentBlock.visit(input, {
|
|
1798
|
+
cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client._json)(value) }), "cachePoint"),
|
|
1789
1799
|
document: /* @__PURE__ */ __name((value) => ({ document: se_DocumentBlock(value, context) }), "document"),
|
|
1790
1800
|
guardContent: /* @__PURE__ */ __name((value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }), "guardContent"),
|
|
1791
1801
|
image: /* @__PURE__ */ __name((value) => ({ image: se_ImageBlock(value, context) }), "image"),
|
|
@@ -1901,6 +1911,7 @@ var se_ReasoningContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
|
1901
1911
|
}, "se_ReasoningContentBlock");
|
|
1902
1912
|
var se_SystemContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1903
1913
|
return SystemContentBlock.visit(input, {
|
|
1914
|
+
cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client._json)(value) }), "cachePoint"),
|
|
1904
1915
|
guardContent: /* @__PURE__ */ __name((value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }), "guardContent"),
|
|
1905
1916
|
text: /* @__PURE__ */ __name((value) => ({ text: value }), "text"),
|
|
1906
1917
|
_: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_")
|
|
@@ -1913,6 +1924,7 @@ var se_SystemContentBlocks = /* @__PURE__ */ __name((input, context) => {
|
|
|
1913
1924
|
}, "se_SystemContentBlocks");
|
|
1914
1925
|
var se_Tool = /* @__PURE__ */ __name((input, context) => {
|
|
1915
1926
|
return Tool.visit(input, {
|
|
1927
|
+
cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client._json)(value) }), "cachePoint"),
|
|
1916
1928
|
toolSpec: /* @__PURE__ */ __name((value) => ({ toolSpec: se_ToolSpecification(value, context) }), "toolSpec"),
|
|
1917
1929
|
_: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_")
|
|
1918
1930
|
});
|
|
@@ -2006,6 +2018,11 @@ var de_AsyncInvokeSummary = /* @__PURE__ */ __name((output, context) => {
|
|
|
2006
2018
|
});
|
|
2007
2019
|
}, "de_AsyncInvokeSummary");
|
|
2008
2020
|
var de_ContentBlock = /* @__PURE__ */ __name((output, context) => {
|
|
2021
|
+
if (output.cachePoint != null) {
|
|
2022
|
+
return {
|
|
2023
|
+
cachePoint: (0, import_smithy_client._json)(output.cachePoint)
|
|
2024
|
+
};
|
|
2025
|
+
}
|
|
2009
2026
|
if (output.document != null) {
|
|
2010
2027
|
return {
|
|
2011
2028
|
document: de_DocumentBlock(output.document, context)
|
|
@@ -2557,6 +2574,7 @@ var paginateListAsyncInvokes = (0, import_core.createPaginator)(BedrockRuntimeCl
|
|
|
2557
2574
|
GuardrailWordPolicyAction,
|
|
2558
2575
|
GuardrailManagedWordType,
|
|
2559
2576
|
GuardrailTrace,
|
|
2577
|
+
CachePointType,
|
|
2560
2578
|
DocumentFormat,
|
|
2561
2579
|
DocumentSource,
|
|
2562
2580
|
GuardrailConverseImageFormat,
|
|
@@ -235,6 +235,9 @@ export const GuardrailTrace = {
|
|
|
235
235
|
DISABLED: "disabled",
|
|
236
236
|
ENABLED: "enabled",
|
|
237
237
|
};
|
|
238
|
+
export const CachePointType = {
|
|
239
|
+
DEFAULT: "default",
|
|
240
|
+
};
|
|
238
241
|
export const DocumentFormat = {
|
|
239
242
|
CSV: "csv",
|
|
240
243
|
DOC: "doc",
|
|
@@ -363,6 +366,8 @@ export var ContentBlock;
|
|
|
363
366
|
return visitor.toolResult(value.toolResult);
|
|
364
367
|
if (value.guardContent !== undefined)
|
|
365
368
|
return visitor.guardContent(value.guardContent);
|
|
369
|
+
if (value.cachePoint !== undefined)
|
|
370
|
+
return visitor.cachePoint(value.cachePoint);
|
|
366
371
|
if (value.reasoningContent !== undefined)
|
|
367
372
|
return visitor.reasoningContent(value.reasoningContent);
|
|
368
373
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
@@ -391,6 +396,8 @@ export var SystemContentBlock;
|
|
|
391
396
|
return visitor.text(value.text);
|
|
392
397
|
if (value.guardContent !== undefined)
|
|
393
398
|
return visitor.guardContent(value.guardContent);
|
|
399
|
+
if (value.cachePoint !== undefined)
|
|
400
|
+
return visitor.cachePoint(value.cachePoint);
|
|
394
401
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
395
402
|
};
|
|
396
403
|
})(SystemContentBlock || (SystemContentBlock = {}));
|
|
@@ -419,6 +426,8 @@ export var Tool;
|
|
|
419
426
|
Tool.visit = (value, visitor) => {
|
|
420
427
|
if (value.toolSpec !== undefined)
|
|
421
428
|
return visitor.toolSpec(value.toolSpec);
|
|
429
|
+
if (value.cachePoint !== undefined)
|
|
430
|
+
return visitor.cachePoint(value.cachePoint);
|
|
422
431
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
423
432
|
};
|
|
424
433
|
})(Tool || (Tool = {}));
|
|
@@ -670,6 +679,8 @@ export const ContentBlockFilterSensitiveLog = (obj) => {
|
|
|
670
679
|
return { toolResult: obj.toolResult };
|
|
671
680
|
if (obj.guardContent !== undefined)
|
|
672
681
|
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
|
|
682
|
+
if (obj.cachePoint !== undefined)
|
|
683
|
+
return { cachePoint: obj.cachePoint };
|
|
673
684
|
if (obj.reasoningContent !== undefined)
|
|
674
685
|
return { reasoningContent: SENSITIVE_STRING };
|
|
675
686
|
if (obj.$unknown !== undefined)
|
|
@@ -684,6 +695,8 @@ export const SystemContentBlockFilterSensitiveLog = (obj) => {
|
|
|
684
695
|
return { text: obj.text };
|
|
685
696
|
if (obj.guardContent !== undefined)
|
|
686
697
|
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
|
|
698
|
+
if (obj.cachePoint !== undefined)
|
|
699
|
+
return { cachePoint: obj.cachePoint };
|
|
687
700
|
if (obj.$unknown !== undefined)
|
|
688
701
|
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
689
702
|
};
|
|
@@ -672,6 +672,7 @@ const de_ValidationException_event = async (output, context) => {
|
|
|
672
672
|
};
|
|
673
673
|
const se_ContentBlock = (input, context) => {
|
|
674
674
|
return ContentBlock.visit(input, {
|
|
675
|
+
cachePoint: (value) => ({ cachePoint: _json(value) }),
|
|
675
676
|
document: (value) => ({ document: se_DocumentBlock(value, context) }),
|
|
676
677
|
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
677
678
|
image: (value) => ({ image: se_ImageBlock(value, context) }),
|
|
@@ -793,6 +794,7 @@ const se_ReasoningContentBlock = (input, context) => {
|
|
|
793
794
|
};
|
|
794
795
|
const se_SystemContentBlock = (input, context) => {
|
|
795
796
|
return SystemContentBlock.visit(input, {
|
|
797
|
+
cachePoint: (value) => ({ cachePoint: _json(value) }),
|
|
796
798
|
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
797
799
|
text: (value) => ({ text: value }),
|
|
798
800
|
_: (name, value) => ({ [name]: value }),
|
|
@@ -807,6 +809,7 @@ const se_SystemContentBlocks = (input, context) => {
|
|
|
807
809
|
};
|
|
808
810
|
const se_Tool = (input, context) => {
|
|
809
811
|
return Tool.visit(input, {
|
|
812
|
+
cachePoint: (value) => ({ cachePoint: _json(value) }),
|
|
810
813
|
toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value, context) }),
|
|
811
814
|
_: (name, value) => ({ [name]: value }),
|
|
812
815
|
});
|
|
@@ -906,6 +909,11 @@ const de_AsyncInvokeSummary = (output, context) => {
|
|
|
906
909
|
});
|
|
907
910
|
};
|
|
908
911
|
const de_ContentBlock = (output, context) => {
|
|
912
|
+
if (output.cachePoint != null) {
|
|
913
|
+
return {
|
|
914
|
+
cachePoint: _json(output.cachePoint),
|
|
915
|
+
};
|
|
916
|
+
}
|
|
909
917
|
if (output.document != null) {
|
|
910
918
|
return {
|
|
911
919
|
document: de_DocumentBlock(output.document, context),
|
|
@@ -140,6 +140,9 @@ declare const ConverseCommand_base: {
|
|
|
140
140
|
* },
|
|
141
141
|
* },
|
|
142
142
|
* },
|
|
143
|
+
* cachePoint: { // CachePointBlock
|
|
144
|
+
* type: "default", // required
|
|
145
|
+
* },
|
|
143
146
|
* reasoningContent: { // ReasoningContentBlock Union: only one key present
|
|
144
147
|
* reasoningText: { // ReasoningTextBlock
|
|
145
148
|
* text: "STRING_VALUE", // required
|
|
@@ -168,6 +171,9 @@ declare const ConverseCommand_base: {
|
|
|
168
171
|
* },
|
|
169
172
|
* },
|
|
170
173
|
* },
|
|
174
|
+
* cachePoint: {
|
|
175
|
+
* type: "default", // required
|
|
176
|
+
* },
|
|
171
177
|
* },
|
|
172
178
|
* ],
|
|
173
179
|
* inferenceConfig: { // InferenceConfiguration
|
|
@@ -188,6 +194,7 @@ declare const ConverseCommand_base: {
|
|
|
188
194
|
* json: "DOCUMENT_VALUE",
|
|
189
195
|
* },
|
|
190
196
|
* },
|
|
197
|
+
* cachePoint: "<CachePointBlock>",
|
|
191
198
|
* },
|
|
192
199
|
* ],
|
|
193
200
|
* toolChoice: { // ToolChoice Union: only one key present
|
|
@@ -303,6 +310,9 @@ declare const ConverseCommand_base: {
|
|
|
303
310
|
* // },
|
|
304
311
|
* // },
|
|
305
312
|
* // },
|
|
313
|
+
* // cachePoint: { // CachePointBlock
|
|
314
|
+
* // type: "default", // required
|
|
315
|
+
* // },
|
|
306
316
|
* // reasoningContent: { // ReasoningContentBlock Union: only one key present
|
|
307
317
|
* // reasoningText: { // ReasoningTextBlock
|
|
308
318
|
* // text: "STRING_VALUE", // required
|
|
@@ -319,6 +329,8 @@ declare const ConverseCommand_base: {
|
|
|
319
329
|
* // inputTokens: Number("int"), // required
|
|
320
330
|
* // outputTokens: Number("int"), // required
|
|
321
331
|
* // totalTokens: Number("int"), // required
|
|
332
|
+
* // cacheReadInputTokens: Number("int"),
|
|
333
|
+
* // cacheWriteInputTokens: Number("int"),
|
|
322
334
|
* // },
|
|
323
335
|
* // metrics: { // ConverseMetrics
|
|
324
336
|
* // latencyMs: Number("long"), // required
|
|
@@ -146,6 +146,9 @@ declare const ConverseStreamCommand_base: {
|
|
|
146
146
|
* },
|
|
147
147
|
* },
|
|
148
148
|
* },
|
|
149
|
+
* cachePoint: { // CachePointBlock
|
|
150
|
+
* type: "default", // required
|
|
151
|
+
* },
|
|
149
152
|
* reasoningContent: { // ReasoningContentBlock Union: only one key present
|
|
150
153
|
* reasoningText: { // ReasoningTextBlock
|
|
151
154
|
* text: "STRING_VALUE", // required
|
|
@@ -174,6 +177,9 @@ declare const ConverseStreamCommand_base: {
|
|
|
174
177
|
* },
|
|
175
178
|
* },
|
|
176
179
|
* },
|
|
180
|
+
* cachePoint: {
|
|
181
|
+
* type: "default", // required
|
|
182
|
+
* },
|
|
177
183
|
* },
|
|
178
184
|
* ],
|
|
179
185
|
* inferenceConfig: { // InferenceConfiguration
|
|
@@ -194,6 +200,7 @@ declare const ConverseStreamCommand_base: {
|
|
|
194
200
|
* json: "DOCUMENT_VALUE",
|
|
195
201
|
* },
|
|
196
202
|
* },
|
|
203
|
+
* cachePoint: "<CachePointBlock>",
|
|
197
204
|
* },
|
|
198
205
|
* ],
|
|
199
206
|
* toolChoice: { // ToolChoice Union: only one key present
|
|
@@ -268,6 +275,8 @@ declare const ConverseStreamCommand_base: {
|
|
|
268
275
|
* // inputTokens: Number("int"), // required
|
|
269
276
|
* // outputTokens: Number("int"), // required
|
|
270
277
|
* // totalTokens: Number("int"), // required
|
|
278
|
+
* // cacheReadInputTokens: Number("int"),
|
|
279
|
+
* // cacheWriteInputTokens: Number("int"),
|
|
271
280
|
* // },
|
|
272
281
|
* // metrics: { // ConverseStreamMetrics
|
|
273
282
|
* // latencyMs: Number("long"), // required
|
|
@@ -1252,6 +1252,28 @@ export interface InferenceConfiguration {
|
|
|
1252
1252
|
*/
|
|
1253
1253
|
stopSequences?: string[] | undefined;
|
|
1254
1254
|
}
|
|
1255
|
+
/**
|
|
1256
|
+
* @public
|
|
1257
|
+
* @enum
|
|
1258
|
+
*/
|
|
1259
|
+
export declare const CachePointType: {
|
|
1260
|
+
readonly DEFAULT: "default";
|
|
1261
|
+
};
|
|
1262
|
+
/**
|
|
1263
|
+
* @public
|
|
1264
|
+
*/
|
|
1265
|
+
export type CachePointType = (typeof CachePointType)[keyof typeof CachePointType];
|
|
1266
|
+
/**
|
|
1267
|
+
* <p>Defines a section of content to be cached for reuse in subsequent API calls.</p>
|
|
1268
|
+
* @public
|
|
1269
|
+
*/
|
|
1270
|
+
export interface CachePointBlock {
|
|
1271
|
+
/**
|
|
1272
|
+
* <p>Specifies the type of cache point within the CachePointBlock.</p>
|
|
1273
|
+
* @public
|
|
1274
|
+
*/
|
|
1275
|
+
type: CachePointType | undefined;
|
|
1276
|
+
}
|
|
1255
1277
|
/**
|
|
1256
1278
|
* @public
|
|
1257
1279
|
* @enum
|
|
@@ -1842,7 +1864,7 @@ export interface ToolUseBlock {
|
|
|
1842
1864
|
* <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>
|
|
1843
1865
|
* @public
|
|
1844
1866
|
*/
|
|
1845
|
-
export type ContentBlock = ContentBlock.DocumentMember | ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.ReasoningContentMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.VideoMember | ContentBlock.$UnknownMember;
|
|
1867
|
+
export type ContentBlock = ContentBlock.CachePointMember | ContentBlock.DocumentMember | ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.ReasoningContentMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.VideoMember | ContentBlock.$UnknownMember;
|
|
1846
1868
|
/**
|
|
1847
1869
|
* @public
|
|
1848
1870
|
*/
|
|
@@ -1859,6 +1881,7 @@ export declare namespace ContentBlock {
|
|
|
1859
1881
|
toolUse?: never;
|
|
1860
1882
|
toolResult?: never;
|
|
1861
1883
|
guardContent?: never;
|
|
1884
|
+
cachePoint?: never;
|
|
1862
1885
|
reasoningContent?: never;
|
|
1863
1886
|
$unknown?: never;
|
|
1864
1887
|
}
|
|
@@ -1877,6 +1900,7 @@ export declare namespace ContentBlock {
|
|
|
1877
1900
|
toolUse?: never;
|
|
1878
1901
|
toolResult?: never;
|
|
1879
1902
|
guardContent?: never;
|
|
1903
|
+
cachePoint?: never;
|
|
1880
1904
|
reasoningContent?: never;
|
|
1881
1905
|
$unknown?: never;
|
|
1882
1906
|
}
|
|
@@ -1892,6 +1916,7 @@ export declare namespace ContentBlock {
|
|
|
1892
1916
|
toolUse?: never;
|
|
1893
1917
|
toolResult?: never;
|
|
1894
1918
|
guardContent?: never;
|
|
1919
|
+
cachePoint?: never;
|
|
1895
1920
|
reasoningContent?: never;
|
|
1896
1921
|
$unknown?: never;
|
|
1897
1922
|
}
|
|
@@ -1907,6 +1932,7 @@ export declare namespace ContentBlock {
|
|
|
1907
1932
|
toolUse?: never;
|
|
1908
1933
|
toolResult?: never;
|
|
1909
1934
|
guardContent?: never;
|
|
1935
|
+
cachePoint?: never;
|
|
1910
1936
|
reasoningContent?: never;
|
|
1911
1937
|
$unknown?: never;
|
|
1912
1938
|
}
|
|
@@ -1922,6 +1948,7 @@ export declare namespace ContentBlock {
|
|
|
1922
1948
|
toolUse: ToolUseBlock;
|
|
1923
1949
|
toolResult?: never;
|
|
1924
1950
|
guardContent?: never;
|
|
1951
|
+
cachePoint?: never;
|
|
1925
1952
|
reasoningContent?: never;
|
|
1926
1953
|
$unknown?: never;
|
|
1927
1954
|
}
|
|
@@ -1937,6 +1964,7 @@ export declare namespace ContentBlock {
|
|
|
1937
1964
|
toolUse?: never;
|
|
1938
1965
|
toolResult: ToolResultBlock;
|
|
1939
1966
|
guardContent?: never;
|
|
1967
|
+
cachePoint?: never;
|
|
1940
1968
|
reasoningContent?: never;
|
|
1941
1969
|
$unknown?: never;
|
|
1942
1970
|
}
|
|
@@ -1957,6 +1985,23 @@ export declare namespace ContentBlock {
|
|
|
1957
1985
|
toolUse?: never;
|
|
1958
1986
|
toolResult?: never;
|
|
1959
1987
|
guardContent: GuardrailConverseContentBlock;
|
|
1988
|
+
cachePoint?: never;
|
|
1989
|
+
reasoningContent?: never;
|
|
1990
|
+
$unknown?: never;
|
|
1991
|
+
}
|
|
1992
|
+
/**
|
|
1993
|
+
* <p>CachePoint to include in the message.</p>
|
|
1994
|
+
* @public
|
|
1995
|
+
*/
|
|
1996
|
+
interface CachePointMember {
|
|
1997
|
+
text?: never;
|
|
1998
|
+
image?: never;
|
|
1999
|
+
document?: never;
|
|
2000
|
+
video?: never;
|
|
2001
|
+
toolUse?: never;
|
|
2002
|
+
toolResult?: never;
|
|
2003
|
+
guardContent?: never;
|
|
2004
|
+
cachePoint: CachePointBlock;
|
|
1960
2005
|
reasoningContent?: never;
|
|
1961
2006
|
$unknown?: never;
|
|
1962
2007
|
}
|
|
@@ -1972,6 +2017,7 @@ export declare namespace ContentBlock {
|
|
|
1972
2017
|
toolUse?: never;
|
|
1973
2018
|
toolResult?: never;
|
|
1974
2019
|
guardContent?: never;
|
|
2020
|
+
cachePoint?: never;
|
|
1975
2021
|
reasoningContent: ReasoningContentBlock;
|
|
1976
2022
|
$unknown?: never;
|
|
1977
2023
|
}
|
|
@@ -1986,6 +2032,7 @@ export declare namespace ContentBlock {
|
|
|
1986
2032
|
toolUse?: never;
|
|
1987
2033
|
toolResult?: never;
|
|
1988
2034
|
guardContent?: never;
|
|
2035
|
+
cachePoint?: never;
|
|
1989
2036
|
reasoningContent?: never;
|
|
1990
2037
|
$unknown: [string, any];
|
|
1991
2038
|
}
|
|
@@ -1997,6 +2044,7 @@ export declare namespace ContentBlock {
|
|
|
1997
2044
|
toolUse: (value: ToolUseBlock) => T;
|
|
1998
2045
|
toolResult: (value: ToolResultBlock) => T;
|
|
1999
2046
|
guardContent: (value: GuardrailConverseContentBlock) => T;
|
|
2047
|
+
cachePoint: (value: CachePointBlock) => T;
|
|
2000
2048
|
reasoningContent: (value: ReasoningContentBlock) => T;
|
|
2001
2049
|
_: (name: string, value: any) => T;
|
|
2002
2050
|
}
|
|
@@ -2101,7 +2149,7 @@ export declare namespace PromptVariableValues {
|
|
|
2101
2149
|
* <p>A system content block.</p>
|
|
2102
2150
|
* @public
|
|
2103
2151
|
*/
|
|
2104
|
-
export type SystemContentBlock = SystemContentBlock.GuardContentMember | SystemContentBlock.TextMember | SystemContentBlock.$UnknownMember;
|
|
2152
|
+
export type SystemContentBlock = SystemContentBlock.CachePointMember | SystemContentBlock.GuardContentMember | SystemContentBlock.TextMember | SystemContentBlock.$UnknownMember;
|
|
2105
2153
|
/**
|
|
2106
2154
|
* @public
|
|
2107
2155
|
*/
|
|
@@ -2113,6 +2161,7 @@ export declare namespace SystemContentBlock {
|
|
|
2113
2161
|
interface TextMember {
|
|
2114
2162
|
text: string;
|
|
2115
2163
|
guardContent?: never;
|
|
2164
|
+
cachePoint?: never;
|
|
2116
2165
|
$unknown?: never;
|
|
2117
2166
|
}
|
|
2118
2167
|
/**
|
|
@@ -2124,6 +2173,17 @@ export declare namespace SystemContentBlock {
|
|
|
2124
2173
|
interface GuardContentMember {
|
|
2125
2174
|
text?: never;
|
|
2126
2175
|
guardContent: GuardrailConverseContentBlock;
|
|
2176
|
+
cachePoint?: never;
|
|
2177
|
+
$unknown?: never;
|
|
2178
|
+
}
|
|
2179
|
+
/**
|
|
2180
|
+
* <p>CachePoint to include in the system prompt.</p>
|
|
2181
|
+
* @public
|
|
2182
|
+
*/
|
|
2183
|
+
interface CachePointMember {
|
|
2184
|
+
text?: never;
|
|
2185
|
+
guardContent?: never;
|
|
2186
|
+
cachePoint: CachePointBlock;
|
|
2127
2187
|
$unknown?: never;
|
|
2128
2188
|
}
|
|
2129
2189
|
/**
|
|
@@ -2132,11 +2192,13 @@ export declare namespace SystemContentBlock {
|
|
|
2132
2192
|
interface $UnknownMember {
|
|
2133
2193
|
text?: never;
|
|
2134
2194
|
guardContent?: never;
|
|
2195
|
+
cachePoint?: never;
|
|
2135
2196
|
$unknown: [string, any];
|
|
2136
2197
|
}
|
|
2137
2198
|
interface Visitor<T> {
|
|
2138
2199
|
text: (value: string) => T;
|
|
2139
2200
|
guardContent: (value: GuardrailConverseContentBlock) => T;
|
|
2201
|
+
cachePoint: (value: CachePointBlock) => T;
|
|
2140
2202
|
_: (name: string, value: any) => T;
|
|
2141
2203
|
}
|
|
2142
2204
|
const visit: <T>(value: SystemContentBlock, visitor: Visitor<T>) => T;
|
|
@@ -2281,7 +2343,7 @@ export interface ToolSpecification {
|
|
|
2281
2343
|
* <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">Tool use (function calling)</a> in the Amazon Bedrock User Guide.</p>
|
|
2282
2344
|
* @public
|
|
2283
2345
|
*/
|
|
2284
|
-
export type Tool = Tool.ToolSpecMember | Tool.$UnknownMember;
|
|
2346
|
+
export type Tool = Tool.CachePointMember | Tool.ToolSpecMember | Tool.$UnknownMember;
|
|
2285
2347
|
/**
|
|
2286
2348
|
* @public
|
|
2287
2349
|
*/
|
|
@@ -2292,6 +2354,16 @@ export declare namespace Tool {
|
|
|
2292
2354
|
*/
|
|
2293
2355
|
interface ToolSpecMember {
|
|
2294
2356
|
toolSpec: ToolSpecification;
|
|
2357
|
+
cachePoint?: never;
|
|
2358
|
+
$unknown?: never;
|
|
2359
|
+
}
|
|
2360
|
+
/**
|
|
2361
|
+
* <p>CachePoint to include in the tool configuration.</p>
|
|
2362
|
+
* @public
|
|
2363
|
+
*/
|
|
2364
|
+
interface CachePointMember {
|
|
2365
|
+
toolSpec?: never;
|
|
2366
|
+
cachePoint: CachePointBlock;
|
|
2295
2367
|
$unknown?: never;
|
|
2296
2368
|
}
|
|
2297
2369
|
/**
|
|
@@ -2299,10 +2371,12 @@ export declare namespace Tool {
|
|
|
2299
2371
|
*/
|
|
2300
2372
|
interface $UnknownMember {
|
|
2301
2373
|
toolSpec?: never;
|
|
2374
|
+
cachePoint?: never;
|
|
2302
2375
|
$unknown: [string, any];
|
|
2303
2376
|
}
|
|
2304
2377
|
interface Visitor<T> {
|
|
2305
2378
|
toolSpec: (value: ToolSpecification) => T;
|
|
2379
|
+
cachePoint: (value: CachePointBlock) => T;
|
|
2306
2380
|
_: (name: string, value: any) => T;
|
|
2307
2381
|
}
|
|
2308
2382
|
const visit: <T>(value: Tool, visitor: Visitor<T>) => T;
|
|
@@ -2546,6 +2620,16 @@ export interface TokenUsage {
|
|
|
2546
2620
|
* @public
|
|
2547
2621
|
*/
|
|
2548
2622
|
totalTokens: number | undefined;
|
|
2623
|
+
/**
|
|
2624
|
+
* <p>The number of input tokens read from the cache for the request.</p>
|
|
2625
|
+
* @public
|
|
2626
|
+
*/
|
|
2627
|
+
cacheReadInputTokens?: number | undefined;
|
|
2628
|
+
/**
|
|
2629
|
+
* <p>The number of input tokens written to the cache for the request.</p>
|
|
2630
|
+
* @public
|
|
2631
|
+
*/
|
|
2632
|
+
cacheWriteInputTokens?: number | undefined;
|
|
2549
2633
|
}
|
|
2550
2634
|
/**
|
|
2551
2635
|
* @public
|
|
@@ -457,6 +457,14 @@ export interface InferenceConfiguration {
|
|
|
457
457
|
topP?: number | undefined;
|
|
458
458
|
stopSequences?: string[] | undefined;
|
|
459
459
|
}
|
|
460
|
+
export declare const CachePointType: {
|
|
461
|
+
readonly DEFAULT: "default";
|
|
462
|
+
};
|
|
463
|
+
export type CachePointType =
|
|
464
|
+
(typeof CachePointType)[keyof typeof CachePointType];
|
|
465
|
+
export interface CachePointBlock {
|
|
466
|
+
type: CachePointType | undefined;
|
|
467
|
+
}
|
|
460
468
|
export declare const DocumentFormat: {
|
|
461
469
|
readonly CSV: "csv";
|
|
462
470
|
readonly DOC: "doc";
|
|
@@ -753,6 +761,7 @@ export interface ToolUseBlock {
|
|
|
753
761
|
input: __DocumentType | undefined;
|
|
754
762
|
}
|
|
755
763
|
export type ContentBlock =
|
|
764
|
+
| ContentBlock.CachePointMember
|
|
756
765
|
| ContentBlock.DocumentMember
|
|
757
766
|
| ContentBlock.GuardContentMember
|
|
758
767
|
| ContentBlock.ImageMember
|
|
@@ -771,6 +780,7 @@ export declare namespace ContentBlock {
|
|
|
771
780
|
toolUse?: never;
|
|
772
781
|
toolResult?: never;
|
|
773
782
|
guardContent?: never;
|
|
783
|
+
cachePoint?: never;
|
|
774
784
|
reasoningContent?: never;
|
|
775
785
|
$unknown?: never;
|
|
776
786
|
}
|
|
@@ -782,6 +792,7 @@ export declare namespace ContentBlock {
|
|
|
782
792
|
toolUse?: never;
|
|
783
793
|
toolResult?: never;
|
|
784
794
|
guardContent?: never;
|
|
795
|
+
cachePoint?: never;
|
|
785
796
|
reasoningContent?: never;
|
|
786
797
|
$unknown?: never;
|
|
787
798
|
}
|
|
@@ -793,6 +804,7 @@ export declare namespace ContentBlock {
|
|
|
793
804
|
toolUse?: never;
|
|
794
805
|
toolResult?: never;
|
|
795
806
|
guardContent?: never;
|
|
807
|
+
cachePoint?: never;
|
|
796
808
|
reasoningContent?: never;
|
|
797
809
|
$unknown?: never;
|
|
798
810
|
}
|
|
@@ -804,6 +816,7 @@ export declare namespace ContentBlock {
|
|
|
804
816
|
toolUse?: never;
|
|
805
817
|
toolResult?: never;
|
|
806
818
|
guardContent?: never;
|
|
819
|
+
cachePoint?: never;
|
|
807
820
|
reasoningContent?: never;
|
|
808
821
|
$unknown?: never;
|
|
809
822
|
}
|
|
@@ -815,6 +828,7 @@ export declare namespace ContentBlock {
|
|
|
815
828
|
toolUse: ToolUseBlock;
|
|
816
829
|
toolResult?: never;
|
|
817
830
|
guardContent?: never;
|
|
831
|
+
cachePoint?: never;
|
|
818
832
|
reasoningContent?: never;
|
|
819
833
|
$unknown?: never;
|
|
820
834
|
}
|
|
@@ -826,6 +840,7 @@ export declare namespace ContentBlock {
|
|
|
826
840
|
toolUse?: never;
|
|
827
841
|
toolResult: ToolResultBlock;
|
|
828
842
|
guardContent?: never;
|
|
843
|
+
cachePoint?: never;
|
|
829
844
|
reasoningContent?: never;
|
|
830
845
|
$unknown?: never;
|
|
831
846
|
}
|
|
@@ -837,6 +852,19 @@ export declare namespace ContentBlock {
|
|
|
837
852
|
toolUse?: never;
|
|
838
853
|
toolResult?: never;
|
|
839
854
|
guardContent: GuardrailConverseContentBlock;
|
|
855
|
+
cachePoint?: never;
|
|
856
|
+
reasoningContent?: never;
|
|
857
|
+
$unknown?: never;
|
|
858
|
+
}
|
|
859
|
+
interface CachePointMember {
|
|
860
|
+
text?: never;
|
|
861
|
+
image?: never;
|
|
862
|
+
document?: never;
|
|
863
|
+
video?: never;
|
|
864
|
+
toolUse?: never;
|
|
865
|
+
toolResult?: never;
|
|
866
|
+
guardContent?: never;
|
|
867
|
+
cachePoint: CachePointBlock;
|
|
840
868
|
reasoningContent?: never;
|
|
841
869
|
$unknown?: never;
|
|
842
870
|
}
|
|
@@ -848,6 +876,7 @@ export declare namespace ContentBlock {
|
|
|
848
876
|
toolUse?: never;
|
|
849
877
|
toolResult?: never;
|
|
850
878
|
guardContent?: never;
|
|
879
|
+
cachePoint?: never;
|
|
851
880
|
reasoningContent: ReasoningContentBlock;
|
|
852
881
|
$unknown?: never;
|
|
853
882
|
}
|
|
@@ -859,6 +888,7 @@ export declare namespace ContentBlock {
|
|
|
859
888
|
toolUse?: never;
|
|
860
889
|
toolResult?: never;
|
|
861
890
|
guardContent?: never;
|
|
891
|
+
cachePoint?: never;
|
|
862
892
|
reasoningContent?: never;
|
|
863
893
|
$unknown: [string, any];
|
|
864
894
|
}
|
|
@@ -870,6 +900,7 @@ export declare namespace ContentBlock {
|
|
|
870
900
|
toolUse: (value: ToolUseBlock) => T;
|
|
871
901
|
toolResult: (value: ToolResultBlock) => T;
|
|
872
902
|
guardContent: (value: GuardrailConverseContentBlock) => T;
|
|
903
|
+
cachePoint: (value: CachePointBlock) => T;
|
|
873
904
|
reasoningContent: (value: ReasoningContentBlock) => T;
|
|
874
905
|
_: (name: string, value: any) => T;
|
|
875
906
|
}
|
|
@@ -913,6 +944,7 @@ export declare namespace PromptVariableValues {
|
|
|
913
944
|
const visit: <T>(value: PromptVariableValues, visitor: Visitor<T>) => T;
|
|
914
945
|
}
|
|
915
946
|
export type SystemContentBlock =
|
|
947
|
+
| SystemContentBlock.CachePointMember
|
|
916
948
|
| SystemContentBlock.GuardContentMember
|
|
917
949
|
| SystemContentBlock.TextMember
|
|
918
950
|
| SystemContentBlock.$UnknownMember;
|
|
@@ -920,21 +952,31 @@ export declare namespace SystemContentBlock {
|
|
|
920
952
|
interface TextMember {
|
|
921
953
|
text: string;
|
|
922
954
|
guardContent?: never;
|
|
955
|
+
cachePoint?: never;
|
|
923
956
|
$unknown?: never;
|
|
924
957
|
}
|
|
925
958
|
interface GuardContentMember {
|
|
926
959
|
text?: never;
|
|
927
960
|
guardContent: GuardrailConverseContentBlock;
|
|
961
|
+
cachePoint?: never;
|
|
962
|
+
$unknown?: never;
|
|
963
|
+
}
|
|
964
|
+
interface CachePointMember {
|
|
965
|
+
text?: never;
|
|
966
|
+
guardContent?: never;
|
|
967
|
+
cachePoint: CachePointBlock;
|
|
928
968
|
$unknown?: never;
|
|
929
969
|
}
|
|
930
970
|
interface $UnknownMember {
|
|
931
971
|
text?: never;
|
|
932
972
|
guardContent?: never;
|
|
973
|
+
cachePoint?: never;
|
|
933
974
|
$unknown: [string, any];
|
|
934
975
|
}
|
|
935
976
|
interface Visitor<T> {
|
|
936
977
|
text: (value: string) => T;
|
|
937
978
|
guardContent: (value: GuardrailConverseContentBlock) => T;
|
|
979
|
+
cachePoint: (value: CachePointBlock) => T;
|
|
938
980
|
_: (name: string, value: any) => T;
|
|
939
981
|
}
|
|
940
982
|
const visit: <T>(value: SystemContentBlock, visitor: Visitor<T>) => T;
|
|
@@ -1005,18 +1047,29 @@ export interface ToolSpecification {
|
|
|
1005
1047
|
description?: string | undefined;
|
|
1006
1048
|
inputSchema: ToolInputSchema | undefined;
|
|
1007
1049
|
}
|
|
1008
|
-
export type Tool =
|
|
1050
|
+
export type Tool =
|
|
1051
|
+
| Tool.CachePointMember
|
|
1052
|
+
| Tool.ToolSpecMember
|
|
1053
|
+
| Tool.$UnknownMember;
|
|
1009
1054
|
export declare namespace Tool {
|
|
1010
1055
|
interface ToolSpecMember {
|
|
1011
1056
|
toolSpec: ToolSpecification;
|
|
1057
|
+
cachePoint?: never;
|
|
1058
|
+
$unknown?: never;
|
|
1059
|
+
}
|
|
1060
|
+
interface CachePointMember {
|
|
1061
|
+
toolSpec?: never;
|
|
1062
|
+
cachePoint: CachePointBlock;
|
|
1012
1063
|
$unknown?: never;
|
|
1013
1064
|
}
|
|
1014
1065
|
interface $UnknownMember {
|
|
1015
1066
|
toolSpec?: never;
|
|
1067
|
+
cachePoint?: never;
|
|
1016
1068
|
$unknown: [string, any];
|
|
1017
1069
|
}
|
|
1018
1070
|
interface Visitor<T> {
|
|
1019
1071
|
toolSpec: (value: ToolSpecification) => T;
|
|
1072
|
+
cachePoint: (value: CachePointBlock) => T;
|
|
1020
1073
|
_: (name: string, value: any) => T;
|
|
1021
1074
|
}
|
|
1022
1075
|
const visit: <T>(value: Tool, visitor: Visitor<T>) => T;
|
|
@@ -1084,6 +1137,8 @@ export interface TokenUsage {
|
|
|
1084
1137
|
inputTokens: number | undefined;
|
|
1085
1138
|
outputTokens: number | undefined;
|
|
1086
1139
|
totalTokens: number | undefined;
|
|
1140
|
+
cacheReadInputTokens?: number | undefined;
|
|
1141
|
+
cacheWriteInputTokens?: number | undefined;
|
|
1087
1142
|
}
|
|
1088
1143
|
export interface ConverseResponse {
|
|
1089
1144
|
output: ConverseOutput | undefined;
|
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.779.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",
|