@aws-sdk/client-bedrock-runtime 3.896.0 → 3.901.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 +4 -3
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +3 -3
- package/dist-types/commands/ApplyGuardrailCommand.d.ts +3 -0
- package/dist-types/commands/ConverseCommand.d.ts +1 -1
- package/dist-types/commands/ConverseStreamCommand.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1 -0
- package/package.json +46 -46
package/dist-cjs/index.js
CHANGED
|
@@ -873,6 +873,7 @@ var StopReason = {
|
|
|
873
873
|
END_TURN: "end_turn",
|
|
874
874
|
GUARDRAIL_INTERVENED: "guardrail_intervened",
|
|
875
875
|
MAX_TOKENS: "max_tokens",
|
|
876
|
+
MODEL_CONTEXT_WINDOW_EXCEEDED: "model_context_window_exceeded",
|
|
876
877
|
STOP_SEQUENCE: "stop_sequence",
|
|
877
878
|
TOOL_USE: "tool_use"
|
|
878
879
|
};
|
|
@@ -1806,6 +1807,9 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1806
1807
|
case "ServiceQuotaExceededException":
|
|
1807
1808
|
case "com.amazonaws.bedrockruntime#ServiceQuotaExceededException":
|
|
1808
1809
|
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1810
|
+
case "ServiceUnavailableException":
|
|
1811
|
+
case "com.amazonaws.bedrockruntime#ServiceUnavailableException":
|
|
1812
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1809
1813
|
case "ThrottlingException":
|
|
1810
1814
|
case "com.amazonaws.bedrockruntime#ThrottlingException":
|
|
1811
1815
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
@@ -1821,9 +1825,6 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1821
1825
|
case "ModelTimeoutException":
|
|
1822
1826
|
case "com.amazonaws.bedrockruntime#ModelTimeoutException":
|
|
1823
1827
|
throw await de_ModelTimeoutExceptionRes(parsedOutput, context);
|
|
1824
|
-
case "ServiceUnavailableException":
|
|
1825
|
-
case "com.amazonaws.bedrockruntime#ServiceUnavailableException":
|
|
1826
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1827
1828
|
case "ModelStreamErrorException":
|
|
1828
1829
|
case "com.amazonaws.bedrockruntime#ModelStreamErrorException":
|
|
1829
1830
|
throw await de_ModelStreamErrorExceptionRes(parsedOutput, context);
|
|
@@ -523,6 +523,7 @@ export const StopReason = {
|
|
|
523
523
|
END_TURN: "end_turn",
|
|
524
524
|
GUARDRAIL_INTERVENED: "guardrail_intervened",
|
|
525
525
|
MAX_TOKENS: "max_tokens",
|
|
526
|
+
MODEL_CONTEXT_WINDOW_EXCEEDED: "model_context_window_exceeded",
|
|
526
527
|
STOP_SEQUENCE: "stop_sequence",
|
|
527
528
|
TOOL_USE: "tool_use",
|
|
528
529
|
};
|
|
@@ -347,6 +347,9 @@ const de_CommandError = async (output, context) => {
|
|
|
347
347
|
case "ServiceQuotaExceededException":
|
|
348
348
|
case "com.amazonaws.bedrockruntime#ServiceQuotaExceededException":
|
|
349
349
|
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
350
|
+
case "ServiceUnavailableException":
|
|
351
|
+
case "com.amazonaws.bedrockruntime#ServiceUnavailableException":
|
|
352
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
350
353
|
case "ThrottlingException":
|
|
351
354
|
case "com.amazonaws.bedrockruntime#ThrottlingException":
|
|
352
355
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
@@ -362,9 +365,6 @@ const de_CommandError = async (output, context) => {
|
|
|
362
365
|
case "ModelTimeoutException":
|
|
363
366
|
case "com.amazonaws.bedrockruntime#ModelTimeoutException":
|
|
364
367
|
throw await de_ModelTimeoutExceptionRes(parsedOutput, context);
|
|
365
|
-
case "ServiceUnavailableException":
|
|
366
|
-
case "com.amazonaws.bedrockruntime#ServiceUnavailableException":
|
|
367
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
368
368
|
case "ModelStreamErrorException":
|
|
369
369
|
case "com.amazonaws.bedrockruntime#ModelStreamErrorException":
|
|
370
370
|
throw await de_ModelStreamErrorExceptionRes(parsedOutput, context);
|
|
@@ -363,6 +363,9 @@ declare const ApplyGuardrailCommand_base: {
|
|
|
363
363
|
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
364
364
|
* <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
|
|
365
365
|
*
|
|
366
|
+
* @throws {@link ServiceUnavailableException} (server fault)
|
|
367
|
+
* <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
368
|
+
*
|
|
366
369
|
* @throws {@link ThrottlingException} (client fault)
|
|
367
370
|
* <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>
|
|
368
371
|
*
|
|
@@ -437,7 +437,7 @@ declare const ConverseCommand_base: {
|
|
|
437
437
|
* // ],
|
|
438
438
|
* // },
|
|
439
439
|
* // },
|
|
440
|
-
* // stopReason: "end_turn" || "tool_use" || "max_tokens" || "stop_sequence" || "guardrail_intervened" || "content_filtered", // required
|
|
440
|
+
* // stopReason: "end_turn" || "tool_use" || "max_tokens" || "stop_sequence" || "guardrail_intervened" || "content_filtered" || "model_context_window_exceeded", // required
|
|
441
441
|
* // usage: { // TokenUsage
|
|
442
442
|
* // inputTokens: Number("int"), // required
|
|
443
443
|
* // outputTokens: Number("int"), // required
|
|
@@ -332,7 +332,7 @@ declare const ConverseStreamCommand_base: {
|
|
|
332
332
|
* // contentBlockIndex: Number("int"), // required
|
|
333
333
|
* // },
|
|
334
334
|
* // messageStop: { // MessageStopEvent
|
|
335
|
-
* // stopReason: "end_turn" || "tool_use" || "max_tokens" || "stop_sequence" || "guardrail_intervened" || "content_filtered", // required
|
|
335
|
+
* // stopReason: "end_turn" || "tool_use" || "max_tokens" || "stop_sequence" || "guardrail_intervened" || "content_filtered" || "model_context_window_exceeded", // required
|
|
336
336
|
* // additionalModelResponseFields: "DOCUMENT_VALUE",
|
|
337
337
|
* // },
|
|
338
338
|
* // metadata: { // ConverseStreamMetadataEvent
|
|
@@ -3241,6 +3241,7 @@ export declare const StopReason: {
|
|
|
3241
3241
|
readonly END_TURN: "end_turn";
|
|
3242
3242
|
readonly GUARDRAIL_INTERVENED: "guardrail_intervened";
|
|
3243
3243
|
readonly MAX_TOKENS: "max_tokens";
|
|
3244
|
+
readonly MODEL_CONTEXT_WINDOW_EXCEEDED: "model_context_window_exceeded";
|
|
3244
3245
|
readonly STOP_SEQUENCE: "stop_sequence";
|
|
3245
3246
|
readonly TOOL_USE: "tool_use";
|
|
3246
3247
|
};
|
|
@@ -1511,6 +1511,7 @@ export declare const StopReason: {
|
|
|
1511
1511
|
readonly END_TURN: "end_turn";
|
|
1512
1512
|
readonly GUARDRAIL_INTERVENED: "guardrail_intervened";
|
|
1513
1513
|
readonly MAX_TOKENS: "max_tokens";
|
|
1514
|
+
readonly MODEL_CONTEXT_WINDOW_EXCEEDED: "model_context_window_exceeded";
|
|
1514
1515
|
readonly STOP_SEQUENCE: "stop_sequence";
|
|
1515
1516
|
readonly TOOL_USE: "tool_use";
|
|
1516
1517
|
};
|
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.901.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,51 +20,51 @@
|
|
|
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.
|
|
38
|
-
"@smithy/config-resolver": "^4.
|
|
39
|
-
"@smithy/core": "^3.
|
|
40
|
-
"@smithy/eventstream-serde-browser": "^4.
|
|
41
|
-
"@smithy/eventstream-serde-config-resolver": "^4.
|
|
42
|
-
"@smithy/eventstream-serde-node": "^4.
|
|
43
|
-
"@smithy/fetch-http-handler": "^5.
|
|
44
|
-
"@smithy/hash-node": "^4.
|
|
45
|
-
"@smithy/invalid-dependency": "^4.
|
|
46
|
-
"@smithy/middleware-content-length": "^4.
|
|
47
|
-
"@smithy/middleware-endpoint": "^4.
|
|
48
|
-
"@smithy/middleware-retry": "^4.
|
|
49
|
-
"@smithy/middleware-serde": "^4.
|
|
50
|
-
"@smithy/middleware-stack": "^4.
|
|
51
|
-
"@smithy/node-config-provider": "^4.
|
|
52
|
-
"@smithy/node-http-handler": "^4.
|
|
53
|
-
"@smithy/protocol-http": "^5.
|
|
54
|
-
"@smithy/smithy-client": "^4.
|
|
55
|
-
"@smithy/types": "^4.
|
|
56
|
-
"@smithy/url-parser": "^4.
|
|
57
|
-
"@smithy/util-base64": "^4.
|
|
58
|
-
"@smithy/util-body-length-browser": "^4.
|
|
59
|
-
"@smithy/util-body-length-node": "^4.
|
|
60
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
61
|
-
"@smithy/util-defaults-mode-node": "^4.
|
|
62
|
-
"@smithy/util-endpoints": "^3.
|
|
63
|
-
"@smithy/util-middleware": "^4.
|
|
64
|
-
"@smithy/util-retry": "^4.
|
|
65
|
-
"@smithy/util-stream": "^4.
|
|
66
|
-
"@smithy/util-utf8": "^4.
|
|
67
|
-
"@smithy/uuid": "^1.
|
|
23
|
+
"@aws-sdk/core": "3.901.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.901.0",
|
|
25
|
+
"@aws-sdk/eventstream-handler-node": "3.901.0",
|
|
26
|
+
"@aws-sdk/middleware-eventstream": "3.901.0",
|
|
27
|
+
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
28
|
+
"@aws-sdk/middleware-logger": "3.901.0",
|
|
29
|
+
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.901.0",
|
|
31
|
+
"@aws-sdk/middleware-websocket": "3.901.0",
|
|
32
|
+
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
33
|
+
"@aws-sdk/token-providers": "3.901.0",
|
|
34
|
+
"@aws-sdk/types": "3.901.0",
|
|
35
|
+
"@aws-sdk/util-endpoints": "3.901.0",
|
|
36
|
+
"@aws-sdk/util-user-agent-browser": "3.901.0",
|
|
37
|
+
"@aws-sdk/util-user-agent-node": "3.901.0",
|
|
38
|
+
"@smithy/config-resolver": "^4.3.0",
|
|
39
|
+
"@smithy/core": "^3.14.0",
|
|
40
|
+
"@smithy/eventstream-serde-browser": "^4.2.0",
|
|
41
|
+
"@smithy/eventstream-serde-config-resolver": "^4.3.0",
|
|
42
|
+
"@smithy/eventstream-serde-node": "^4.2.0",
|
|
43
|
+
"@smithy/fetch-http-handler": "^5.3.0",
|
|
44
|
+
"@smithy/hash-node": "^4.2.0",
|
|
45
|
+
"@smithy/invalid-dependency": "^4.2.0",
|
|
46
|
+
"@smithy/middleware-content-length": "^4.2.0",
|
|
47
|
+
"@smithy/middleware-endpoint": "^4.3.0",
|
|
48
|
+
"@smithy/middleware-retry": "^4.4.0",
|
|
49
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
50
|
+
"@smithy/middleware-stack": "^4.2.0",
|
|
51
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
52
|
+
"@smithy/node-http-handler": "^4.3.0",
|
|
53
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
54
|
+
"@smithy/smithy-client": "^4.7.0",
|
|
55
|
+
"@smithy/types": "^4.6.0",
|
|
56
|
+
"@smithy/url-parser": "^4.2.0",
|
|
57
|
+
"@smithy/util-base64": "^4.2.0",
|
|
58
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
59
|
+
"@smithy/util-body-length-node": "^4.2.0",
|
|
60
|
+
"@smithy/util-defaults-mode-browser": "^4.2.0",
|
|
61
|
+
"@smithy/util-defaults-mode-node": "^4.2.0",
|
|
62
|
+
"@smithy/util-endpoints": "^3.2.0",
|
|
63
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
64
|
+
"@smithy/util-retry": "^4.2.0",
|
|
65
|
+
"@smithy/util-stream": "^4.4.0",
|
|
66
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
67
|
+
"@smithy/uuid": "^1.1.0",
|
|
68
68
|
"tslib": "^2.6.2"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|