@aws-sdk/client-bedrock-agent-runtime 3.576.0 → 3.580.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 +181 -0
- package/dist-es/models/models_0.js +130 -0
- package/dist-es/protocols/Aws_restJson1.js +7 -0
- package/dist-types/commands/InvokeAgentCommand.d.ts +112 -0
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +4 -0
- package/dist-types/commands/RetrieveCommand.d.ts +4 -0
- package/dist-types/models/models_0.d.ts +581 -13
- package/dist-types/ts3.4/models/models_0.d.ts +257 -0
- package/package.json +13 -13
package/dist-cjs/index.js
CHANGED
|
@@ -45,6 +45,28 @@ __export(src_exports, {
|
|
|
45
45
|
GeneratedResponsePartFilterSensitiveLog: () => GeneratedResponsePartFilterSensitiveLog,
|
|
46
46
|
GenerationConfigurationFilterSensitiveLog: () => GenerationConfigurationFilterSensitiveLog,
|
|
47
47
|
GuadrailAction: () => GuadrailAction,
|
|
48
|
+
GuardrailAction: () => GuardrailAction,
|
|
49
|
+
GuardrailAssessmentFilterSensitiveLog: () => GuardrailAssessmentFilterSensitiveLog,
|
|
50
|
+
GuardrailContentFilterConfidence: () => GuardrailContentFilterConfidence,
|
|
51
|
+
GuardrailContentFilterFilterSensitiveLog: () => GuardrailContentFilterFilterSensitiveLog,
|
|
52
|
+
GuardrailContentFilterType: () => GuardrailContentFilterType,
|
|
53
|
+
GuardrailContentPolicyAction: () => GuardrailContentPolicyAction,
|
|
54
|
+
GuardrailContentPolicyAssessmentFilterSensitiveLog: () => GuardrailContentPolicyAssessmentFilterSensitiveLog,
|
|
55
|
+
GuardrailCustomWordFilterSensitiveLog: () => GuardrailCustomWordFilterSensitiveLog,
|
|
56
|
+
GuardrailManagedWordFilterSensitiveLog: () => GuardrailManagedWordFilterSensitiveLog,
|
|
57
|
+
GuardrailManagedWordType: () => GuardrailManagedWordType,
|
|
58
|
+
GuardrailPiiEntityFilterFilterSensitiveLog: () => GuardrailPiiEntityFilterFilterSensitiveLog,
|
|
59
|
+
GuardrailPiiEntityType: () => GuardrailPiiEntityType,
|
|
60
|
+
GuardrailRegexFilterFilterSensitiveLog: () => GuardrailRegexFilterFilterSensitiveLog,
|
|
61
|
+
GuardrailSensitiveInformationPolicyAction: () => GuardrailSensitiveInformationPolicyAction,
|
|
62
|
+
GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog: () => GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog,
|
|
63
|
+
GuardrailTopicFilterSensitiveLog: () => GuardrailTopicFilterSensitiveLog,
|
|
64
|
+
GuardrailTopicPolicyAction: () => GuardrailTopicPolicyAction,
|
|
65
|
+
GuardrailTopicPolicyAssessmentFilterSensitiveLog: () => GuardrailTopicPolicyAssessmentFilterSensitiveLog,
|
|
66
|
+
GuardrailTopicType: () => GuardrailTopicType,
|
|
67
|
+
GuardrailTraceFilterSensitiveLog: () => GuardrailTraceFilterSensitiveLog,
|
|
68
|
+
GuardrailWordPolicyAction: () => GuardrailWordPolicyAction,
|
|
69
|
+
GuardrailWordPolicyAssessmentFilterSensitiveLog: () => GuardrailWordPolicyAssessmentFilterSensitiveLog,
|
|
48
70
|
InternalServerException: () => InternalServerException,
|
|
49
71
|
InvocationInputFilterSensitiveLog: () => InvocationInputFilterSensitiveLog,
|
|
50
72
|
InvocationInputMember: () => InvocationInputMember,
|
|
@@ -453,6 +475,76 @@ var _ThrottlingException = class _ThrottlingException extends BedrockAgentRuntim
|
|
|
453
475
|
};
|
|
454
476
|
__name(_ThrottlingException, "ThrottlingException");
|
|
455
477
|
var ThrottlingException = _ThrottlingException;
|
|
478
|
+
var GuardrailAction = {
|
|
479
|
+
INTERVENED: "INTERVENED",
|
|
480
|
+
NONE: "NONE"
|
|
481
|
+
};
|
|
482
|
+
var GuardrailContentPolicyAction = {
|
|
483
|
+
BLOCKED: "BLOCKED"
|
|
484
|
+
};
|
|
485
|
+
var GuardrailContentFilterConfidence = {
|
|
486
|
+
HIGH: "HIGH",
|
|
487
|
+
LOW: "LOW",
|
|
488
|
+
MEDIUM: "MEDIUM",
|
|
489
|
+
NONE: "NONE"
|
|
490
|
+
};
|
|
491
|
+
var GuardrailContentFilterType = {
|
|
492
|
+
HATE: "HATE",
|
|
493
|
+
INSULTS: "INSULTS",
|
|
494
|
+
MISCONDUCT: "MISCONDUCT",
|
|
495
|
+
PROMPT_ATTACK: "PROMPT_ATTACK",
|
|
496
|
+
SEXUAL: "SEXUAL",
|
|
497
|
+
VIOLENCE: "VIOLENCE"
|
|
498
|
+
};
|
|
499
|
+
var GuardrailSensitiveInformationPolicyAction = {
|
|
500
|
+
ANONYMIZED: "ANONYMIZED",
|
|
501
|
+
BLOCKED: "BLOCKED"
|
|
502
|
+
};
|
|
503
|
+
var GuardrailPiiEntityType = {
|
|
504
|
+
ADDRESS: "ADDRESS",
|
|
505
|
+
AGE: "AGE",
|
|
506
|
+
AWS_ACCESS_KEY: "AWS_ACCESS_KEY",
|
|
507
|
+
AWS_SECRET_KEY: "AWS_SECRET_KEY",
|
|
508
|
+
CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER",
|
|
509
|
+
CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER",
|
|
510
|
+
CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV",
|
|
511
|
+
CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY",
|
|
512
|
+
CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER",
|
|
513
|
+
DRIVER_ID: "DRIVER_ID",
|
|
514
|
+
EMAIL: "EMAIL",
|
|
515
|
+
INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER",
|
|
516
|
+
IP_ADDRESS: "IP_ADDRESS",
|
|
517
|
+
LICENSE_PLATE: "LICENSE_PLATE",
|
|
518
|
+
MAC_ADDRESS: "MAC_ADDRESS",
|
|
519
|
+
NAME: "NAME",
|
|
520
|
+
PASSWORD: "PASSWORD",
|
|
521
|
+
PHONE: "PHONE",
|
|
522
|
+
PIN: "PIN",
|
|
523
|
+
SWIFT_CODE: "SWIFT_CODE",
|
|
524
|
+
UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER",
|
|
525
|
+
UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER",
|
|
526
|
+
UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",
|
|
527
|
+
URL: "URL",
|
|
528
|
+
USERNAME: "USERNAME",
|
|
529
|
+
US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER",
|
|
530
|
+
US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER",
|
|
531
|
+
US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",
|
|
532
|
+
US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER",
|
|
533
|
+
US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER",
|
|
534
|
+
VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER"
|
|
535
|
+
};
|
|
536
|
+
var GuardrailTopicPolicyAction = {
|
|
537
|
+
BLOCKED: "BLOCKED"
|
|
538
|
+
};
|
|
539
|
+
var GuardrailTopicType = {
|
|
540
|
+
DENY: "DENY"
|
|
541
|
+
};
|
|
542
|
+
var GuardrailWordPolicyAction = {
|
|
543
|
+
BLOCKED: "BLOCKED"
|
|
544
|
+
};
|
|
545
|
+
var GuardrailManagedWordType = {
|
|
546
|
+
PROFANITY: "PROFANITY"
|
|
547
|
+
};
|
|
456
548
|
var InvocationType = {
|
|
457
549
|
ACTION_GROUP: "ACTION_GROUP",
|
|
458
550
|
FINISH: "FINISH",
|
|
@@ -517,6 +609,8 @@ var PreProcessingTrace;
|
|
|
517
609
|
var Trace;
|
|
518
610
|
((Trace3) => {
|
|
519
611
|
Trace3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
612
|
+
if (value.guardrailTrace !== void 0)
|
|
613
|
+
return visitor.guardrailTrace(value.guardrailTrace);
|
|
520
614
|
if (value.preProcessingTrace !== void 0)
|
|
521
615
|
return visitor.preProcessingTrace(value.preProcessingTrace);
|
|
522
616
|
if (value.orchestrationTrace !== void 0)
|
|
@@ -612,6 +706,10 @@ var RetrievalFilter;
|
|
|
612
706
|
return visitor.notIn(value.notIn);
|
|
613
707
|
if (value.startsWith !== void 0)
|
|
614
708
|
return visitor.startsWith(value.startsWith);
|
|
709
|
+
if (value.listContains !== void 0)
|
|
710
|
+
return visitor.listContains(value.listContains);
|
|
711
|
+
if (value.stringContains !== void 0)
|
|
712
|
+
return visitor.stringContains(value.stringContains);
|
|
615
713
|
if (value.andAll !== void 0)
|
|
616
714
|
return visitor.andAll(value.andAll);
|
|
617
715
|
if (value.orAll !== void 0)
|
|
@@ -714,6 +812,54 @@ var FailureTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
714
812
|
...obj,
|
|
715
813
|
...obj.failureReason && { failureReason: import_smithy_client.SENSITIVE_STRING }
|
|
716
814
|
}), "FailureTraceFilterSensitiveLog");
|
|
815
|
+
var GuardrailContentFilterFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
816
|
+
...obj
|
|
817
|
+
}), "GuardrailContentFilterFilterSensitiveLog");
|
|
818
|
+
var GuardrailContentPolicyAssessmentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
819
|
+
...obj,
|
|
820
|
+
...obj.filters && { filters: import_smithy_client.SENSITIVE_STRING }
|
|
821
|
+
}), "GuardrailContentPolicyAssessmentFilterSensitiveLog");
|
|
822
|
+
var GuardrailPiiEntityFilterFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
823
|
+
...obj
|
|
824
|
+
}), "GuardrailPiiEntityFilterFilterSensitiveLog");
|
|
825
|
+
var GuardrailRegexFilterFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
826
|
+
...obj
|
|
827
|
+
}), "GuardrailRegexFilterFilterSensitiveLog");
|
|
828
|
+
var GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
829
|
+
...obj,
|
|
830
|
+
...obj.piiEntities && { piiEntities: import_smithy_client.SENSITIVE_STRING },
|
|
831
|
+
...obj.regexes && { regexes: import_smithy_client.SENSITIVE_STRING }
|
|
832
|
+
}), "GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog");
|
|
833
|
+
var GuardrailTopicFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
834
|
+
...obj
|
|
835
|
+
}), "GuardrailTopicFilterSensitiveLog");
|
|
836
|
+
var GuardrailTopicPolicyAssessmentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
837
|
+
...obj,
|
|
838
|
+
...obj.topics && { topics: import_smithy_client.SENSITIVE_STRING }
|
|
839
|
+
}), "GuardrailTopicPolicyAssessmentFilterSensitiveLog");
|
|
840
|
+
var GuardrailCustomWordFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
841
|
+
...obj
|
|
842
|
+
}), "GuardrailCustomWordFilterSensitiveLog");
|
|
843
|
+
var GuardrailManagedWordFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
844
|
+
...obj
|
|
845
|
+
}), "GuardrailManagedWordFilterSensitiveLog");
|
|
846
|
+
var GuardrailWordPolicyAssessmentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
847
|
+
...obj,
|
|
848
|
+
...obj.customWords && { customWords: import_smithy_client.SENSITIVE_STRING },
|
|
849
|
+
...obj.managedWordLists && { managedWordLists: import_smithy_client.SENSITIVE_STRING }
|
|
850
|
+
}), "GuardrailWordPolicyAssessmentFilterSensitiveLog");
|
|
851
|
+
var GuardrailAssessmentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
852
|
+
...obj,
|
|
853
|
+
...obj.topicPolicy && { topicPolicy: import_smithy_client.SENSITIVE_STRING },
|
|
854
|
+
...obj.contentPolicy && { contentPolicy: import_smithy_client.SENSITIVE_STRING },
|
|
855
|
+
...obj.wordPolicy && { wordPolicy: import_smithy_client.SENSITIVE_STRING },
|
|
856
|
+
...obj.sensitiveInformationPolicy && { sensitiveInformationPolicy: import_smithy_client.SENSITIVE_STRING }
|
|
857
|
+
}), "GuardrailAssessmentFilterSensitiveLog");
|
|
858
|
+
var GuardrailTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
859
|
+
...obj,
|
|
860
|
+
...obj.inputAssessments && { inputAssessments: import_smithy_client.SENSITIVE_STRING },
|
|
861
|
+
...obj.outputAssessments && { outputAssessments: import_smithy_client.SENSITIVE_STRING }
|
|
862
|
+
}), "GuardrailTraceFilterSensitiveLog");
|
|
717
863
|
var KnowledgeBaseLookupInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
718
864
|
...obj,
|
|
719
865
|
...obj.text && { text: import_smithy_client.SENSITIVE_STRING },
|
|
@@ -806,6 +952,8 @@ var PreProcessingTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
|
806
952
|
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
807
953
|
}, "PreProcessingTraceFilterSensitiveLog");
|
|
808
954
|
var TraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
955
|
+
if (obj.guardrailTrace !== void 0)
|
|
956
|
+
return { guardrailTrace: import_smithy_client.SENSITIVE_STRING };
|
|
809
957
|
if (obj.preProcessingTrace !== void 0)
|
|
810
958
|
return { preProcessingTrace: import_smithy_client.SENSITIVE_STRING };
|
|
811
959
|
if (obj.orchestrationTrace !== void 0)
|
|
@@ -924,6 +1072,10 @@ var RetrievalFilterFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
|
924
1072
|
return { notIn: obj.notIn };
|
|
925
1073
|
if (obj.startsWith !== void 0)
|
|
926
1074
|
return { startsWith: obj.startsWith };
|
|
1075
|
+
if (obj.listContains !== void 0)
|
|
1076
|
+
return { listContains: obj.listContains };
|
|
1077
|
+
if (obj.stringContains !== void 0)
|
|
1078
|
+
return { stringContains: obj.stringContains };
|
|
927
1079
|
if (obj.andAll !== void 0)
|
|
928
1080
|
return { andAll: import_smithy_client.SENSITIVE_STRING };
|
|
929
1081
|
if (obj.orAll !== void 0)
|
|
@@ -1501,10 +1653,12 @@ var se_RetrievalFilter = /* @__PURE__ */ __name((input, context) => {
|
|
|
1501
1653
|
in: (value) => ({ in: se_FilterAttribute(value, context) }),
|
|
1502
1654
|
lessThan: (value) => ({ lessThan: se_FilterAttribute(value, context) }),
|
|
1503
1655
|
lessThanOrEquals: (value) => ({ lessThanOrEquals: se_FilterAttribute(value, context) }),
|
|
1656
|
+
listContains: (value) => ({ listContains: se_FilterAttribute(value, context) }),
|
|
1504
1657
|
notEquals: (value) => ({ notEquals: se_FilterAttribute(value, context) }),
|
|
1505
1658
|
notIn: (value) => ({ notIn: se_FilterAttribute(value, context) }),
|
|
1506
1659
|
orAll: (value) => ({ orAll: se_RetrievalFilterList(value, context) }),
|
|
1507
1660
|
startsWith: (value) => ({ startsWith: se_FilterAttribute(value, context) }),
|
|
1661
|
+
stringContains: (value) => ({ stringContains: se_FilterAttribute(value, context) }),
|
|
1508
1662
|
_: (name, value) => ({ name: value })
|
|
1509
1663
|
});
|
|
1510
1664
|
}, "se_RetrievalFilter");
|
|
@@ -1680,6 +1834,11 @@ var de_Trace = /* @__PURE__ */ __name((output, context) => {
|
|
|
1680
1834
|
failureTrace: (0, import_smithy_client._json)(output.failureTrace)
|
|
1681
1835
|
};
|
|
1682
1836
|
}
|
|
1837
|
+
if (output.guardrailTrace != null) {
|
|
1838
|
+
return {
|
|
1839
|
+
guardrailTrace: (0, import_smithy_client._json)(output.guardrailTrace)
|
|
1840
|
+
};
|
|
1841
|
+
}
|
|
1683
1842
|
if (output.orchestrationTrace != null) {
|
|
1684
1843
|
return {
|
|
1685
1844
|
orchestrationTrace: de_OrchestrationTrace((0, import_core2.awsExpectUnion)(output.orchestrationTrace), context)
|
|
@@ -1810,6 +1969,16 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1810
1969
|
InvocationInputMember,
|
|
1811
1970
|
ServiceQuotaExceededException,
|
|
1812
1971
|
ThrottlingException,
|
|
1972
|
+
GuardrailAction,
|
|
1973
|
+
GuardrailContentPolicyAction,
|
|
1974
|
+
GuardrailContentFilterConfidence,
|
|
1975
|
+
GuardrailContentFilterType,
|
|
1976
|
+
GuardrailSensitiveInformationPolicyAction,
|
|
1977
|
+
GuardrailPiiEntityType,
|
|
1978
|
+
GuardrailTopicPolicyAction,
|
|
1979
|
+
GuardrailTopicType,
|
|
1980
|
+
GuardrailWordPolicyAction,
|
|
1981
|
+
GuardrailManagedWordType,
|
|
1813
1982
|
InvocationType,
|
|
1814
1983
|
CreationMode,
|
|
1815
1984
|
PromptType,
|
|
@@ -1844,6 +2013,18 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1844
2013
|
InvocationInputMemberFilterSensitiveLog,
|
|
1845
2014
|
ReturnControlPayloadFilterSensitiveLog,
|
|
1846
2015
|
FailureTraceFilterSensitiveLog,
|
|
2016
|
+
GuardrailContentFilterFilterSensitiveLog,
|
|
2017
|
+
GuardrailContentPolicyAssessmentFilterSensitiveLog,
|
|
2018
|
+
GuardrailPiiEntityFilterFilterSensitiveLog,
|
|
2019
|
+
GuardrailRegexFilterFilterSensitiveLog,
|
|
2020
|
+
GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog,
|
|
2021
|
+
GuardrailTopicFilterSensitiveLog,
|
|
2022
|
+
GuardrailTopicPolicyAssessmentFilterSensitiveLog,
|
|
2023
|
+
GuardrailCustomWordFilterSensitiveLog,
|
|
2024
|
+
GuardrailManagedWordFilterSensitiveLog,
|
|
2025
|
+
GuardrailWordPolicyAssessmentFilterSensitiveLog,
|
|
2026
|
+
GuardrailAssessmentFilterSensitiveLog,
|
|
2027
|
+
GuardrailTraceFilterSensitiveLog,
|
|
1847
2028
|
KnowledgeBaseLookupInputFilterSensitiveLog,
|
|
1848
2029
|
InvocationInputFilterSensitiveLog,
|
|
1849
2030
|
ModelInvocationInputFilterSensitiveLog,
|
|
@@ -125,6 +125,76 @@ export class ThrottlingException extends __BaseException {
|
|
|
125
125
|
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
+
export const GuardrailAction = {
|
|
129
|
+
INTERVENED: "INTERVENED",
|
|
130
|
+
NONE: "NONE",
|
|
131
|
+
};
|
|
132
|
+
export const GuardrailContentPolicyAction = {
|
|
133
|
+
BLOCKED: "BLOCKED",
|
|
134
|
+
};
|
|
135
|
+
export const GuardrailContentFilterConfidence = {
|
|
136
|
+
HIGH: "HIGH",
|
|
137
|
+
LOW: "LOW",
|
|
138
|
+
MEDIUM: "MEDIUM",
|
|
139
|
+
NONE: "NONE",
|
|
140
|
+
};
|
|
141
|
+
export const GuardrailContentFilterType = {
|
|
142
|
+
HATE: "HATE",
|
|
143
|
+
INSULTS: "INSULTS",
|
|
144
|
+
MISCONDUCT: "MISCONDUCT",
|
|
145
|
+
PROMPT_ATTACK: "PROMPT_ATTACK",
|
|
146
|
+
SEXUAL: "SEXUAL",
|
|
147
|
+
VIOLENCE: "VIOLENCE",
|
|
148
|
+
};
|
|
149
|
+
export const GuardrailSensitiveInformationPolicyAction = {
|
|
150
|
+
ANONYMIZED: "ANONYMIZED",
|
|
151
|
+
BLOCKED: "BLOCKED",
|
|
152
|
+
};
|
|
153
|
+
export const GuardrailPiiEntityType = {
|
|
154
|
+
ADDRESS: "ADDRESS",
|
|
155
|
+
AGE: "AGE",
|
|
156
|
+
AWS_ACCESS_KEY: "AWS_ACCESS_KEY",
|
|
157
|
+
AWS_SECRET_KEY: "AWS_SECRET_KEY",
|
|
158
|
+
CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER",
|
|
159
|
+
CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER",
|
|
160
|
+
CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV",
|
|
161
|
+
CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY",
|
|
162
|
+
CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER",
|
|
163
|
+
DRIVER_ID: "DRIVER_ID",
|
|
164
|
+
EMAIL: "EMAIL",
|
|
165
|
+
INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER",
|
|
166
|
+
IP_ADDRESS: "IP_ADDRESS",
|
|
167
|
+
LICENSE_PLATE: "LICENSE_PLATE",
|
|
168
|
+
MAC_ADDRESS: "MAC_ADDRESS",
|
|
169
|
+
NAME: "NAME",
|
|
170
|
+
PASSWORD: "PASSWORD",
|
|
171
|
+
PHONE: "PHONE",
|
|
172
|
+
PIN: "PIN",
|
|
173
|
+
SWIFT_CODE: "SWIFT_CODE",
|
|
174
|
+
UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER",
|
|
175
|
+
UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER",
|
|
176
|
+
UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",
|
|
177
|
+
URL: "URL",
|
|
178
|
+
USERNAME: "USERNAME",
|
|
179
|
+
US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER",
|
|
180
|
+
US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER",
|
|
181
|
+
US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",
|
|
182
|
+
US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER",
|
|
183
|
+
US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER",
|
|
184
|
+
VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER",
|
|
185
|
+
};
|
|
186
|
+
export const GuardrailTopicPolicyAction = {
|
|
187
|
+
BLOCKED: "BLOCKED",
|
|
188
|
+
};
|
|
189
|
+
export const GuardrailTopicType = {
|
|
190
|
+
DENY: "DENY",
|
|
191
|
+
};
|
|
192
|
+
export const GuardrailWordPolicyAction = {
|
|
193
|
+
BLOCKED: "BLOCKED",
|
|
194
|
+
};
|
|
195
|
+
export const GuardrailManagedWordType = {
|
|
196
|
+
PROFANITY: "PROFANITY",
|
|
197
|
+
};
|
|
128
198
|
export const InvocationType = {
|
|
129
199
|
ACTION_GROUP: "ACTION_GROUP",
|
|
130
200
|
FINISH: "FINISH",
|
|
@@ -189,6 +259,8 @@ export var PreProcessingTrace;
|
|
|
189
259
|
export var Trace;
|
|
190
260
|
(function (Trace) {
|
|
191
261
|
Trace.visit = (value, visitor) => {
|
|
262
|
+
if (value.guardrailTrace !== undefined)
|
|
263
|
+
return visitor.guardrailTrace(value.guardrailTrace);
|
|
192
264
|
if (value.preProcessingTrace !== undefined)
|
|
193
265
|
return visitor.preProcessingTrace(value.preProcessingTrace);
|
|
194
266
|
if (value.orchestrationTrace !== undefined)
|
|
@@ -279,6 +351,10 @@ export var RetrievalFilter;
|
|
|
279
351
|
return visitor.notIn(value.notIn);
|
|
280
352
|
if (value.startsWith !== undefined)
|
|
281
353
|
return visitor.startsWith(value.startsWith);
|
|
354
|
+
if (value.listContains !== undefined)
|
|
355
|
+
return visitor.listContains(value.listContains);
|
|
356
|
+
if (value.stringContains !== undefined)
|
|
357
|
+
return visitor.stringContains(value.stringContains);
|
|
282
358
|
if (value.andAll !== undefined)
|
|
283
359
|
return visitor.andAll(value.andAll);
|
|
284
360
|
if (value.orAll !== undefined)
|
|
@@ -379,6 +455,54 @@ export const FailureTraceFilterSensitiveLog = (obj) => ({
|
|
|
379
455
|
...obj,
|
|
380
456
|
...(obj.failureReason && { failureReason: SENSITIVE_STRING }),
|
|
381
457
|
});
|
|
458
|
+
export const GuardrailContentFilterFilterSensitiveLog = (obj) => ({
|
|
459
|
+
...obj,
|
|
460
|
+
});
|
|
461
|
+
export const GuardrailContentPolicyAssessmentFilterSensitiveLog = (obj) => ({
|
|
462
|
+
...obj,
|
|
463
|
+
...(obj.filters && { filters: SENSITIVE_STRING }),
|
|
464
|
+
});
|
|
465
|
+
export const GuardrailPiiEntityFilterFilterSensitiveLog = (obj) => ({
|
|
466
|
+
...obj,
|
|
467
|
+
});
|
|
468
|
+
export const GuardrailRegexFilterFilterSensitiveLog = (obj) => ({
|
|
469
|
+
...obj,
|
|
470
|
+
});
|
|
471
|
+
export const GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog = (obj) => ({
|
|
472
|
+
...obj,
|
|
473
|
+
...(obj.piiEntities && { piiEntities: SENSITIVE_STRING }),
|
|
474
|
+
...(obj.regexes && { regexes: SENSITIVE_STRING }),
|
|
475
|
+
});
|
|
476
|
+
export const GuardrailTopicFilterSensitiveLog = (obj) => ({
|
|
477
|
+
...obj,
|
|
478
|
+
});
|
|
479
|
+
export const GuardrailTopicPolicyAssessmentFilterSensitiveLog = (obj) => ({
|
|
480
|
+
...obj,
|
|
481
|
+
...(obj.topics && { topics: SENSITIVE_STRING }),
|
|
482
|
+
});
|
|
483
|
+
export const GuardrailCustomWordFilterSensitiveLog = (obj) => ({
|
|
484
|
+
...obj,
|
|
485
|
+
});
|
|
486
|
+
export const GuardrailManagedWordFilterSensitiveLog = (obj) => ({
|
|
487
|
+
...obj,
|
|
488
|
+
});
|
|
489
|
+
export const GuardrailWordPolicyAssessmentFilterSensitiveLog = (obj) => ({
|
|
490
|
+
...obj,
|
|
491
|
+
...(obj.customWords && { customWords: SENSITIVE_STRING }),
|
|
492
|
+
...(obj.managedWordLists && { managedWordLists: SENSITIVE_STRING }),
|
|
493
|
+
});
|
|
494
|
+
export const GuardrailAssessmentFilterSensitiveLog = (obj) => ({
|
|
495
|
+
...obj,
|
|
496
|
+
...(obj.topicPolicy && { topicPolicy: SENSITIVE_STRING }),
|
|
497
|
+
...(obj.contentPolicy && { contentPolicy: SENSITIVE_STRING }),
|
|
498
|
+
...(obj.wordPolicy && { wordPolicy: SENSITIVE_STRING }),
|
|
499
|
+
...(obj.sensitiveInformationPolicy && { sensitiveInformationPolicy: SENSITIVE_STRING }),
|
|
500
|
+
});
|
|
501
|
+
export const GuardrailTraceFilterSensitiveLog = (obj) => ({
|
|
502
|
+
...obj,
|
|
503
|
+
...(obj.inputAssessments && { inputAssessments: SENSITIVE_STRING }),
|
|
504
|
+
...(obj.outputAssessments && { outputAssessments: SENSITIVE_STRING }),
|
|
505
|
+
});
|
|
382
506
|
export const KnowledgeBaseLookupInputFilterSensitiveLog = (obj) => ({
|
|
383
507
|
...obj,
|
|
384
508
|
...(obj.text && { text: SENSITIVE_STRING }),
|
|
@@ -471,6 +595,8 @@ export const PreProcessingTraceFilterSensitiveLog = (obj) => {
|
|
|
471
595
|
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
472
596
|
};
|
|
473
597
|
export const TraceFilterSensitiveLog = (obj) => {
|
|
598
|
+
if (obj.guardrailTrace !== undefined)
|
|
599
|
+
return { guardrailTrace: SENSITIVE_STRING };
|
|
474
600
|
if (obj.preProcessingTrace !== undefined)
|
|
475
601
|
return { preProcessingTrace: SENSITIVE_STRING };
|
|
476
602
|
if (obj.orchestrationTrace !== undefined)
|
|
@@ -589,6 +715,10 @@ export const RetrievalFilterFilterSensitiveLog = (obj) => {
|
|
|
589
715
|
return { notIn: obj.notIn };
|
|
590
716
|
if (obj.startsWith !== undefined)
|
|
591
717
|
return { startsWith: obj.startsWith };
|
|
718
|
+
if (obj.listContains !== undefined)
|
|
719
|
+
return { listContains: obj.listContains };
|
|
720
|
+
if (obj.stringContains !== undefined)
|
|
721
|
+
return { stringContains: obj.stringContains };
|
|
592
722
|
if (obj.andAll !== undefined)
|
|
593
723
|
return { andAll: SENSITIVE_STRING };
|
|
594
724
|
if (obj.orAll !== undefined)
|
|
@@ -507,10 +507,12 @@ const se_RetrievalFilter = (input, context) => {
|
|
|
507
507
|
in: (value) => ({ in: se_FilterAttribute(value, context) }),
|
|
508
508
|
lessThan: (value) => ({ lessThan: se_FilterAttribute(value, context) }),
|
|
509
509
|
lessThanOrEquals: (value) => ({ lessThanOrEquals: se_FilterAttribute(value, context) }),
|
|
510
|
+
listContains: (value) => ({ listContains: se_FilterAttribute(value, context) }),
|
|
510
511
|
notEquals: (value) => ({ notEquals: se_FilterAttribute(value, context) }),
|
|
511
512
|
notIn: (value) => ({ notIn: se_FilterAttribute(value, context) }),
|
|
512
513
|
orAll: (value) => ({ orAll: se_RetrievalFilterList(value, context) }),
|
|
513
514
|
startsWith: (value) => ({ startsWith: se_FilterAttribute(value, context) }),
|
|
515
|
+
stringContains: (value) => ({ stringContains: se_FilterAttribute(value, context) }),
|
|
514
516
|
_: (name, value) => ({ name: value }),
|
|
515
517
|
});
|
|
516
518
|
};
|
|
@@ -694,6 +696,11 @@ const de_Trace = (output, context) => {
|
|
|
694
696
|
failureTrace: _json(output.failureTrace),
|
|
695
697
|
};
|
|
696
698
|
}
|
|
699
|
+
if (output.guardrailTrace != null) {
|
|
700
|
+
return {
|
|
701
|
+
guardrailTrace: _json(output.guardrailTrace),
|
|
702
|
+
};
|
|
703
|
+
}
|
|
697
704
|
if (output.orchestrationTrace != null) {
|
|
698
705
|
return {
|
|
699
706
|
orchestrationTrace: de_OrchestrationTrace(__expectUnion(output.orchestrationTrace), context),
|
|
@@ -152,6 +152,118 @@ declare const InvokeAgentCommand_base: {
|
|
|
152
152
|
* // sessionId: "STRING_VALUE",
|
|
153
153
|
* // agentVersion: "STRING_VALUE",
|
|
154
154
|
* // trace: { // Trace Union: only one key present
|
|
155
|
+
* // guardrailTrace: { // GuardrailTrace
|
|
156
|
+
* // action: "INTERVENED" || "NONE",
|
|
157
|
+
* // traceId: "STRING_VALUE",
|
|
158
|
+
* // inputAssessments: [ // GuardrailAssessmentList
|
|
159
|
+
* // { // GuardrailAssessment
|
|
160
|
+
* // topicPolicy: { // GuardrailTopicPolicyAssessment
|
|
161
|
+
* // topics: [ // GuardrailTopicList
|
|
162
|
+
* // { // GuardrailTopic
|
|
163
|
+
* // name: "STRING_VALUE",
|
|
164
|
+
* // type: "DENY",
|
|
165
|
+
* // action: "BLOCKED",
|
|
166
|
+
* // },
|
|
167
|
+
* // ],
|
|
168
|
+
* // },
|
|
169
|
+
* // contentPolicy: { // GuardrailContentPolicyAssessment
|
|
170
|
+
* // filters: [ // GuardrailContentFilterList
|
|
171
|
+
* // { // GuardrailContentFilter
|
|
172
|
+
* // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK",
|
|
173
|
+
* // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH",
|
|
174
|
+
* // action: "BLOCKED",
|
|
175
|
+
* // },
|
|
176
|
+
* // ],
|
|
177
|
+
* // },
|
|
178
|
+
* // wordPolicy: { // GuardrailWordPolicyAssessment
|
|
179
|
+
* // customWords: [ // GuardrailCustomWordList
|
|
180
|
+
* // { // GuardrailCustomWord
|
|
181
|
+
* // match: "STRING_VALUE",
|
|
182
|
+
* // action: "BLOCKED",
|
|
183
|
+
* // },
|
|
184
|
+
* // ],
|
|
185
|
+
* // managedWordLists: [ // GuardrailManagedWordList
|
|
186
|
+
* // { // GuardrailManagedWord
|
|
187
|
+
* // match: "STRING_VALUE",
|
|
188
|
+
* // type: "PROFANITY",
|
|
189
|
+
* // action: "BLOCKED",
|
|
190
|
+
* // },
|
|
191
|
+
* // ],
|
|
192
|
+
* // },
|
|
193
|
+
* // sensitiveInformationPolicy: { // GuardrailSensitiveInformationPolicyAssessment
|
|
194
|
+
* // piiEntities: [ // GuardrailPiiEntityFilterList
|
|
195
|
+
* // { // GuardrailPiiEntityFilter
|
|
196
|
+
* // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER",
|
|
197
|
+
* // match: "STRING_VALUE",
|
|
198
|
+
* // action: "BLOCKED" || "ANONYMIZED",
|
|
199
|
+
* // },
|
|
200
|
+
* // ],
|
|
201
|
+
* // regexes: [ // GuardrailRegexFilterList
|
|
202
|
+
* // { // GuardrailRegexFilter
|
|
203
|
+
* // name: "STRING_VALUE",
|
|
204
|
+
* // regex: "STRING_VALUE",
|
|
205
|
+
* // match: "STRING_VALUE",
|
|
206
|
+
* // action: "BLOCKED" || "ANONYMIZED",
|
|
207
|
+
* // },
|
|
208
|
+
* // ],
|
|
209
|
+
* // },
|
|
210
|
+
* // },
|
|
211
|
+
* // ],
|
|
212
|
+
* // outputAssessments: [
|
|
213
|
+
* // {
|
|
214
|
+
* // topicPolicy: {
|
|
215
|
+
* // topics: [
|
|
216
|
+
* // {
|
|
217
|
+
* // name: "STRING_VALUE",
|
|
218
|
+
* // type: "DENY",
|
|
219
|
+
* // action: "BLOCKED",
|
|
220
|
+
* // },
|
|
221
|
+
* // ],
|
|
222
|
+
* // },
|
|
223
|
+
* // contentPolicy: {
|
|
224
|
+
* // filters: [
|
|
225
|
+
* // {
|
|
226
|
+
* // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK",
|
|
227
|
+
* // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH",
|
|
228
|
+
* // action: "BLOCKED",
|
|
229
|
+
* // },
|
|
230
|
+
* // ],
|
|
231
|
+
* // },
|
|
232
|
+
* // wordPolicy: {
|
|
233
|
+
* // customWords: [
|
|
234
|
+
* // {
|
|
235
|
+
* // match: "STRING_VALUE",
|
|
236
|
+
* // action: "BLOCKED",
|
|
237
|
+
* // },
|
|
238
|
+
* // ],
|
|
239
|
+
* // managedWordLists: [
|
|
240
|
+
* // {
|
|
241
|
+
* // match: "STRING_VALUE",
|
|
242
|
+
* // type: "PROFANITY",
|
|
243
|
+
* // action: "BLOCKED",
|
|
244
|
+
* // },
|
|
245
|
+
* // ],
|
|
246
|
+
* // },
|
|
247
|
+
* // sensitiveInformationPolicy: {
|
|
248
|
+
* // piiEntities: [
|
|
249
|
+
* // {
|
|
250
|
+
* // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER",
|
|
251
|
+
* // match: "STRING_VALUE",
|
|
252
|
+
* // action: "BLOCKED" || "ANONYMIZED",
|
|
253
|
+
* // },
|
|
254
|
+
* // ],
|
|
255
|
+
* // regexes: [
|
|
256
|
+
* // {
|
|
257
|
+
* // name: "STRING_VALUE",
|
|
258
|
+
* // regex: "STRING_VALUE",
|
|
259
|
+
* // match: "STRING_VALUE",
|
|
260
|
+
* // action: "BLOCKED" || "ANONYMIZED",
|
|
261
|
+
* // },
|
|
262
|
+
* // ],
|
|
263
|
+
* // },
|
|
264
|
+
* // },
|
|
265
|
+
* // ],
|
|
266
|
+
* // },
|
|
155
267
|
* // preProcessingTrace: { // PreProcessingTrace Union: only one key present
|
|
156
268
|
* // modelInvocationInput: { // ModelInvocationInput
|
|
157
269
|
* // traceId: "STRING_VALUE",
|
|
@@ -72,6 +72,8 @@ declare const RetrieveAndGenerateCommand_base: {
|
|
|
72
72
|
* in: "<FilterAttribute>",
|
|
73
73
|
* notIn: "<FilterAttribute>",
|
|
74
74
|
* startsWith: "<FilterAttribute>",
|
|
75
|
+
* listContains: "<FilterAttribute>",
|
|
76
|
+
* stringContains: "<FilterAttribute>",
|
|
75
77
|
* andAll: [ // RetrievalFilterList
|
|
76
78
|
* {// Union: only one key present
|
|
77
79
|
* equals: "<FilterAttribute>",
|
|
@@ -83,6 +85,8 @@ declare const RetrieveAndGenerateCommand_base: {
|
|
|
83
85
|
* in: "<FilterAttribute>",
|
|
84
86
|
* notIn: "<FilterAttribute>",
|
|
85
87
|
* startsWith: "<FilterAttribute>",
|
|
88
|
+
* listContains: "<FilterAttribute>",
|
|
89
|
+
* stringContains: "<FilterAttribute>",
|
|
86
90
|
* andAll: [
|
|
87
91
|
* "<RetrievalFilter>",
|
|
88
92
|
* ],
|
|
@@ -67,6 +67,8 @@ declare const RetrieveCommand_base: {
|
|
|
67
67
|
* in: "<FilterAttribute>",
|
|
68
68
|
* notIn: "<FilterAttribute>",
|
|
69
69
|
* startsWith: "<FilterAttribute>",
|
|
70
|
+
* listContains: "<FilterAttribute>",
|
|
71
|
+
* stringContains: "<FilterAttribute>",
|
|
70
72
|
* andAll: [ // RetrievalFilterList
|
|
71
73
|
* {// Union: only one key present
|
|
72
74
|
* equals: "<FilterAttribute>",
|
|
@@ -78,6 +80,8 @@ declare const RetrieveCommand_base: {
|
|
|
78
80
|
* in: "<FilterAttribute>",
|
|
79
81
|
* notIn: "<FilterAttribute>",
|
|
80
82
|
* startsWith: "<FilterAttribute>",
|
|
83
|
+
* listContains: "<FilterAttribute>",
|
|
84
|
+
* stringContains: "<FilterAttribute>",
|
|
81
85
|
* andAll: [
|
|
82
86
|
* "<RetrievalFilter>",
|
|
83
87
|
* ],
|