@aws-sdk/client-bedrock-runtime 3.928.0 → 3.929.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 +1760 -2169
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/BedrockRuntimeClient.js +2 -0
- package/dist-es/commands/ApplyGuardrailCommand.js +3 -10
- package/dist-es/commands/ConverseCommand.js +3 -10
- package/dist-es/commands/ConverseStreamCommand.js +3 -10
- package/dist-es/commands/CountTokensCommand.js +3 -10
- package/dist-es/commands/GetAsyncInvokeCommand.js +3 -10
- package/dist-es/commands/InvokeModelCommand.js +3 -10
- package/dist-es/commands/InvokeModelWithBidirectionalStreamCommand.js +2 -7
- package/dist-es/commands/InvokeModelWithResponseStreamCommand.js +3 -10
- package/dist-es/commands/ListAsyncInvokesCommand.js +3 -10
- package/dist-es/commands/StartAsyncInvokeCommand.js +3 -10
- package/dist-es/models/models_0.js +0 -430
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +1720 -0
- package/dist-types/BedrockRuntimeClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +0 -240
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +211 -0
- package/dist-types/ts3.4/BedrockRuntimeClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -174
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +218 -0
- package/package.json +3 -4
- package/dist-es/protocols/Aws_restJson1.js +0 -1589
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -92
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -128
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const protocols_1 = require("@aws-sdk/core/protocols");
|
|
5
6
|
const core_2 = require("@smithy/core");
|
|
6
7
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
8
|
const url_parser_1 = require("@smithy/url-parser");
|
|
@@ -31,6 +32,7 @@ const getRuntimeConfig = (config) => {
|
|
|
31
32
|
},
|
|
32
33
|
],
|
|
33
34
|
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
35
|
+
protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.bedrockruntime" }),
|
|
34
36
|
serviceId: config?.serviceId ?? "Bedrock Runtime",
|
|
35
37
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
36
38
|
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
@@ -6,6 +6,7 @@ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware
|
|
|
6
6
|
import { resolveWebSocketConfig } from "@aws-sdk/middleware-websocket";
|
|
7
7
|
import { resolveRegionConfig } from "@smithy/config-resolver";
|
|
8
8
|
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
9
|
+
import { getSchemaSerdePlugin } from "@smithy/core/schema";
|
|
9
10
|
import { resolveEventStreamSerdeConfig, } from "@smithy/eventstream-serde-config-resolver";
|
|
10
11
|
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
11
12
|
import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
|
|
@@ -34,6 +35,7 @@ export class BedrockRuntimeClient extends __Client {
|
|
|
34
35
|
const _config_10 = resolveWebSocketConfig(_config_9);
|
|
35
36
|
const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []);
|
|
36
37
|
this.config = _config_11;
|
|
38
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
37
39
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
38
40
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
39
41
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_ApplyGuardrailCommand, se_ApplyGuardrailCommand } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { ApplyGuardrail } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class ApplyGuardrailCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonBedrockFrontendService", "ApplyGuardrail", {})
|
|
18
13
|
.n("BedrockRuntimeClient", "ApplyGuardrailCommand")
|
|
19
|
-
.
|
|
20
|
-
.ser(se_ApplyGuardrailCommand)
|
|
21
|
-
.de(de_ApplyGuardrailCommand)
|
|
14
|
+
.sc(ApplyGuardrail)
|
|
22
15
|
.build() {
|
|
23
16
|
}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_ConverseCommand, se_ConverseCommand } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { Converse } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class ConverseCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonBedrockFrontendService", "Converse", {})
|
|
18
13
|
.n("BedrockRuntimeClient", "ConverseCommand")
|
|
19
|
-
.
|
|
20
|
-
.ser(se_ConverseCommand)
|
|
21
|
-
.de(de_ConverseCommand)
|
|
14
|
+
.sc(Converse)
|
|
22
15
|
.build() {
|
|
23
16
|
}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_ConverseStreamCommand, se_ConverseStreamCommand } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { ConverseStream } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class ConverseStreamCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonBedrockFrontendService", "ConverseStream", {
|
|
18
13
|
eventStream: {
|
|
@@ -20,8 +15,6 @@ export class ConverseStreamCommand extends $Command
|
|
|
20
15
|
},
|
|
21
16
|
})
|
|
22
17
|
.n("BedrockRuntimeClient", "ConverseStreamCommand")
|
|
23
|
-
.
|
|
24
|
-
.ser(se_ConverseStreamCommand)
|
|
25
|
-
.de(de_ConverseStreamCommand)
|
|
18
|
+
.sc(ConverseStream)
|
|
26
19
|
.build() {
|
|
27
20
|
}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_CountTokensCommand, se_CountTokensCommand } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { CountTokens } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class CountTokensCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonBedrockFrontendService", "CountTokens", {})
|
|
18
13
|
.n("BedrockRuntimeClient", "CountTokensCommand")
|
|
19
|
-
.
|
|
20
|
-
.ser(se_CountTokensCommand)
|
|
21
|
-
.de(de_CountTokensCommand)
|
|
14
|
+
.sc(CountTokens)
|
|
22
15
|
.build() {
|
|
23
16
|
}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_GetAsyncInvokeCommand, se_GetAsyncInvokeCommand } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { GetAsyncInvoke } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class GetAsyncInvokeCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonBedrockFrontendService", "GetAsyncInvoke", {})
|
|
18
13
|
.n("BedrockRuntimeClient", "GetAsyncInvokeCommand")
|
|
19
|
-
.
|
|
20
|
-
.ser(se_GetAsyncInvokeCommand)
|
|
21
|
-
.de(de_GetAsyncInvokeCommand)
|
|
14
|
+
.sc(GetAsyncInvoke)
|
|
22
15
|
.build() {
|
|
23
16
|
}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_InvokeModelCommand, se_InvokeModelCommand } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { InvokeModel } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class InvokeModelCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonBedrockFrontendService", "InvokeModel", {})
|
|
18
13
|
.n("BedrockRuntimeClient", "InvokeModelCommand")
|
|
19
|
-
.
|
|
20
|
-
.ser(se_InvokeModelCommand)
|
|
21
|
-
.de(de_InvokeModelCommand)
|
|
14
|
+
.sc(InvokeModel)
|
|
22
15
|
.build() {
|
|
23
16
|
}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { getEventStreamPlugin } from "@aws-sdk/middleware-eventstream";
|
|
2
2
|
import { getWebSocketPlugin } from "@aws-sdk/middleware-websocket";
|
|
3
3
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
4
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
5
4
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
6
5
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
7
|
-
import {
|
|
8
|
-
import { de_InvokeModelWithBidirectionalStreamCommand, se_InvokeModelWithBidirectionalStreamCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
import { InvokeModelWithBidirectionalStream } from "../schemas/schemas_0";
|
|
9
7
|
export { $Command };
|
|
10
8
|
export class InvokeModelWithBidirectionalStreamCommand extends $Command
|
|
11
9
|
.classBuilder()
|
|
12
10
|
.ep(commonParams)
|
|
13
11
|
.m(function (Command, cs, config, o) {
|
|
14
12
|
return [
|
|
15
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
16
13
|
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
17
14
|
getEventStreamPlugin(config),
|
|
18
15
|
getWebSocketPlugin(config, {
|
|
@@ -27,8 +24,6 @@ export class InvokeModelWithBidirectionalStreamCommand extends $Command
|
|
|
27
24
|
},
|
|
28
25
|
})
|
|
29
26
|
.n("BedrockRuntimeClient", "InvokeModelWithBidirectionalStreamCommand")
|
|
30
|
-
.
|
|
31
|
-
.ser(se_InvokeModelWithBidirectionalStreamCommand)
|
|
32
|
-
.de(de_InvokeModelWithBidirectionalStreamCommand)
|
|
27
|
+
.sc(InvokeModelWithBidirectionalStream)
|
|
33
28
|
.build() {
|
|
34
29
|
}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_InvokeModelWithResponseStreamCommand, se_InvokeModelWithResponseStreamCommand, } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { InvokeModelWithResponseStream } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class InvokeModelWithResponseStreamCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonBedrockFrontendService", "InvokeModelWithResponseStream", {
|
|
18
13
|
eventStream: {
|
|
@@ -20,8 +15,6 @@ export class InvokeModelWithResponseStreamCommand extends $Command
|
|
|
20
15
|
},
|
|
21
16
|
})
|
|
22
17
|
.n("BedrockRuntimeClient", "InvokeModelWithResponseStreamCommand")
|
|
23
|
-
.
|
|
24
|
-
.ser(se_InvokeModelWithResponseStreamCommand)
|
|
25
|
-
.de(de_InvokeModelWithResponseStreamCommand)
|
|
18
|
+
.sc(InvokeModelWithResponseStream)
|
|
26
19
|
.build() {
|
|
27
20
|
}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_ListAsyncInvokesCommand, se_ListAsyncInvokesCommand } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { ListAsyncInvokes } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class ListAsyncInvokesCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonBedrockFrontendService", "ListAsyncInvokes", {})
|
|
18
13
|
.n("BedrockRuntimeClient", "ListAsyncInvokesCommand")
|
|
19
|
-
.
|
|
20
|
-
.ser(se_ListAsyncInvokesCommand)
|
|
21
|
-
.de(de_ListAsyncInvokesCommand)
|
|
14
|
+
.sc(ListAsyncInvokes)
|
|
22
15
|
.build() {
|
|
23
16
|
}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_StartAsyncInvokeCommand, se_StartAsyncInvokeCommand } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { StartAsyncInvoke } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class StartAsyncInvokeCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonBedrockFrontendService", "StartAsyncInvoke", {})
|
|
18
13
|
.n("BedrockRuntimeClient", "StartAsyncInvokeCommand")
|
|
19
|
-
.
|
|
20
|
-
.ser(se_StartAsyncInvokeCommand)
|
|
21
|
-
.de(de_StartAsyncInvokeCommand)
|
|
14
|
+
.sc(StartAsyncInvoke)
|
|
22
15
|
.build() {
|
|
23
16
|
}
|