@aws-sdk/client-bedrock 3.613.0 → 3.616.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 +47 -5
- package/dist-es/BedrockClient.js +5 -5
- package/dist-es/models/models_0.js +4 -0
- package/dist-es/protocols/Aws_restJson1.js +41 -1
- package/dist-types/BedrockClient.d.ts +2 -2
- package/dist-types/commands/CreateGuardrailCommand.d.ts +30 -30
- package/dist-types/commands/GetGuardrailCommand.d.ts +8 -0
- package/dist-types/commands/UpdateGuardrailCommand.d.ts +9 -4
- package/dist-types/models/models_0.d.ts +415 -62
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/BedrockClient.d.ts +2 -2
- package/dist-types/ts3.4/models/models_0.d.ts +23 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/package.json +24 -24
package/dist-cjs/index.js
CHANGED
|
@@ -67,6 +67,7 @@ __export(src_exports, {
|
|
|
67
67
|
GetModelInvocationLoggingConfigurationCommand: () => GetModelInvocationLoggingConfigurationCommand,
|
|
68
68
|
GetProvisionedModelThroughputCommand: () => GetProvisionedModelThroughputCommand,
|
|
69
69
|
GuardrailContentFilterType: () => GuardrailContentFilterType,
|
|
70
|
+
GuardrailContextualGroundingFilterType: () => GuardrailContextualGroundingFilterType,
|
|
70
71
|
GuardrailFilterStrength: () => GuardrailFilterStrength,
|
|
71
72
|
GuardrailManagedWordsType: () => GuardrailManagedWordsType,
|
|
72
73
|
GuardrailPiiEntityType: () => GuardrailPiiEntityType,
|
|
@@ -224,19 +225,19 @@ var _BedrockClient = class _BedrockClient extends import_smithy_client.Client {
|
|
|
224
225
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
225
226
|
const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
|
|
226
227
|
const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
|
|
227
|
-
const _config_4 = (0,
|
|
228
|
-
const _config_5 = (0,
|
|
229
|
-
const _config_6 = (0,
|
|
228
|
+
const _config_4 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_3);
|
|
229
|
+
const _config_5 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_4);
|
|
230
|
+
const _config_6 = (0, import_middleware_retry.resolveRetryConfig)(_config_5);
|
|
230
231
|
const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
|
|
231
232
|
const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
|
|
232
233
|
super(_config_8);
|
|
233
234
|
this.config = _config_8;
|
|
234
|
-
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
235
|
-
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
236
235
|
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
237
236
|
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
238
237
|
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
239
238
|
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
239
|
+
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
240
|
+
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
240
241
|
this.middlewareStack.use(
|
|
241
242
|
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
242
243
|
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
|
|
@@ -483,6 +484,10 @@ var GuardrailContentFilterType = {
|
|
|
483
484
|
SEXUAL: "SEXUAL",
|
|
484
485
|
VIOLENCE: "VIOLENCE"
|
|
485
486
|
};
|
|
487
|
+
var GuardrailContextualGroundingFilterType = {
|
|
488
|
+
GROUNDING: "GROUNDING",
|
|
489
|
+
RELEVANCE: "RELEVANCE"
|
|
490
|
+
};
|
|
486
491
|
var GuardrailSensitiveInformationAction = {
|
|
487
492
|
ANONYMIZE: "ANONYMIZE",
|
|
488
493
|
BLOCK: "BLOCK"
|
|
@@ -791,6 +796,7 @@ var se_CreateGuardrailCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
791
796
|
blockedOutputsMessaging: [],
|
|
792
797
|
clientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
|
|
793
798
|
contentPolicyConfig: (_) => (0, import_smithy_client._json)(_),
|
|
799
|
+
contextualGroundingPolicyConfig: (_) => se_GuardrailContextualGroundingPolicyConfig(_, context),
|
|
794
800
|
description: [],
|
|
795
801
|
kmsKeyId: [],
|
|
796
802
|
name: [],
|
|
@@ -1165,6 +1171,7 @@ var se_UpdateGuardrailCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
1165
1171
|
blockedInputMessaging: [],
|
|
1166
1172
|
blockedOutputsMessaging: [],
|
|
1167
1173
|
contentPolicyConfig: (_) => (0, import_smithy_client._json)(_),
|
|
1174
|
+
contextualGroundingPolicyConfig: (_) => se_GuardrailContextualGroundingPolicyConfig(_, context),
|
|
1168
1175
|
description: [],
|
|
1169
1176
|
kmsKeyId: [],
|
|
1170
1177
|
name: [],
|
|
@@ -1386,6 +1393,7 @@ var de_GetGuardrailCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1386
1393
|
blockedInputMessaging: import_smithy_client.expectString,
|
|
1387
1394
|
blockedOutputsMessaging: import_smithy_client.expectString,
|
|
1388
1395
|
contentPolicy: import_smithy_client._json,
|
|
1396
|
+
contextualGroundingPolicy: (_) => de_GuardrailContextualGroundingPolicy(_, context),
|
|
1389
1397
|
createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
1390
1398
|
description: import_smithy_client.expectString,
|
|
1391
1399
|
failureRecommendations: import_smithy_client._json,
|
|
@@ -1804,6 +1812,22 @@ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, cont
|
|
|
1804
1812
|
});
|
|
1805
1813
|
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
1806
1814
|
}, "de_ValidationExceptionRes");
|
|
1815
|
+
var se_GuardrailContextualGroundingFilterConfig = /* @__PURE__ */ __name((input, context) => {
|
|
1816
|
+
return (0, import_smithy_client.take)(input, {
|
|
1817
|
+
threshold: import_smithy_client.serializeFloat,
|
|
1818
|
+
type: []
|
|
1819
|
+
});
|
|
1820
|
+
}, "se_GuardrailContextualGroundingFilterConfig");
|
|
1821
|
+
var se_GuardrailContextualGroundingFiltersConfig = /* @__PURE__ */ __name((input, context) => {
|
|
1822
|
+
return input.filter((e) => e != null).map((entry) => {
|
|
1823
|
+
return se_GuardrailContextualGroundingFilterConfig(entry, context);
|
|
1824
|
+
});
|
|
1825
|
+
}, "se_GuardrailContextualGroundingFiltersConfig");
|
|
1826
|
+
var se_GuardrailContextualGroundingPolicyConfig = /* @__PURE__ */ __name((input, context) => {
|
|
1827
|
+
return (0, import_smithy_client.take)(input, {
|
|
1828
|
+
filtersConfig: (_) => se_GuardrailContextualGroundingFiltersConfig(_, context)
|
|
1829
|
+
});
|
|
1830
|
+
}, "se_GuardrailContextualGroundingPolicyConfig");
|
|
1807
1831
|
var de_CustomModelSummary = /* @__PURE__ */ __name((output, context) => {
|
|
1808
1832
|
return (0, import_smithy_client.take)(output, {
|
|
1809
1833
|
baseModelArn: import_smithy_client.expectString,
|
|
@@ -1837,6 +1861,23 @@ var de_EvaluationSummary = /* @__PURE__ */ __name((output, context) => {
|
|
|
1837
1861
|
status: import_smithy_client.expectString
|
|
1838
1862
|
});
|
|
1839
1863
|
}, "de_EvaluationSummary");
|
|
1864
|
+
var de_GuardrailContextualGroundingFilter = /* @__PURE__ */ __name((output, context) => {
|
|
1865
|
+
return (0, import_smithy_client.take)(output, {
|
|
1866
|
+
threshold: import_smithy_client.limitedParseDouble,
|
|
1867
|
+
type: import_smithy_client.expectString
|
|
1868
|
+
});
|
|
1869
|
+
}, "de_GuardrailContextualGroundingFilter");
|
|
1870
|
+
var de_GuardrailContextualGroundingFilters = /* @__PURE__ */ __name((output, context) => {
|
|
1871
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1872
|
+
return de_GuardrailContextualGroundingFilter(entry, context);
|
|
1873
|
+
});
|
|
1874
|
+
return retVal;
|
|
1875
|
+
}, "de_GuardrailContextualGroundingFilters");
|
|
1876
|
+
var de_GuardrailContextualGroundingPolicy = /* @__PURE__ */ __name((output, context) => {
|
|
1877
|
+
return (0, import_smithy_client.take)(output, {
|
|
1878
|
+
filters: (_) => de_GuardrailContextualGroundingFilters(_, context)
|
|
1879
|
+
});
|
|
1880
|
+
}, "de_GuardrailContextualGroundingPolicy");
|
|
1840
1881
|
var de_GuardrailSummaries = /* @__PURE__ */ __name((output, context) => {
|
|
1841
1882
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1842
1883
|
return de_GuardrailSummary(entry, context);
|
|
@@ -2533,6 +2574,7 @@ var paginateListProvisionedModelThroughputs = (0, import_core.createPaginator)(B
|
|
|
2533
2574
|
SortOrder,
|
|
2534
2575
|
GuardrailFilterStrength,
|
|
2535
2576
|
GuardrailContentFilterType,
|
|
2577
|
+
GuardrailContextualGroundingFilterType,
|
|
2536
2578
|
GuardrailSensitiveInformationAction,
|
|
2537
2579
|
GuardrailPiiEntityType,
|
|
2538
2580
|
GuardrailTopicType,
|
package/dist-es/BedrockClient.js
CHANGED
|
@@ -19,19 +19,19 @@ export class BedrockClient extends __Client {
|
|
|
19
19
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
20
20
|
const _config_2 = resolveRegionConfig(_config_1);
|
|
21
21
|
const _config_3 = resolveEndpointConfig(_config_2);
|
|
22
|
-
const _config_4 =
|
|
23
|
-
const _config_5 =
|
|
24
|
-
const _config_6 =
|
|
22
|
+
const _config_4 = resolveHostHeaderConfig(_config_3);
|
|
23
|
+
const _config_5 = resolveUserAgentConfig(_config_4);
|
|
24
|
+
const _config_6 = resolveRetryConfig(_config_5);
|
|
25
25
|
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
26
26
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
27
27
|
super(_config_8);
|
|
28
28
|
this.config = _config_8;
|
|
29
|
-
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
30
|
-
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
31
29
|
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
32
30
|
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
33
31
|
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
34
32
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
33
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
34
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
35
35
|
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
36
36
|
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
|
|
37
37
|
identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
|
|
@@ -157,6 +157,10 @@ export const GuardrailContentFilterType = {
|
|
|
157
157
|
SEXUAL: "SEXUAL",
|
|
158
158
|
VIOLENCE: "VIOLENCE",
|
|
159
159
|
};
|
|
160
|
+
export const GuardrailContextualGroundingFilterType = {
|
|
161
|
+
GROUNDING: "GROUNDING",
|
|
162
|
+
RELEVANCE: "RELEVANCE",
|
|
163
|
+
};
|
|
160
164
|
export const GuardrailSensitiveInformationAction = {
|
|
161
165
|
ANONYMIZE: "ANONYMIZE",
|
|
162
166
|
BLOCK: "BLOCK",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
2
2
|
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeDateTime as __serializeDateTime, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeDateTime as __serializeDateTime, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
import { BedrockServiceException as __BaseException } from "../models/BedrockServiceException";
|
|
6
6
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0";
|
|
@@ -37,6 +37,7 @@ export const se_CreateGuardrailCommand = async (input, context) => {
|
|
|
37
37
|
blockedOutputsMessaging: [],
|
|
38
38
|
clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
39
39
|
contentPolicyConfig: (_) => _json(_),
|
|
40
|
+
contextualGroundingPolicyConfig: (_) => se_GuardrailContextualGroundingPolicyConfig(_, context),
|
|
40
41
|
description: [],
|
|
41
42
|
kmsKeyId: [],
|
|
42
43
|
name: [],
|
|
@@ -395,6 +396,7 @@ export const se_UpdateGuardrailCommand = async (input, context) => {
|
|
|
395
396
|
blockedInputMessaging: [],
|
|
396
397
|
blockedOutputsMessaging: [],
|
|
397
398
|
contentPolicyConfig: (_) => _json(_),
|
|
399
|
+
contextualGroundingPolicyConfig: (_) => se_GuardrailContextualGroundingPolicyConfig(_, context),
|
|
398
400
|
description: [],
|
|
399
401
|
kmsKeyId: [],
|
|
400
402
|
name: [],
|
|
@@ -613,6 +615,7 @@ export const de_GetGuardrailCommand = async (output, context) => {
|
|
|
613
615
|
blockedInputMessaging: __expectString,
|
|
614
616
|
blockedOutputsMessaging: __expectString,
|
|
615
617
|
contentPolicy: _json,
|
|
618
|
+
contextualGroundingPolicy: (_) => de_GuardrailContextualGroundingPolicy(_, context),
|
|
616
619
|
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
617
620
|
description: __expectString,
|
|
618
621
|
failureRecommendations: _json,
|
|
@@ -1031,6 +1034,24 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
1031
1034
|
});
|
|
1032
1035
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
1033
1036
|
};
|
|
1037
|
+
const se_GuardrailContextualGroundingFilterConfig = (input, context) => {
|
|
1038
|
+
return take(input, {
|
|
1039
|
+
threshold: __serializeFloat,
|
|
1040
|
+
type: [],
|
|
1041
|
+
});
|
|
1042
|
+
};
|
|
1043
|
+
const se_GuardrailContextualGroundingFiltersConfig = (input, context) => {
|
|
1044
|
+
return input
|
|
1045
|
+
.filter((e) => e != null)
|
|
1046
|
+
.map((entry) => {
|
|
1047
|
+
return se_GuardrailContextualGroundingFilterConfig(entry, context);
|
|
1048
|
+
});
|
|
1049
|
+
};
|
|
1050
|
+
const se_GuardrailContextualGroundingPolicyConfig = (input, context) => {
|
|
1051
|
+
return take(input, {
|
|
1052
|
+
filtersConfig: (_) => se_GuardrailContextualGroundingFiltersConfig(_, context),
|
|
1053
|
+
});
|
|
1054
|
+
};
|
|
1034
1055
|
const de_CustomModelSummary = (output, context) => {
|
|
1035
1056
|
return take(output, {
|
|
1036
1057
|
baseModelArn: __expectString,
|
|
@@ -1068,6 +1089,25 @@ const de_EvaluationSummary = (output, context) => {
|
|
|
1068
1089
|
status: __expectString,
|
|
1069
1090
|
});
|
|
1070
1091
|
};
|
|
1092
|
+
const de_GuardrailContextualGroundingFilter = (output, context) => {
|
|
1093
|
+
return take(output, {
|
|
1094
|
+
threshold: __limitedParseDouble,
|
|
1095
|
+
type: __expectString,
|
|
1096
|
+
});
|
|
1097
|
+
};
|
|
1098
|
+
const de_GuardrailContextualGroundingFilters = (output, context) => {
|
|
1099
|
+
const retVal = (output || [])
|
|
1100
|
+
.filter((e) => e != null)
|
|
1101
|
+
.map((entry) => {
|
|
1102
|
+
return de_GuardrailContextualGroundingFilter(entry, context);
|
|
1103
|
+
});
|
|
1104
|
+
return retVal;
|
|
1105
|
+
};
|
|
1106
|
+
const de_GuardrailContextualGroundingPolicy = (output, context) => {
|
|
1107
|
+
return take(output, {
|
|
1108
|
+
filters: (_) => de_GuardrailContextualGroundingFilters(_, context),
|
|
1109
|
+
});
|
|
1110
|
+
};
|
|
1071
1111
|
const de_GuardrailSummaries = (output, context) => {
|
|
1072
1112
|
const retVal = (output || [])
|
|
1073
1113
|
.filter((e) => e != null)
|
|
@@ -161,7 +161,7 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
|
|
|
161
161
|
/**
|
|
162
162
|
* @public
|
|
163
163
|
*/
|
|
164
|
-
export type BedrockClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> &
|
|
164
|
+
export type BedrockClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & HostHeaderInputConfig & UserAgentInputConfig & RetryInputConfig & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
|
|
165
165
|
/**
|
|
166
166
|
* @public
|
|
167
167
|
*
|
|
@@ -172,7 +172,7 @@ export interface BedrockClientConfig extends BedrockClientConfigType {
|
|
|
172
172
|
/**
|
|
173
173
|
* @public
|
|
174
174
|
*/
|
|
175
|
-
export type BedrockClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> &
|
|
175
|
+
export type BedrockClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HostHeaderResolvedConfig & UserAgentResolvedConfig & RetryResolvedConfig & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
|
176
176
|
/**
|
|
177
177
|
* @public
|
|
178
178
|
*
|
|
@@ -27,46 +27,38 @@ declare const CreateGuardrailCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Creates a guardrail to block topics and to
|
|
30
|
+
* <p>Creates a guardrail to block topics and to implement safeguards for your generative AI applications.</p>
|
|
31
|
+
* <p>You can configure the following policies in a guardrail to avoid undesirable and harmful content, filter
|
|
32
|
+
* out denied topics and words, and remove sensitive information for privacy protection.</p>
|
|
31
33
|
* <ul>
|
|
32
34
|
* <li>
|
|
33
|
-
* <p>
|
|
35
|
+
* <p>
|
|
36
|
+
* <b>Content filters</b> - Adjust filter strengths
|
|
37
|
+
* to block input prompts or model responses containing harmful content.</p>
|
|
34
38
|
* </li>
|
|
35
39
|
* <li>
|
|
36
|
-
* <p>
|
|
40
|
+
* <p>
|
|
41
|
+
* <b>Denied topics</b> - Define a set of topics that
|
|
42
|
+
* are undesirable in the context of your application. These topics will be blocked if
|
|
43
|
+
* detected in user queries or model responses.</p>
|
|
37
44
|
* </li>
|
|
38
45
|
* <li>
|
|
39
|
-
* <p>
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* </li>
|
|
44
|
-
* <li>
|
|
45
|
-
* <p>Specify <code>DENY</code> in the <code>type</code> field.</p>
|
|
46
|
-
* </li>
|
|
47
|
-
* <li>
|
|
48
|
-
* <p>(Optional) Provide up to five prompts that you would categorize as belonging to the topic in the <code>examples</code> list.</p>
|
|
49
|
-
* </li>
|
|
50
|
-
* </ul>
|
|
46
|
+
* <p>
|
|
47
|
+
* <b>Word filters</b> - Configure filters to block
|
|
48
|
+
* undesirable words, phrases, and profanity. Such words can include offensive terms,
|
|
49
|
+
* competitor names etc.</p>
|
|
51
50
|
* </li>
|
|
52
51
|
* <li>
|
|
53
|
-
* <p>
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* </li>
|
|
58
|
-
* <li>
|
|
59
|
-
* <p>Specify the strength of the filter for prompts in the <code>inputStrength</code> field and for model responses in the <code>strength</code> field of the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailContentFilterConfig.html">GuardrailContentFilterConfig</a>.</p>
|
|
60
|
-
* </li>
|
|
61
|
-
* </ul>
|
|
62
|
-
* </li>
|
|
63
|
-
* <li>
|
|
64
|
-
* <p>(Optional) For security, include the ARN of a KMS key in the <code>kmsKeyId</code> field.</p>
|
|
65
|
-
* </li>
|
|
66
|
-
* <li>
|
|
67
|
-
* <p>(Optional) Attach any tags to the guardrail in the <code>tags</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tagging">Tag resources</a>.</p>
|
|
52
|
+
* <p>
|
|
53
|
+
* <b>Sensitive information filters</b> - Block or
|
|
54
|
+
* mask sensitive information such as personally identifiable information (PII) or custom
|
|
55
|
+
* regex in user inputs and model responses.</p>
|
|
68
56
|
* </li>
|
|
69
57
|
* </ul>
|
|
58
|
+
* <p>In addition to the above policies, you can also configure the messages to be returned to
|
|
59
|
+
* the user if a user input or model response is in violation of the policies defined in the guardrail.</p>
|
|
60
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html">Guardrails for Amazon Bedrock</a> in
|
|
61
|
+
* the <i>Amazon Bedrock User Guide</i>.</p>
|
|
70
62
|
* @example
|
|
71
63
|
* Use a bare-bones client and the command you need to make an API call.
|
|
72
64
|
* ```javascript
|
|
@@ -125,6 +117,14 @@ declare const CreateGuardrailCommand_base: {
|
|
|
125
117
|
* },
|
|
126
118
|
* ],
|
|
127
119
|
* },
|
|
120
|
+
* contextualGroundingPolicyConfig: { // GuardrailContextualGroundingPolicyConfig
|
|
121
|
+
* filtersConfig: [ // GuardrailContextualGroundingFiltersConfig // required
|
|
122
|
+
* { // GuardrailContextualGroundingFilterConfig
|
|
123
|
+
* type: "GROUNDING" || "RELEVANCE", // required
|
|
124
|
+
* threshold: Number("double"), // required
|
|
125
|
+
* },
|
|
126
|
+
* ],
|
|
127
|
+
* },
|
|
128
128
|
* blockedInputMessaging: "STRING_VALUE", // required
|
|
129
129
|
* blockedOutputsMessaging: "STRING_VALUE", // required
|
|
130
130
|
* kmsKeyId: "STRING_VALUE",
|
|
@@ -96,6 +96,14 @@ declare const GetGuardrailCommand_base: {
|
|
|
96
96
|
* // },
|
|
97
97
|
* // ],
|
|
98
98
|
* // },
|
|
99
|
+
* // contextualGroundingPolicy: { // GuardrailContextualGroundingPolicy
|
|
100
|
+
* // filters: [ // GuardrailContextualGroundingFilters // required
|
|
101
|
+
* // { // GuardrailContextualGroundingFilter
|
|
102
|
+
* // type: "GROUNDING" || "RELEVANCE", // required
|
|
103
|
+
* // threshold: Number("double"), // required
|
|
104
|
+
* // },
|
|
105
|
+
* // ],
|
|
106
|
+
* // },
|
|
99
107
|
* // createdAt: new Date("TIMESTAMP"), // required
|
|
100
108
|
* // updatedAt: new Date("TIMESTAMP"), // required
|
|
101
109
|
* // statusReasons: [ // GuardrailStatusReasons
|
|
@@ -50,7 +50,7 @@ declare const UpdateGuardrailCommand_base: {
|
|
|
50
50
|
* </ul>
|
|
51
51
|
* </li>
|
|
52
52
|
* <li>
|
|
53
|
-
* <p>Specify filter strengths for the harmful categories defined in Amazon Bedrock in the <code>contentPolicyConfig</code> object. Each <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailContentFilterConfig.html">GuardrailContentFilterConfig</a> object in the <code>filtersConfig</code> list pertains to a harmful category. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-filters">Content filters</a>. For more information about the fields in a content filter, see <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailContentFilterConfig.html">GuardrailContentFilterConfig</a>.</p>
|
|
53
|
+
* <p>Specify filter strengths for the harmful categories defined in Amazon Bedrock in the <code>contentPolicyConfig</code> object. Each <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailContentFilterConfig.html">GuardrailContentFilterConfig</a> object in the <code>filtersConfig</code> list pertains to a harmful category. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-content-filters">Content filters</a>. For more information about the fields in a content filter, see <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailContentFilterConfig.html">GuardrailContentFilterConfig</a>.</p>
|
|
54
54
|
* <ul>
|
|
55
55
|
* <li>
|
|
56
56
|
* <p>Specify the category in the <code>type</code> field.</p>
|
|
@@ -63,9 +63,6 @@ declare const UpdateGuardrailCommand_base: {
|
|
|
63
63
|
* <li>
|
|
64
64
|
* <p>(Optional) For security, include the ARN of a KMS key in the <code>kmsKeyId</code> field.</p>
|
|
65
65
|
* </li>
|
|
66
|
-
* <li>
|
|
67
|
-
* <p>(Optional) Attach any tags to the guardrail in the <code>tags</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tagging">Tag resources</a>.</p>
|
|
68
|
-
* </li>
|
|
69
66
|
* </ul>
|
|
70
67
|
* @example
|
|
71
68
|
* Use a bare-bones client and the command you need to make an API call.
|
|
@@ -126,6 +123,14 @@ declare const UpdateGuardrailCommand_base: {
|
|
|
126
123
|
* },
|
|
127
124
|
* ],
|
|
128
125
|
* },
|
|
126
|
+
* contextualGroundingPolicyConfig: { // GuardrailContextualGroundingPolicyConfig
|
|
127
|
+
* filtersConfig: [ // GuardrailContextualGroundingFiltersConfig // required
|
|
128
|
+
* { // GuardrailContextualGroundingFilterConfig
|
|
129
|
+
* type: "GROUNDING" || "RELEVANCE", // required
|
|
130
|
+
* threshold: Number("double"), // required
|
|
131
|
+
* },
|
|
132
|
+
* ],
|
|
133
|
+
* },
|
|
129
134
|
* blockedInputMessaging: "STRING_VALUE", // required
|
|
130
135
|
* blockedOutputsMessaging: "STRING_VALUE", // required
|
|
131
136
|
* kmsKeyId: "STRING_VALUE",
|
|
@@ -752,19 +752,6 @@ export type GuardrailContentFilterType = (typeof GuardrailContentFilterType)[key
|
|
|
752
752
|
* multiple categories with varying confidence levels. For example, a single statement
|
|
753
753
|
* can be classified as <i>Hate</i> with HIGH confidence, <i>Insults</i> with LOW confidence, <i>Sexual</i> with NONE confidence, and <i>Violence</i> with MEDIUM confidence.</p>
|
|
754
754
|
* <p>For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-filters.html">Guardrails content filters</a>.</p>
|
|
755
|
-
* <p>This data type is used in the following API operations:</p>
|
|
756
|
-
* <ul>
|
|
757
|
-
* <li>
|
|
758
|
-
* <p>
|
|
759
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateGuardrail.html#API_CreateGuardrail_RequestSyntax">CreateGuardrail request body</a>
|
|
760
|
-
* </p>
|
|
761
|
-
* </li>
|
|
762
|
-
* <li>
|
|
763
|
-
* <p>
|
|
764
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_UpdateGuardrail.html#API_UpdateGuardrail_RequestSyntax">UpdateGuardrail request body</a>
|
|
765
|
-
* </p>
|
|
766
|
-
* </li>
|
|
767
|
-
* </ul>
|
|
768
755
|
* @public
|
|
769
756
|
*/
|
|
770
757
|
export interface GuardrailContentFilterConfig {
|
|
@@ -790,19 +777,6 @@ export interface GuardrailContentFilterConfig {
|
|
|
790
777
|
}
|
|
791
778
|
/**
|
|
792
779
|
* <p>Contains details about how to handle harmful content.</p>
|
|
793
|
-
* <p>This data type is used in the following API operations:</p>
|
|
794
|
-
* <ul>
|
|
795
|
-
* <li>
|
|
796
|
-
* <p>
|
|
797
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateGuardrail.html#API_CreateGuardrail_RequestSyntax">CreateGuardrail request body</a>
|
|
798
|
-
* </p>
|
|
799
|
-
* </li>
|
|
800
|
-
* <li>
|
|
801
|
-
* <p>
|
|
802
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_UpdateGuardrail.html#API_UpdateGuardrail_RequestSyntax">UpdateGuardrail request body</a>
|
|
803
|
-
* </p>
|
|
804
|
-
* </li>
|
|
805
|
-
* </ul>
|
|
806
780
|
* @public
|
|
807
781
|
*/
|
|
808
782
|
export interface GuardrailContentPolicyConfig {
|
|
@@ -812,6 +786,45 @@ export interface GuardrailContentPolicyConfig {
|
|
|
812
786
|
*/
|
|
813
787
|
filtersConfig: GuardrailContentFilterConfig[] | undefined;
|
|
814
788
|
}
|
|
789
|
+
/**
|
|
790
|
+
* @public
|
|
791
|
+
* @enum
|
|
792
|
+
*/
|
|
793
|
+
export declare const GuardrailContextualGroundingFilterType: {
|
|
794
|
+
readonly GROUNDING: "GROUNDING";
|
|
795
|
+
readonly RELEVANCE: "RELEVANCE";
|
|
796
|
+
};
|
|
797
|
+
/**
|
|
798
|
+
* @public
|
|
799
|
+
*/
|
|
800
|
+
export type GuardrailContextualGroundingFilterType = (typeof GuardrailContextualGroundingFilterType)[keyof typeof GuardrailContextualGroundingFilterType];
|
|
801
|
+
/**
|
|
802
|
+
* <p>The filter configuration details for the guardrails contextual grounding filter.</p>
|
|
803
|
+
* @public
|
|
804
|
+
*/
|
|
805
|
+
export interface GuardrailContextualGroundingFilterConfig {
|
|
806
|
+
/**
|
|
807
|
+
* <p>The filter details for the guardrails contextual grounding filter.</p>
|
|
808
|
+
* @public
|
|
809
|
+
*/
|
|
810
|
+
type: GuardrailContextualGroundingFilterType | undefined;
|
|
811
|
+
/**
|
|
812
|
+
* <p>The threshold details for the guardrails contextual grounding filter.</p>
|
|
813
|
+
* @public
|
|
814
|
+
*/
|
|
815
|
+
threshold: number | undefined;
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* <p>The policy configuration details for the guardrails contextual grounding policy.</p>
|
|
819
|
+
* @public
|
|
820
|
+
*/
|
|
821
|
+
export interface GuardrailContextualGroundingPolicyConfig {
|
|
822
|
+
/**
|
|
823
|
+
* <p>The filter configuration details for the guardrails contextual grounding policy.</p>
|
|
824
|
+
* @public
|
|
825
|
+
*/
|
|
826
|
+
filtersConfig: GuardrailContextualGroundingFilterConfig[] | undefined;
|
|
827
|
+
}
|
|
815
828
|
/**
|
|
816
829
|
* @public
|
|
817
830
|
* @enum
|
|
@@ -872,6 +885,329 @@ export type GuardrailPiiEntityType = (typeof GuardrailPiiEntityType)[keyof typeo
|
|
|
872
885
|
export interface GuardrailPiiEntityConfig {
|
|
873
886
|
/**
|
|
874
887
|
* <p>Configure guardrail type when the PII entity is detected.</p>
|
|
888
|
+
* <p>The following PIIs are used to block or mask sensitive information:</p>
|
|
889
|
+
* <ul>
|
|
890
|
+
* <li>
|
|
891
|
+
* <p>
|
|
892
|
+
* <b>General</b>
|
|
893
|
+
* </p>
|
|
894
|
+
* <ul>
|
|
895
|
+
* <li>
|
|
896
|
+
* <p>
|
|
897
|
+
* <b>ADDRESS</b>
|
|
898
|
+
* </p>
|
|
899
|
+
* <p>A physical address, such as "100 Main Street, Anytown, USA"
|
|
900
|
+
* or "Suite #12, Building 123". An address can include information
|
|
901
|
+
* such as the street, building, location, city, state, country, county,
|
|
902
|
+
* zip code, precinct, and neighborhood. </p>
|
|
903
|
+
* </li>
|
|
904
|
+
* <li>
|
|
905
|
+
* <p>
|
|
906
|
+
* <b>AGE</b>
|
|
907
|
+
* </p>
|
|
908
|
+
* <p>An individual's age, including the quantity and unit of time. For
|
|
909
|
+
* example, in the phrase "I am 40 years old," Guarrails recognizes "40 years"
|
|
910
|
+
* as an age.
|
|
911
|
+
* </p>
|
|
912
|
+
* </li>
|
|
913
|
+
* <li>
|
|
914
|
+
* <p>
|
|
915
|
+
* <b>NAME</b>
|
|
916
|
+
* </p>
|
|
917
|
+
* <p>An individual's name. This entity type does not include titles, such as
|
|
918
|
+
* Dr., Mr., Mrs., or Miss. guardrails doesn't apply this entity type to names that
|
|
919
|
+
* are part of organizations or addresses. For example, guardrails recognizes
|
|
920
|
+
* the "John Doe Organization" as an organization, and it recognizes "Jane Doe
|
|
921
|
+
* Street" as an address.
|
|
922
|
+
* </p>
|
|
923
|
+
* </li>
|
|
924
|
+
* <li>
|
|
925
|
+
* <p>
|
|
926
|
+
* <b>EMAIL</b>
|
|
927
|
+
* </p>
|
|
928
|
+
* <p>An email address, such as <i>marymajor@email.com</i>.</p>
|
|
929
|
+
* </li>
|
|
930
|
+
* <li>
|
|
931
|
+
* <p>
|
|
932
|
+
* <b>PHONE</b>
|
|
933
|
+
* </p>
|
|
934
|
+
* <p>A phone number. This entity type also includes fax and pager numbers.
|
|
935
|
+
* </p>
|
|
936
|
+
* </li>
|
|
937
|
+
* <li>
|
|
938
|
+
* <p>
|
|
939
|
+
* <b>USERNAME</b>
|
|
940
|
+
* </p>
|
|
941
|
+
* <p>A user name that identifies an account, such as a login name, screen name,
|
|
942
|
+
* nick name, or handle.
|
|
943
|
+
* </p>
|
|
944
|
+
* </li>
|
|
945
|
+
* <li>
|
|
946
|
+
* <p>
|
|
947
|
+
* <b>PASSWORD</b>
|
|
948
|
+
* </p>
|
|
949
|
+
* <p>An alphanumeric string that is used as a password, such as
|
|
950
|
+
* "*<i>very20special#pass*</i>".
|
|
951
|
+
* </p>
|
|
952
|
+
* </li>
|
|
953
|
+
* <li>
|
|
954
|
+
* <p>
|
|
955
|
+
* <b>DRIVER_ID</b>
|
|
956
|
+
* </p>
|
|
957
|
+
* <p>The number assigned to a driver's license, which is an official
|
|
958
|
+
* document permitting an individual to operate one or more motorized
|
|
959
|
+
* vehicles on a public road. A driver's license number consists of
|
|
960
|
+
* alphanumeric characters.
|
|
961
|
+
* </p>
|
|
962
|
+
* </li>
|
|
963
|
+
* <li>
|
|
964
|
+
* <p>
|
|
965
|
+
* <b>LICENSE_PLATE</b>
|
|
966
|
+
* </p>
|
|
967
|
+
* <p>A license plate for a vehicle is issued by the state or country where
|
|
968
|
+
* the vehicle is registered. The format for passenger vehicles is typically
|
|
969
|
+
* five to eight digits, consisting of upper-case letters and numbers. The
|
|
970
|
+
* format varies depending on the location of the issuing state or country.
|
|
971
|
+
* </p>
|
|
972
|
+
* </li>
|
|
973
|
+
* <li>
|
|
974
|
+
* <p>
|
|
975
|
+
* <b>VEHICLE_IDENTIFICATION_NUMBER</b>
|
|
976
|
+
* </p>
|
|
977
|
+
* <p>A Vehicle Identification Number (VIN) uniquely identifies a vehicle.
|
|
978
|
+
* VIN content and format are defined in the <i>ISO 3779</i> specification.
|
|
979
|
+
* Each country has specific codes and formats for VINs.
|
|
980
|
+
* </p>
|
|
981
|
+
* </li>
|
|
982
|
+
* </ul>
|
|
983
|
+
* </li>
|
|
984
|
+
* <li>
|
|
985
|
+
* <p>
|
|
986
|
+
* <b>Finance</b>
|
|
987
|
+
* </p>
|
|
988
|
+
* <ul>
|
|
989
|
+
* <li>
|
|
990
|
+
* <p>
|
|
991
|
+
* <b>REDIT_DEBIT_CARD_CVV</b>
|
|
992
|
+
* </p>
|
|
993
|
+
* <p>A three-digit card verification code (CVV) that is present on VISA,
|
|
994
|
+
* MasterCard, and Discover credit and debit cards. For American Express
|
|
995
|
+
* credit or debit cards, the CVV is a four-digit numeric code.
|
|
996
|
+
* </p>
|
|
997
|
+
* </li>
|
|
998
|
+
* <li>
|
|
999
|
+
* <p>
|
|
1000
|
+
* <b>CREDIT_DEBIT_CARD_EXPIRY</b>
|
|
1001
|
+
* </p>
|
|
1002
|
+
* <p>The expiration date for a credit or debit card. This number is usually
|
|
1003
|
+
* four digits long and is often formatted as <i>month/year</i> or
|
|
1004
|
+
* <i>MM/YY</i>. Guardrails recognizes expiration dates such as
|
|
1005
|
+
* <i>01/21</i>, <i>01/2021</i>, and <i>Jan 2021</i>.
|
|
1006
|
+
* </p>
|
|
1007
|
+
* </li>
|
|
1008
|
+
* <li>
|
|
1009
|
+
* <p>
|
|
1010
|
+
* <b>CREDIT_DEBIT_CARD_NUMBER</b>
|
|
1011
|
+
* </p>
|
|
1012
|
+
* <p>The number for a credit or debit card. These numbers can vary from 13 to 16
|
|
1013
|
+
* digits in length. However, Amazon Comprehend also recognizes credit or debit
|
|
1014
|
+
* card numbers when only the last four digits are present.
|
|
1015
|
+
* </p>
|
|
1016
|
+
* </li>
|
|
1017
|
+
* <li>
|
|
1018
|
+
* <p>
|
|
1019
|
+
* <b>PIN</b>
|
|
1020
|
+
* </p>
|
|
1021
|
+
* <p>A four-digit personal identification number (PIN) with which you can
|
|
1022
|
+
* access your bank account.
|
|
1023
|
+
* </p>
|
|
1024
|
+
* </li>
|
|
1025
|
+
* <li>
|
|
1026
|
+
* <p>
|
|
1027
|
+
* <b>INTERNATIONAL_BANK_ACCOUNT_NUMBER</b>
|
|
1028
|
+
* </p>
|
|
1029
|
+
* <p>An International Bank Account Number has specific formats in each country.
|
|
1030
|
+
* For more information, see <a href="https://www.iban.com/structure">www.iban.com/structure</a>.</p>
|
|
1031
|
+
* </li>
|
|
1032
|
+
* <li>
|
|
1033
|
+
* <p>
|
|
1034
|
+
* <b>SWIFT_CODE</b>
|
|
1035
|
+
* </p>
|
|
1036
|
+
* <p>A SWIFT code is a standard format of Bank Identifier Code (BIC) used to specify
|
|
1037
|
+
* a particular bank or branch. Banks use these codes for money transfers such as
|
|
1038
|
+
* international wire transfers.</p>
|
|
1039
|
+
* <p>SWIFT codes consist of eight or 11 characters. The 11-digit codes refer to specific
|
|
1040
|
+
* branches, while eight-digit codes (or 11-digit codes ending in 'XXX') refer to the
|
|
1041
|
+
* head or primary office.</p>
|
|
1042
|
+
* </li>
|
|
1043
|
+
* </ul>
|
|
1044
|
+
* </li>
|
|
1045
|
+
* <li>
|
|
1046
|
+
* <p>
|
|
1047
|
+
* <b>IT</b>
|
|
1048
|
+
* </p>
|
|
1049
|
+
* <ul>
|
|
1050
|
+
* <li>
|
|
1051
|
+
* <p>
|
|
1052
|
+
* <b>IP_ADDRESS</b>
|
|
1053
|
+
* </p>
|
|
1054
|
+
* <p>An IPv4 address, such as <i>198.51.100.0</i>.
|
|
1055
|
+
* </p>
|
|
1056
|
+
* </li>
|
|
1057
|
+
* <li>
|
|
1058
|
+
* <p>
|
|
1059
|
+
* <b>MAC_ADDRESS</b>
|
|
1060
|
+
* </p>
|
|
1061
|
+
* <p>A <i>media access control</i> (MAC) address is a unique identifier
|
|
1062
|
+
* assigned to a network interface controller (NIC).
|
|
1063
|
+
* </p>
|
|
1064
|
+
* </li>
|
|
1065
|
+
* <li>
|
|
1066
|
+
* <p>
|
|
1067
|
+
* <b>URL</b>
|
|
1068
|
+
* </p>
|
|
1069
|
+
* <p>A web address, such as <i>www.example.com</i>.
|
|
1070
|
+
* </p>
|
|
1071
|
+
* </li>
|
|
1072
|
+
* <li>
|
|
1073
|
+
* <p>
|
|
1074
|
+
* <b>AWS_ACCESS_KEY</b>
|
|
1075
|
+
* </p>
|
|
1076
|
+
* <p>A unique identifier that's associated with a secret access key;
|
|
1077
|
+
* you use the access key ID and secret access key to sign programmatic
|
|
1078
|
+
* Amazon Web Services requests cryptographically.
|
|
1079
|
+
* </p>
|
|
1080
|
+
* </li>
|
|
1081
|
+
* <li>
|
|
1082
|
+
* <p>
|
|
1083
|
+
* <b>AWS_SECRET_KEY</b>
|
|
1084
|
+
* </p>
|
|
1085
|
+
* <p>A unique identifier that's associated with an access key. You use the
|
|
1086
|
+
* access key ID and secret access key to sign programmatic Amazon Web Services
|
|
1087
|
+
* requests cryptographically.
|
|
1088
|
+
* </p>
|
|
1089
|
+
* </li>
|
|
1090
|
+
* </ul>
|
|
1091
|
+
* </li>
|
|
1092
|
+
* <li>
|
|
1093
|
+
* <p>
|
|
1094
|
+
* <b>USA specific</b>
|
|
1095
|
+
* </p>
|
|
1096
|
+
* <ul>
|
|
1097
|
+
* <li>
|
|
1098
|
+
* <p>
|
|
1099
|
+
* <b>US_BANK_ACCOUNT_NUMBER</b>
|
|
1100
|
+
* </p>
|
|
1101
|
+
* <p>A US bank account number, which is typically 10 to 12 digits long.
|
|
1102
|
+
* </p>
|
|
1103
|
+
* </li>
|
|
1104
|
+
* <li>
|
|
1105
|
+
* <p>
|
|
1106
|
+
* <b>US_BANK_ROUTING_NUMBER</b>
|
|
1107
|
+
* </p>
|
|
1108
|
+
* <p>A US bank account routing number. These are typically nine digits long,
|
|
1109
|
+
* </p>
|
|
1110
|
+
* </li>
|
|
1111
|
+
* <li>
|
|
1112
|
+
* <p>
|
|
1113
|
+
* <b>US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER</b>
|
|
1114
|
+
* </p>
|
|
1115
|
+
* <p>A US Individual Taxpayer Identification Number (ITIN) is a nine-digit number
|
|
1116
|
+
* that starts with a "9" and contain a "7" or "8" as the fourth digit. An ITIN
|
|
1117
|
+
* can be formatted with a space or a dash after the third and forth digits.
|
|
1118
|
+
* </p>
|
|
1119
|
+
* </li>
|
|
1120
|
+
* <li>
|
|
1121
|
+
* <p>
|
|
1122
|
+
* <b>US_PASSPORT_NUMBER</b>
|
|
1123
|
+
* </p>
|
|
1124
|
+
* <p>A US passport number. Passport numbers range from six to nine alphanumeric
|
|
1125
|
+
* characters.
|
|
1126
|
+
* </p>
|
|
1127
|
+
* </li>
|
|
1128
|
+
* <li>
|
|
1129
|
+
* <p>
|
|
1130
|
+
* <b>US_SOCIAL_SECURITY_NUMBER</b>
|
|
1131
|
+
* </p>
|
|
1132
|
+
* <p>A US Social Security Number (SSN) is a nine-digit number that is issued to
|
|
1133
|
+
* US citizens, permanent residents, and temporary working residents.
|
|
1134
|
+
* </p>
|
|
1135
|
+
* </li>
|
|
1136
|
+
* </ul>
|
|
1137
|
+
* </li>
|
|
1138
|
+
* <li>
|
|
1139
|
+
* <p>
|
|
1140
|
+
* <b>Canada specific</b>
|
|
1141
|
+
* </p>
|
|
1142
|
+
* <ul>
|
|
1143
|
+
* <li>
|
|
1144
|
+
* <p>
|
|
1145
|
+
* <b>CA_HEALTH_NUMBER</b>
|
|
1146
|
+
* </p>
|
|
1147
|
+
* <p>A Canadian Health Service Number is a 10-digit unique identifier,
|
|
1148
|
+
* required for individuals to access healthcare benefits.
|
|
1149
|
+
* </p>
|
|
1150
|
+
* </li>
|
|
1151
|
+
* <li>
|
|
1152
|
+
* <p>
|
|
1153
|
+
* <b>CA_SOCIAL_INSURANCE_NUMBER</b>
|
|
1154
|
+
* </p>
|
|
1155
|
+
* <p>A Canadian Social Insurance Number (SIN) is a nine-digit unique identifier,
|
|
1156
|
+
* required for individuals to access government programs and benefits.</p>
|
|
1157
|
+
* <p>The SIN is formatted as three groups of three digits, such as
|
|
1158
|
+
* <i>123-456-789</i>. A SIN can be validated through a simple
|
|
1159
|
+
* check-digit process called the <a href="https://www.wikipedia.org/wiki/Luhn_algorithm">Luhn algorithm</a>.</p>
|
|
1160
|
+
* </li>
|
|
1161
|
+
* </ul>
|
|
1162
|
+
* </li>
|
|
1163
|
+
* <li>
|
|
1164
|
+
* <p>
|
|
1165
|
+
* <b>UK Specific</b>
|
|
1166
|
+
* </p>
|
|
1167
|
+
* <ul>
|
|
1168
|
+
* <li>
|
|
1169
|
+
* <p>
|
|
1170
|
+
* <b>UK_NATIONAL_HEALTH_SERVICE_NUMBER</b>
|
|
1171
|
+
* </p>
|
|
1172
|
+
* <p>A UK National Health Service Number is a 10-17 digit number,
|
|
1173
|
+
* such as <i>485 777 3456</i>. The current system formats the 10-digit
|
|
1174
|
+
* number with spaces after the third and sixth digits. The final digit is an
|
|
1175
|
+
* error-detecting checksum.</p>
|
|
1176
|
+
* </li>
|
|
1177
|
+
* <li>
|
|
1178
|
+
* <p>
|
|
1179
|
+
* <b>UK_NATIONAL_INSURANCE_NUMBER</b>
|
|
1180
|
+
* </p>
|
|
1181
|
+
* <p>A UK National Insurance Number (NINO) provides individuals with access to National
|
|
1182
|
+
* Insurance (social security) benefits. It is also used for some purposes in the UK
|
|
1183
|
+
* tax system.</p>
|
|
1184
|
+
* <p>The number is nine digits long and starts with two letters, followed by six
|
|
1185
|
+
* numbers and one letter. A NINO can be formatted with a space or a dash after
|
|
1186
|
+
* the two letters and after the second, forth, and sixth digits.</p>
|
|
1187
|
+
* </li>
|
|
1188
|
+
* <li>
|
|
1189
|
+
* <p>
|
|
1190
|
+
* <b>UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER</b>
|
|
1191
|
+
* </p>
|
|
1192
|
+
* <p>A UK Unique Taxpayer Reference (UTR) is a 10-digit number that identifies a taxpayer or a business.
|
|
1193
|
+
* </p>
|
|
1194
|
+
* </li>
|
|
1195
|
+
* </ul>
|
|
1196
|
+
* </li>
|
|
1197
|
+
* <li>
|
|
1198
|
+
* <p>
|
|
1199
|
+
* <b>Custom</b>
|
|
1200
|
+
* </p>
|
|
1201
|
+
* <ul>
|
|
1202
|
+
* <li>
|
|
1203
|
+
* <p>
|
|
1204
|
+
* <b>Regex filter</b> - You can use
|
|
1205
|
+
* a regular expressions to define patterns for a guardrail to recognize
|
|
1206
|
+
* and act upon such as serial number, booking ID etc..</p>
|
|
1207
|
+
* </li>
|
|
1208
|
+
* </ul>
|
|
1209
|
+
* </li>
|
|
1210
|
+
* </ul>
|
|
875
1211
|
* @public
|
|
876
1212
|
*/
|
|
877
1213
|
type: GuardrailPiiEntityType | undefined;
|
|
@@ -936,19 +1272,6 @@ export declare const GuardrailTopicType: {
|
|
|
936
1272
|
export type GuardrailTopicType = (typeof GuardrailTopicType)[keyof typeof GuardrailTopicType];
|
|
937
1273
|
/**
|
|
938
1274
|
* <p>Details about topics for the guardrail to identify and deny.</p>
|
|
939
|
-
* <p>This data type is used in the following API operations:</p>
|
|
940
|
-
* <ul>
|
|
941
|
-
* <li>
|
|
942
|
-
* <p>
|
|
943
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateGuardrail.html#API_CreateGuardrail_RequestSyntax">CreateGuardrail request body</a>
|
|
944
|
-
* </p>
|
|
945
|
-
* </li>
|
|
946
|
-
* <li>
|
|
947
|
-
* <p>
|
|
948
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_UpdateGuardrail.html#API_UpdateGuardrail_RequestSyntax">UpdateGuardrail request body</a>
|
|
949
|
-
* </p>
|
|
950
|
-
* </li>
|
|
951
|
-
* </ul>
|
|
952
1275
|
* @public
|
|
953
1276
|
*/
|
|
954
1277
|
export interface GuardrailTopicConfig {
|
|
@@ -975,19 +1298,6 @@ export interface GuardrailTopicConfig {
|
|
|
975
1298
|
}
|
|
976
1299
|
/**
|
|
977
1300
|
* <p>Contains details about topics that the guardrail should identify and deny.</p>
|
|
978
|
-
* <p>This data type is used in the following API operations:</p>
|
|
979
|
-
* <ul>
|
|
980
|
-
* <li>
|
|
981
|
-
* <p>
|
|
982
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateGuardrail.html#API_CreateGuardrail_RequestSyntax">CreateGuardrail request body</a>
|
|
983
|
-
* </p>
|
|
984
|
-
* </li>
|
|
985
|
-
* <li>
|
|
986
|
-
* <p>
|
|
987
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_UpdateGuardrail.html#API_UpdateGuardrail_RequestSyntax">UpdateGuardrail request body</a>
|
|
988
|
-
* </p>
|
|
989
|
-
* </li>
|
|
990
|
-
* </ul>
|
|
991
1301
|
* @public
|
|
992
1302
|
*/
|
|
993
1303
|
export interface GuardrailTopicPolicyConfig {
|
|
@@ -1080,6 +1390,11 @@ export interface CreateGuardrailRequest {
|
|
|
1080
1390
|
* @public
|
|
1081
1391
|
*/
|
|
1082
1392
|
sensitiveInformationPolicyConfig?: GuardrailSensitiveInformationPolicyConfig;
|
|
1393
|
+
/**
|
|
1394
|
+
* <p>The contextual grounding policy configuration used to create a guardrail.</p>
|
|
1395
|
+
* @public
|
|
1396
|
+
*/
|
|
1397
|
+
contextualGroundingPolicyConfig?: GuardrailContextualGroundingPolicyConfig;
|
|
1083
1398
|
/**
|
|
1084
1399
|
* <p>The message to return when the guardrail blocks a prompt.</p>
|
|
1085
1400
|
* @public
|
|
@@ -1120,12 +1435,13 @@ export interface CreateGuardrailResponse {
|
|
|
1120
1435
|
*/
|
|
1121
1436
|
guardrailId: string | undefined;
|
|
1122
1437
|
/**
|
|
1123
|
-
* <p>The ARN of the guardrail
|
|
1438
|
+
* <p>The ARN of the guardrail.</p>
|
|
1124
1439
|
* @public
|
|
1125
1440
|
*/
|
|
1126
1441
|
guardrailArn: string | undefined;
|
|
1127
1442
|
/**
|
|
1128
|
-
* <p>The version of the guardrail that was created.
|
|
1443
|
+
* <p>The version of the guardrail that was created.
|
|
1444
|
+
* This value will always be <code>DRAFT</code>.</p>
|
|
1129
1445
|
* @public
|
|
1130
1446
|
*/
|
|
1131
1447
|
version: string | undefined;
|
|
@@ -1158,7 +1474,7 @@ export declare class TooManyTagsException extends __BaseException {
|
|
|
1158
1474
|
*/
|
|
1159
1475
|
export interface CreateGuardrailVersionRequest {
|
|
1160
1476
|
/**
|
|
1161
|
-
* <p>The unique identifier of the guardrail.</p>
|
|
1477
|
+
* <p>The unique identifier of the guardrail. This can be an ID or the ARN.</p>
|
|
1162
1478
|
* @public
|
|
1163
1479
|
*/
|
|
1164
1480
|
guardrailIdentifier: string | undefined;
|
|
@@ -1197,7 +1513,7 @@ export interface CreateGuardrailVersionResponse {
|
|
|
1197
1513
|
*/
|
|
1198
1514
|
export interface DeleteGuardrailRequest {
|
|
1199
1515
|
/**
|
|
1200
|
-
* <p>The unique identifier of the guardrail.</p>
|
|
1516
|
+
* <p>The unique identifier of the guardrail. This can be an ID or the ARN.</p>
|
|
1201
1517
|
* @public
|
|
1202
1518
|
*/
|
|
1203
1519
|
guardrailIdentifier: string | undefined;
|
|
@@ -1217,7 +1533,7 @@ export interface DeleteGuardrailResponse {
|
|
|
1217
1533
|
*/
|
|
1218
1534
|
export interface GetGuardrailRequest {
|
|
1219
1535
|
/**
|
|
1220
|
-
* <p>The unique identifier of the guardrail for which to get details.</p>
|
|
1536
|
+
* <p>The unique identifier of the guardrail for which to get details. This can be an ID or the ARN.</p>
|
|
1221
1537
|
* @public
|
|
1222
1538
|
*/
|
|
1223
1539
|
guardrailIdentifier: string | undefined;
|
|
@@ -1306,6 +1622,33 @@ export interface GuardrailContentPolicy {
|
|
|
1306
1622
|
*/
|
|
1307
1623
|
filters?: GuardrailContentFilter[];
|
|
1308
1624
|
}
|
|
1625
|
+
/**
|
|
1626
|
+
* <p>The details for the guardrails contextual grounding filter.</p>
|
|
1627
|
+
* @public
|
|
1628
|
+
*/
|
|
1629
|
+
export interface GuardrailContextualGroundingFilter {
|
|
1630
|
+
/**
|
|
1631
|
+
* <p>The filter type details for the guardrails contextual grounding filter.</p>
|
|
1632
|
+
* @public
|
|
1633
|
+
*/
|
|
1634
|
+
type: GuardrailContextualGroundingFilterType | undefined;
|
|
1635
|
+
/**
|
|
1636
|
+
* <p>The threshold details for the guardrails contextual grounding filter.</p>
|
|
1637
|
+
* @public
|
|
1638
|
+
*/
|
|
1639
|
+
threshold: number | undefined;
|
|
1640
|
+
}
|
|
1641
|
+
/**
|
|
1642
|
+
* <p>The details for the guardrails contextual grounding policy.</p>
|
|
1643
|
+
* @public
|
|
1644
|
+
*/
|
|
1645
|
+
export interface GuardrailContextualGroundingPolicy {
|
|
1646
|
+
/**
|
|
1647
|
+
* <p>The filter details for the guardrails contextual grounding policy.</p>
|
|
1648
|
+
* @public
|
|
1649
|
+
*/
|
|
1650
|
+
filters: GuardrailContextualGroundingFilter[] | undefined;
|
|
1651
|
+
}
|
|
1309
1652
|
/**
|
|
1310
1653
|
* <p>The PII entity configured for the guardrail.</p>
|
|
1311
1654
|
* @public
|
|
@@ -1435,7 +1778,7 @@ export interface GuardrailTopicPolicy {
|
|
|
1435
1778
|
}
|
|
1436
1779
|
/**
|
|
1437
1780
|
* <p>The managed word list that was configured for the guardrail.
|
|
1438
|
-
* (This is a list of words that are pre-defined and managed by
|
|
1781
|
+
* (This is a list of words that are pre-defined and managed by guardrails only.)</p>
|
|
1439
1782
|
* @public
|
|
1440
1783
|
*/
|
|
1441
1784
|
export interface GuardrailManagedWords {
|
|
@@ -1494,7 +1837,7 @@ export interface GetGuardrailResponse {
|
|
|
1494
1837
|
*/
|
|
1495
1838
|
guardrailId: string | undefined;
|
|
1496
1839
|
/**
|
|
1497
|
-
* <p>The ARN of the guardrail
|
|
1840
|
+
* <p>The ARN of the guardrail.</p>
|
|
1498
1841
|
* @public
|
|
1499
1842
|
*/
|
|
1500
1843
|
guardrailArn: string | undefined;
|
|
@@ -1528,6 +1871,11 @@ export interface GetGuardrailResponse {
|
|
|
1528
1871
|
* @public
|
|
1529
1872
|
*/
|
|
1530
1873
|
sensitiveInformationPolicy?: GuardrailSensitiveInformationPolicy;
|
|
1874
|
+
/**
|
|
1875
|
+
* <p>The contextual grounding policy used in the guardrail.</p>
|
|
1876
|
+
* @public
|
|
1877
|
+
*/
|
|
1878
|
+
contextualGroundingPolicy?: GuardrailContextualGroundingPolicy;
|
|
1531
1879
|
/**
|
|
1532
1880
|
* <p>The date and time at which the guardrail was created.</p>
|
|
1533
1881
|
* @public
|
|
@@ -1569,7 +1917,7 @@ export interface GetGuardrailResponse {
|
|
|
1569
1917
|
*/
|
|
1570
1918
|
export interface ListGuardrailsRequest {
|
|
1571
1919
|
/**
|
|
1572
|
-
* <p>The unique identifier of the guardrail.</p>
|
|
1920
|
+
* <p>The unique identifier of the guardrail. This can be an ID or the ARN.</p>
|
|
1573
1921
|
* @public
|
|
1574
1922
|
*/
|
|
1575
1923
|
guardrailIdentifier?: string;
|
|
@@ -1658,7 +2006,7 @@ export interface ListGuardrailsResponse {
|
|
|
1658
2006
|
*/
|
|
1659
2007
|
export interface UpdateGuardrailRequest {
|
|
1660
2008
|
/**
|
|
1661
|
-
* <p>The unique identifier of the guardrail
|
|
2009
|
+
* <p>The unique identifier of the guardrail. This can be an ID or the ARN.</p>
|
|
1662
2010
|
* @public
|
|
1663
2011
|
*/
|
|
1664
2012
|
guardrailIdentifier: string | undefined;
|
|
@@ -1692,6 +2040,11 @@ export interface UpdateGuardrailRequest {
|
|
|
1692
2040
|
* @public
|
|
1693
2041
|
*/
|
|
1694
2042
|
sensitiveInformationPolicyConfig?: GuardrailSensitiveInformationPolicyConfig;
|
|
2043
|
+
/**
|
|
2044
|
+
* <p>The contextual grounding policy configuration used to update a guardrail.</p>
|
|
2045
|
+
* @public
|
|
2046
|
+
*/
|
|
2047
|
+
contextualGroundingPolicyConfig?: GuardrailContextualGroundingPolicyConfig;
|
|
1695
2048
|
/**
|
|
1696
2049
|
* <p>The message to return when the guardrail blocks a prompt.</p>
|
|
1697
2050
|
* @public
|
|
@@ -1718,7 +2071,7 @@ export interface UpdateGuardrailResponse {
|
|
|
1718
2071
|
*/
|
|
1719
2072
|
guardrailId: string | undefined;
|
|
1720
2073
|
/**
|
|
1721
|
-
* <p>The ARN of the guardrail
|
|
2074
|
+
* <p>The ARN of the guardrail.</p>
|
|
1722
2075
|
* @public
|
|
1723
2076
|
*/
|
|
1724
2077
|
guardrailArn: string | undefined;
|
|
@@ -32,8 +32,8 @@ export declare const getRuntimeConfig: (config: BedrockClientConfig) => {
|
|
|
32
32
|
logger?: import("@smithy/types").Logger | undefined;
|
|
33
33
|
}) => import("@smithy/types").EndpointV2;
|
|
34
34
|
tls?: boolean | undefined;
|
|
35
|
-
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
36
35
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
36
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
37
37
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
38
38
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").BedrockHttpAuthSchemeProvider;
|
|
39
39
|
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
|
|
@@ -32,8 +32,8 @@ export declare const getRuntimeConfig: (config: BedrockClientConfig) => {
|
|
|
32
32
|
logger?: import("@smithy/types").Logger | undefined;
|
|
33
33
|
}) => import("@smithy/types").EndpointV2;
|
|
34
34
|
tls?: boolean | undefined;
|
|
35
|
-
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
36
35
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
36
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
37
37
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
38
38
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").BedrockHttpAuthSchemeProvider;
|
|
39
39
|
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
|
|
@@ -31,8 +31,8 @@ export declare const getRuntimeConfig: (config: BedrockClientConfig) => {
|
|
|
31
31
|
logger?: import("@smithy/types").Logger | undefined;
|
|
32
32
|
}) => import("@smithy/types").EndpointV2;
|
|
33
33
|
tls?: boolean | undefined;
|
|
34
|
-
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
35
34
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
35
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
36
36
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
37
37
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").BedrockHttpAuthSchemeProvider;
|
|
38
38
|
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
|
|
@@ -265,9 +265,9 @@ export type BedrockClientConfigType = Partial<
|
|
|
265
265
|
ClientDefaults &
|
|
266
266
|
RegionInputConfig &
|
|
267
267
|
EndpointInputConfig<EndpointParameters> &
|
|
268
|
-
RetryInputConfig &
|
|
269
268
|
HostHeaderInputConfig &
|
|
270
269
|
UserAgentInputConfig &
|
|
270
|
+
RetryInputConfig &
|
|
271
271
|
HttpAuthSchemeInputConfig &
|
|
272
272
|
ClientInputEndpointParameters;
|
|
273
273
|
export interface BedrockClientConfig extends BedrockClientConfigType {}
|
|
@@ -277,9 +277,9 @@ export type BedrockClientResolvedConfigType =
|
|
|
277
277
|
RuntimeExtensionsConfig &
|
|
278
278
|
RegionResolvedConfig &
|
|
279
279
|
EndpointResolvedConfig<EndpointParameters> &
|
|
280
|
-
RetryResolvedConfig &
|
|
281
280
|
HostHeaderResolvedConfig &
|
|
282
281
|
UserAgentResolvedConfig &
|
|
282
|
+
RetryResolvedConfig &
|
|
283
283
|
HttpAuthSchemeResolvedConfig &
|
|
284
284
|
ClientResolvedEndpointParameters;
|
|
285
285
|
export interface BedrockClientResolvedConfig
|
|
@@ -283,6 +283,19 @@ export interface GuardrailContentFilterConfig {
|
|
|
283
283
|
export interface GuardrailContentPolicyConfig {
|
|
284
284
|
filtersConfig: GuardrailContentFilterConfig[] | undefined;
|
|
285
285
|
}
|
|
286
|
+
export declare const GuardrailContextualGroundingFilterType: {
|
|
287
|
+
readonly GROUNDING: "GROUNDING";
|
|
288
|
+
readonly RELEVANCE: "RELEVANCE";
|
|
289
|
+
};
|
|
290
|
+
export type GuardrailContextualGroundingFilterType =
|
|
291
|
+
(typeof GuardrailContextualGroundingFilterType)[keyof typeof GuardrailContextualGroundingFilterType];
|
|
292
|
+
export interface GuardrailContextualGroundingFilterConfig {
|
|
293
|
+
type: GuardrailContextualGroundingFilterType | undefined;
|
|
294
|
+
threshold: number | undefined;
|
|
295
|
+
}
|
|
296
|
+
export interface GuardrailContextualGroundingPolicyConfig {
|
|
297
|
+
filtersConfig: GuardrailContextualGroundingFilterConfig[] | undefined;
|
|
298
|
+
}
|
|
286
299
|
export declare const GuardrailSensitiveInformationAction: {
|
|
287
300
|
readonly ANONYMIZE: "ANONYMIZE";
|
|
288
301
|
readonly BLOCK: "BLOCK";
|
|
@@ -374,6 +387,7 @@ export interface CreateGuardrailRequest {
|
|
|
374
387
|
contentPolicyConfig?: GuardrailContentPolicyConfig;
|
|
375
388
|
wordPolicyConfig?: GuardrailWordPolicyConfig;
|
|
376
389
|
sensitiveInformationPolicyConfig?: GuardrailSensitiveInformationPolicyConfig;
|
|
390
|
+
contextualGroundingPolicyConfig?: GuardrailContextualGroundingPolicyConfig;
|
|
377
391
|
blockedInputMessaging: string | undefined;
|
|
378
392
|
blockedOutputsMessaging: string | undefined;
|
|
379
393
|
kmsKeyId?: string;
|
|
@@ -420,6 +434,13 @@ export interface GuardrailContentFilter {
|
|
|
420
434
|
export interface GuardrailContentPolicy {
|
|
421
435
|
filters?: GuardrailContentFilter[];
|
|
422
436
|
}
|
|
437
|
+
export interface GuardrailContextualGroundingFilter {
|
|
438
|
+
type: GuardrailContextualGroundingFilterType | undefined;
|
|
439
|
+
threshold: number | undefined;
|
|
440
|
+
}
|
|
441
|
+
export interface GuardrailContextualGroundingPolicy {
|
|
442
|
+
filters: GuardrailContextualGroundingFilter[] | undefined;
|
|
443
|
+
}
|
|
423
444
|
export interface GuardrailPiiEntity {
|
|
424
445
|
type: GuardrailPiiEntityType | undefined;
|
|
425
446
|
action: GuardrailSensitiveInformationAction | undefined;
|
|
@@ -474,6 +495,7 @@ export interface GetGuardrailResponse {
|
|
|
474
495
|
contentPolicy?: GuardrailContentPolicy;
|
|
475
496
|
wordPolicy?: GuardrailWordPolicy;
|
|
476
497
|
sensitiveInformationPolicy?: GuardrailSensitiveInformationPolicy;
|
|
498
|
+
contextualGroundingPolicy?: GuardrailContextualGroundingPolicy;
|
|
477
499
|
createdAt: Date | undefined;
|
|
478
500
|
updatedAt: Date | undefined;
|
|
479
501
|
statusReasons?: string[];
|
|
@@ -509,6 +531,7 @@ export interface UpdateGuardrailRequest {
|
|
|
509
531
|
contentPolicyConfig?: GuardrailContentPolicyConfig;
|
|
510
532
|
wordPolicyConfig?: GuardrailWordPolicyConfig;
|
|
511
533
|
sensitiveInformationPolicyConfig?: GuardrailSensitiveInformationPolicyConfig;
|
|
534
|
+
contextualGroundingPolicyConfig?: GuardrailContextualGroundingPolicyConfig;
|
|
512
535
|
blockedInputMessaging: string | undefined;
|
|
513
536
|
blockedOutputsMessaging: string | undefined;
|
|
514
537
|
kmsKeyId?: string;
|
|
@@ -56,11 +56,11 @@ export declare const getRuntimeConfig: (config: BedrockClientConfig) => {
|
|
|
56
56
|
}
|
|
57
57
|
) => import("@smithy/types").EndpointV2;
|
|
58
58
|
tls?: boolean | undefined;
|
|
59
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
59
60
|
retryStrategy?:
|
|
60
61
|
| import("@smithy/types").RetryStrategy
|
|
61
62
|
| import("@smithy/types").RetryStrategyV2
|
|
62
63
|
| undefined;
|
|
63
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
64
64
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
65
65
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").BedrockHttpAuthSchemeProvider;
|
|
66
66
|
credentials?:
|
|
@@ -60,11 +60,11 @@ export declare const getRuntimeConfig: (config: BedrockClientConfig) => {
|
|
|
60
60
|
}
|
|
61
61
|
) => import("@smithy/types").EndpointV2;
|
|
62
62
|
tls?: boolean | undefined;
|
|
63
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
63
64
|
retryStrategy?:
|
|
64
65
|
| import("@smithy/types").RetryStrategy
|
|
65
66
|
| import("@smithy/types").RetryStrategyV2
|
|
66
67
|
| undefined;
|
|
67
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
68
68
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
69
69
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").BedrockHttpAuthSchemeProvider;
|
|
70
70
|
credentials?:
|
|
@@ -50,11 +50,11 @@ export declare const getRuntimeConfig: (config: BedrockClientConfig) => {
|
|
|
50
50
|
}
|
|
51
51
|
) => import("@smithy/types").EndpointV2;
|
|
52
52
|
tls?: boolean | undefined;
|
|
53
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
53
54
|
retryStrategy?:
|
|
54
55
|
| import("@smithy/types").RetryStrategy
|
|
55
56
|
| import("@smithy/types").RetryStrategyV2
|
|
56
57
|
| undefined;
|
|
57
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
58
58
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
59
59
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").BedrockHttpAuthSchemeProvider;
|
|
60
60
|
credentials?:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock",
|
|
3
3
|
"description": "AWS SDK for JavaScript Bedrock Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.616.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",
|
|
@@ -20,41 +20,41 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/client-sso-oidc": "3.
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
25
|
-
"@aws-sdk/core": "3.
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
27
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
23
|
+
"@aws-sdk/client-sso-oidc": "3.616.0",
|
|
24
|
+
"@aws-sdk/client-sts": "3.616.0",
|
|
25
|
+
"@aws-sdk/core": "3.616.0",
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.616.0",
|
|
27
|
+
"@aws-sdk/middleware-host-header": "3.616.0",
|
|
28
28
|
"@aws-sdk/middleware-logger": "3.609.0",
|
|
29
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
30
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
31
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
29
|
+
"@aws-sdk/middleware-recursion-detection": "3.616.0",
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.616.0",
|
|
31
|
+
"@aws-sdk/region-config-resolver": "3.614.0",
|
|
32
32
|
"@aws-sdk/types": "3.609.0",
|
|
33
|
-
"@aws-sdk/util-endpoints": "3.
|
|
33
|
+
"@aws-sdk/util-endpoints": "3.614.0",
|
|
34
34
|
"@aws-sdk/util-user-agent-browser": "3.609.0",
|
|
35
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
36
|
-
"@smithy/config-resolver": "^3.0.
|
|
37
|
-
"@smithy/core": "^2.2.
|
|
38
|
-
"@smithy/fetch-http-handler": "^3.2.
|
|
35
|
+
"@aws-sdk/util-user-agent-node": "3.614.0",
|
|
36
|
+
"@smithy/config-resolver": "^3.0.5",
|
|
37
|
+
"@smithy/core": "^2.2.7",
|
|
38
|
+
"@smithy/fetch-http-handler": "^3.2.2",
|
|
39
39
|
"@smithy/hash-node": "^3.0.3",
|
|
40
40
|
"@smithy/invalid-dependency": "^3.0.3",
|
|
41
|
-
"@smithy/middleware-content-length": "^3.0.
|
|
42
|
-
"@smithy/middleware-endpoint": "^3.0.
|
|
43
|
-
"@smithy/middleware-retry": "^3.0.
|
|
41
|
+
"@smithy/middleware-content-length": "^3.0.4",
|
|
42
|
+
"@smithy/middleware-endpoint": "^3.0.5",
|
|
43
|
+
"@smithy/middleware-retry": "^3.0.10",
|
|
44
44
|
"@smithy/middleware-serde": "^3.0.3",
|
|
45
45
|
"@smithy/middleware-stack": "^3.0.3",
|
|
46
|
-
"@smithy/node-config-provider": "^3.1.
|
|
47
|
-
"@smithy/node-http-handler": "^3.1.
|
|
48
|
-
"@smithy/protocol-http": "^4.0.
|
|
49
|
-
"@smithy/smithy-client": "^3.1.
|
|
46
|
+
"@smithy/node-config-provider": "^3.1.4",
|
|
47
|
+
"@smithy/node-http-handler": "^3.1.3",
|
|
48
|
+
"@smithy/protocol-http": "^4.0.4",
|
|
49
|
+
"@smithy/smithy-client": "^3.1.8",
|
|
50
50
|
"@smithy/types": "^3.3.0",
|
|
51
51
|
"@smithy/url-parser": "^3.0.3",
|
|
52
52
|
"@smithy/util-base64": "^3.0.0",
|
|
53
53
|
"@smithy/util-body-length-browser": "^3.0.0",
|
|
54
54
|
"@smithy/util-body-length-node": "^3.0.0",
|
|
55
|
-
"@smithy/util-defaults-mode-browser": "^3.0.
|
|
56
|
-
"@smithy/util-defaults-mode-node": "^3.0.
|
|
57
|
-
"@smithy/util-endpoints": "^2.0.
|
|
55
|
+
"@smithy/util-defaults-mode-browser": "^3.0.10",
|
|
56
|
+
"@smithy/util-defaults-mode-node": "^3.0.10",
|
|
57
|
+
"@smithy/util-endpoints": "^2.0.5",
|
|
58
58
|
"@smithy/util-middleware": "^3.0.3",
|
|
59
59
|
"@smithy/util-retry": "^3.0.3",
|
|
60
60
|
"@smithy/util-utf8": "^3.0.0",
|