@aws-sdk/client-bedrock 3.554.0 → 3.561.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/README.md +81 -1
- package/dist-cjs/index.js +1005 -79
- package/dist-es/Bedrock.js +20 -0
- package/dist-es/commands/CreateEvaluationJobCommand.js +25 -0
- package/dist-es/commands/CreateGuardrailCommand.js +25 -0
- package/dist-es/commands/CreateGuardrailVersionCommand.js +25 -0
- package/dist-es/commands/DeleteGuardrailCommand.js +24 -0
- package/dist-es/commands/GetEvaluationJobCommand.js +25 -0
- package/dist-es/commands/GetGuardrailCommand.js +25 -0
- package/dist-es/commands/ListEvaluationJobsCommand.js +24 -0
- package/dist-es/commands/ListGuardrailsCommand.js +25 -0
- package/dist-es/commands/StopEvaluationJobCommand.js +25 -0
- package/dist-es/commands/UpdateGuardrailCommand.js +25 -0
- package/dist-es/commands/index.js +10 -0
- package/dist-es/models/models_0.js +312 -48
- package/dist-es/pagination/ListEvaluationJobsPaginator.js +4 -0
- package/dist-es/pagination/ListGuardrailsPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +374 -4
- package/dist-types/Bedrock.d.ts +73 -1
- package/dist-types/BedrockClient.d.ts +13 -3
- package/dist-types/commands/CreateEvaluationJobCommand.d.ts +148 -0
- package/dist-types/commands/CreateGuardrailCommand.d.ts +186 -0
- package/dist-types/commands/CreateGuardrailVersionCommand.d.ts +84 -0
- package/dist-types/commands/CreateModelCustomizationJobCommand.d.ts +6 -8
- package/dist-types/commands/CreateProvisionedModelThroughputCommand.d.ts +2 -3
- package/dist-types/commands/DeleteCustomModelCommand.d.ts +2 -2
- package/dist-types/commands/DeleteGuardrailCommand.d.ts +84 -0
- package/dist-types/commands/DeleteProvisionedModelThroughputCommand.d.ts +2 -2
- package/dist-types/commands/GetCustomModelCommand.d.ts +2 -2
- package/dist-types/commands/GetEvaluationJobCommand.d.ts +144 -0
- package/dist-types/commands/GetFoundationModelCommand.d.ts +1 -1
- package/dist-types/commands/GetGuardrailCommand.d.ts +140 -0
- package/dist-types/commands/GetModelCustomizationJobCommand.d.ts +2 -2
- package/dist-types/commands/GetProvisionedModelThroughputCommand.d.ts +2 -2
- package/dist-types/commands/ListCustomModelsCommand.d.ts +1 -1
- package/dist-types/commands/ListEvaluationJobsCommand.d.ts +93 -0
- package/dist-types/commands/ListFoundationModelsCommand.d.ts +1 -1
- package/dist-types/commands/ListGuardrailsCommand.d.ts +89 -0
- package/dist-types/commands/ListModelCustomizationJobsCommand.d.ts +2 -2
- package/dist-types/commands/ListProvisionedModelThroughputsCommand.d.ts +1 -1
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +2 -2
- package/dist-types/commands/StopEvaluationJobCommand.d.ts +75 -0
- package/dist-types/commands/StopModelCustomizationJobCommand.d.ts +2 -2
- package/dist-types/commands/TagResourceCommand.d.ts +2 -2
- package/dist-types/commands/UntagResourceCommand.d.ts +2 -2
- package/dist-types/commands/UpdateGuardrailCommand.d.ts +176 -0
- package/dist-types/commands/UpdateProvisionedModelThroughputCommand.d.ts +2 -2
- package/dist-types/commands/index.d.ts +10 -0
- package/dist-types/index.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +1926 -215
- package/dist-types/pagination/ListEvaluationJobsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListGuardrailsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +90 -0
- package/dist-types/ts3.4/Bedrock.d.ts +172 -0
- package/dist-types/ts3.4/BedrockClient.d.ts +60 -0
- package/dist-types/ts3.4/commands/CreateEvaluationJobCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/CreateGuardrailCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateGuardrailVersionCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/DeleteGuardrailCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetEvaluationJobCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetGuardrailCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListEvaluationJobsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListGuardrailsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/StopEvaluationJobCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/UpdateGuardrailCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +10 -0
- package/dist-types/ts3.4/models/models_0.d.ts +572 -49
- package/dist-types/ts3.4/pagination/ListEvaluationJobsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListGuardrailsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +120 -0
- package/package.json +4 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SENSITIVE_STRING } from "@smithy/smithy-client";
|
|
1
2
|
import { BedrockServiceException as __BaseException } from "./BedrockServiceException";
|
|
2
3
|
export class AccessDeniedException extends __BaseException {
|
|
3
4
|
constructor(opts) {
|
|
@@ -11,6 +12,59 @@ export class AccessDeniedException extends __BaseException {
|
|
|
11
12
|
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
13
|
}
|
|
13
14
|
}
|
|
15
|
+
export class ConflictException extends __BaseException {
|
|
16
|
+
constructor(opts) {
|
|
17
|
+
super({
|
|
18
|
+
name: "ConflictException",
|
|
19
|
+
$fault: "client",
|
|
20
|
+
...opts,
|
|
21
|
+
});
|
|
22
|
+
this.name = "ConflictException";
|
|
23
|
+
this.$fault = "client";
|
|
24
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export var EvaluationDatasetLocation;
|
|
28
|
+
(function (EvaluationDatasetLocation) {
|
|
29
|
+
EvaluationDatasetLocation.visit = (value, visitor) => {
|
|
30
|
+
if (value.s3Uri !== undefined)
|
|
31
|
+
return visitor.s3Uri(value.s3Uri);
|
|
32
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
33
|
+
};
|
|
34
|
+
})(EvaluationDatasetLocation || (EvaluationDatasetLocation = {}));
|
|
35
|
+
export const EvaluationTaskType = {
|
|
36
|
+
CLASSIFICATION: "Classification",
|
|
37
|
+
CUSTOM: "Custom",
|
|
38
|
+
GENERATION: "Generation",
|
|
39
|
+
QUESTION_AND_ANSWER: "QuestionAndAnswer",
|
|
40
|
+
SUMMARIZATION: "Summarization",
|
|
41
|
+
};
|
|
42
|
+
export var EvaluationConfig;
|
|
43
|
+
(function (EvaluationConfig) {
|
|
44
|
+
EvaluationConfig.visit = (value, visitor) => {
|
|
45
|
+
if (value.automated !== undefined)
|
|
46
|
+
return visitor.automated(value.automated);
|
|
47
|
+
if (value.human !== undefined)
|
|
48
|
+
return visitor.human(value.human);
|
|
49
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
50
|
+
};
|
|
51
|
+
})(EvaluationConfig || (EvaluationConfig = {}));
|
|
52
|
+
export var EvaluationModelConfig;
|
|
53
|
+
(function (EvaluationModelConfig) {
|
|
54
|
+
EvaluationModelConfig.visit = (value, visitor) => {
|
|
55
|
+
if (value.bedrockModel !== undefined)
|
|
56
|
+
return visitor.bedrockModel(value.bedrockModel);
|
|
57
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
58
|
+
};
|
|
59
|
+
})(EvaluationModelConfig || (EvaluationModelConfig = {}));
|
|
60
|
+
export var EvaluationInferenceConfig;
|
|
61
|
+
(function (EvaluationInferenceConfig) {
|
|
62
|
+
EvaluationInferenceConfig.visit = (value, visitor) => {
|
|
63
|
+
if (value.models !== undefined)
|
|
64
|
+
return visitor.models(value.models);
|
|
65
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
66
|
+
};
|
|
67
|
+
})(EvaluationInferenceConfig || (EvaluationInferenceConfig = {}));
|
|
14
68
|
export class InternalServerException extends __BaseException {
|
|
15
69
|
constructor(opts) {
|
|
16
70
|
super({
|
|
@@ -23,54 +77,150 @@ export class InternalServerException extends __BaseException {
|
|
|
23
77
|
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
24
78
|
}
|
|
25
79
|
}
|
|
26
|
-
export class
|
|
80
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
27
81
|
constructor(opts) {
|
|
28
82
|
super({
|
|
29
|
-
name: "
|
|
83
|
+
name: "ResourceNotFoundException",
|
|
30
84
|
$fault: "client",
|
|
31
85
|
...opts,
|
|
32
86
|
});
|
|
33
|
-
this.name = "
|
|
87
|
+
this.name = "ResourceNotFoundException";
|
|
34
88
|
this.$fault = "client";
|
|
35
|
-
Object.setPrototypeOf(this,
|
|
89
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
36
90
|
}
|
|
37
91
|
}
|
|
38
|
-
export class
|
|
92
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
39
93
|
constructor(opts) {
|
|
40
94
|
super({
|
|
41
|
-
name: "
|
|
95
|
+
name: "ServiceQuotaExceededException",
|
|
42
96
|
$fault: "client",
|
|
43
97
|
...opts,
|
|
44
98
|
});
|
|
45
|
-
this.name = "
|
|
99
|
+
this.name = "ServiceQuotaExceededException";
|
|
46
100
|
this.$fault = "client";
|
|
47
|
-
Object.setPrototypeOf(this,
|
|
101
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
48
102
|
}
|
|
49
103
|
}
|
|
50
|
-
export class
|
|
104
|
+
export class ThrottlingException extends __BaseException {
|
|
51
105
|
constructor(opts) {
|
|
52
106
|
super({
|
|
53
|
-
name: "
|
|
107
|
+
name: "ThrottlingException",
|
|
54
108
|
$fault: "client",
|
|
55
109
|
...opts,
|
|
56
110
|
});
|
|
57
|
-
this.name = "
|
|
111
|
+
this.name = "ThrottlingException";
|
|
58
112
|
this.$fault = "client";
|
|
59
|
-
Object.setPrototypeOf(this,
|
|
113
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
60
114
|
}
|
|
61
115
|
}
|
|
62
|
-
export class
|
|
116
|
+
export class ValidationException extends __BaseException {
|
|
63
117
|
constructor(opts) {
|
|
64
118
|
super({
|
|
65
|
-
name: "
|
|
119
|
+
name: "ValidationException",
|
|
66
120
|
$fault: "client",
|
|
67
121
|
...opts,
|
|
68
122
|
});
|
|
69
|
-
this.name = "
|
|
123
|
+
this.name = "ValidationException";
|
|
70
124
|
this.$fault = "client";
|
|
71
|
-
Object.setPrototypeOf(this,
|
|
125
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
export const EvaluationJobType = {
|
|
129
|
+
AUTOMATED: "Automated",
|
|
130
|
+
HUMAN: "Human",
|
|
131
|
+
};
|
|
132
|
+
export const EvaluationJobStatus = {
|
|
133
|
+
COMPLETED: "Completed",
|
|
134
|
+
FAILED: "Failed",
|
|
135
|
+
IN_PROGRESS: "InProgress",
|
|
136
|
+
STOPPED: "Stopped",
|
|
137
|
+
STOPPING: "Stopping",
|
|
138
|
+
};
|
|
139
|
+
export const SortJobsBy = {
|
|
140
|
+
CREATION_TIME: "CreationTime",
|
|
141
|
+
};
|
|
142
|
+
export const SortOrder = {
|
|
143
|
+
ASCENDING: "Ascending",
|
|
144
|
+
DESCENDING: "Descending",
|
|
145
|
+
};
|
|
146
|
+
export const GuardrailFilterStrength = {
|
|
147
|
+
HIGH: "HIGH",
|
|
148
|
+
LOW: "LOW",
|
|
149
|
+
MEDIUM: "MEDIUM",
|
|
150
|
+
NONE: "NONE",
|
|
151
|
+
};
|
|
152
|
+
export const GuardrailContentFilterType = {
|
|
153
|
+
HATE: "HATE",
|
|
154
|
+
INSULTS: "INSULTS",
|
|
155
|
+
MISCONDUCT: "MISCONDUCT",
|
|
156
|
+
PROMPT_ATTACK: "PROMPT_ATTACK",
|
|
157
|
+
SEXUAL: "SEXUAL",
|
|
158
|
+
VIOLENCE: "VIOLENCE",
|
|
159
|
+
};
|
|
160
|
+
export const GuardrailSensitiveInformationAction = {
|
|
161
|
+
ANONYMIZE: "ANONYMIZE",
|
|
162
|
+
BLOCK: "BLOCK",
|
|
163
|
+
};
|
|
164
|
+
export const GuardrailPiiEntityType = {
|
|
165
|
+
ADDRESS: "ADDRESS",
|
|
166
|
+
AGE: "AGE",
|
|
167
|
+
AWS_ACCESS_KEY: "AWS_ACCESS_KEY",
|
|
168
|
+
AWS_SECRET_KEY: "AWS_SECRET_KEY",
|
|
169
|
+
CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER",
|
|
170
|
+
CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER",
|
|
171
|
+
CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV",
|
|
172
|
+
CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY",
|
|
173
|
+
CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER",
|
|
174
|
+
DRIVER_ID: "DRIVER_ID",
|
|
175
|
+
EMAIL: "EMAIL",
|
|
176
|
+
INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER",
|
|
177
|
+
IP_ADDRESS: "IP_ADDRESS",
|
|
178
|
+
LICENSE_PLATE: "LICENSE_PLATE",
|
|
179
|
+
MAC_ADDRESS: "MAC_ADDRESS",
|
|
180
|
+
NAME: "NAME",
|
|
181
|
+
PASSWORD: "PASSWORD",
|
|
182
|
+
PHONE: "PHONE",
|
|
183
|
+
PIN: "PIN",
|
|
184
|
+
SWIFT_CODE: "SWIFT_CODE",
|
|
185
|
+
UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER",
|
|
186
|
+
UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER",
|
|
187
|
+
UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",
|
|
188
|
+
URL: "URL",
|
|
189
|
+
USERNAME: "USERNAME",
|
|
190
|
+
US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER",
|
|
191
|
+
US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER",
|
|
192
|
+
US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",
|
|
193
|
+
US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER",
|
|
194
|
+
US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER",
|
|
195
|
+
VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER",
|
|
196
|
+
};
|
|
197
|
+
export const GuardrailTopicType = {
|
|
198
|
+
DENY: "DENY",
|
|
199
|
+
};
|
|
200
|
+
export const GuardrailManagedWordsType = {
|
|
201
|
+
PROFANITY: "PROFANITY",
|
|
202
|
+
};
|
|
203
|
+
export class TooManyTagsException extends __BaseException {
|
|
204
|
+
constructor(opts) {
|
|
205
|
+
super({
|
|
206
|
+
name: "TooManyTagsException",
|
|
207
|
+
$fault: "client",
|
|
208
|
+
...opts,
|
|
209
|
+
});
|
|
210
|
+
this.name = "TooManyTagsException";
|
|
211
|
+
this.$fault = "client";
|
|
212
|
+
Object.setPrototypeOf(this, TooManyTagsException.prototype);
|
|
213
|
+
this.resourceName = opts.resourceName;
|
|
72
214
|
}
|
|
73
215
|
}
|
|
216
|
+
export const GuardrailStatus = {
|
|
217
|
+
CREATING: "CREATING",
|
|
218
|
+
DELETING: "DELETING",
|
|
219
|
+
FAILED: "FAILED",
|
|
220
|
+
READY: "READY",
|
|
221
|
+
UPDATING: "UPDATING",
|
|
222
|
+
VERSIONING: "VERSIONING",
|
|
223
|
+
};
|
|
74
224
|
export const CustomizationType = {
|
|
75
225
|
CONTINUED_PRE_TRAINING: "CONTINUED_PRE_TRAINING",
|
|
76
226
|
FINE_TUNING: "FINE_TUNING",
|
|
@@ -95,39 +245,10 @@ export const FoundationModelLifecycleStatus = {
|
|
|
95
245
|
export const SortModelsBy = {
|
|
96
246
|
CREATION_TIME: "CreationTime",
|
|
97
247
|
};
|
|
98
|
-
export const SortOrder = {
|
|
99
|
-
ASCENDING: "Ascending",
|
|
100
|
-
DESCENDING: "Descending",
|
|
101
|
-
};
|
|
102
248
|
export const CommitmentDuration = {
|
|
103
249
|
ONE_MONTH: "OneMonth",
|
|
104
250
|
SIX_MONTHS: "SixMonths",
|
|
105
251
|
};
|
|
106
|
-
export class ServiceQuotaExceededException extends __BaseException {
|
|
107
|
-
constructor(opts) {
|
|
108
|
-
super({
|
|
109
|
-
name: "ServiceQuotaExceededException",
|
|
110
|
-
$fault: "client",
|
|
111
|
-
...opts,
|
|
112
|
-
});
|
|
113
|
-
this.name = "ServiceQuotaExceededException";
|
|
114
|
-
this.$fault = "client";
|
|
115
|
-
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
export class TooManyTagsException extends __BaseException {
|
|
119
|
-
constructor(opts) {
|
|
120
|
-
super({
|
|
121
|
-
name: "TooManyTagsException",
|
|
122
|
-
$fault: "client",
|
|
123
|
-
...opts,
|
|
124
|
-
});
|
|
125
|
-
this.name = "TooManyTagsException";
|
|
126
|
-
this.$fault = "client";
|
|
127
|
-
Object.setPrototypeOf(this, TooManyTagsException.prototype);
|
|
128
|
-
this.resourceName = opts.resourceName;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
252
|
export const ProvisionedModelStatus = {
|
|
132
253
|
CREATING: "Creating",
|
|
133
254
|
FAILED: "Failed",
|
|
@@ -144,9 +265,6 @@ export const ModelCustomizationJobStatus = {
|
|
|
144
265
|
STOPPED: "Stopped",
|
|
145
266
|
STOPPING: "Stopping",
|
|
146
267
|
};
|
|
147
|
-
export const SortJobsBy = {
|
|
148
|
-
CREATION_TIME: "CreationTime",
|
|
149
|
-
};
|
|
150
268
|
export const FineTuningJobStatus = {
|
|
151
269
|
COMPLETED: "Completed",
|
|
152
270
|
FAILED: "Failed",
|
|
@@ -154,3 +272,149 @@ export const FineTuningJobStatus = {
|
|
|
154
272
|
STOPPED: "Stopped",
|
|
155
273
|
STOPPING: "Stopping",
|
|
156
274
|
};
|
|
275
|
+
export const EvaluationDatasetFilterSensitiveLog = (obj) => ({
|
|
276
|
+
...obj,
|
|
277
|
+
...(obj.name && { name: SENSITIVE_STRING }),
|
|
278
|
+
...(obj.datasetLocation && { datasetLocation: obj.datasetLocation }),
|
|
279
|
+
});
|
|
280
|
+
export const EvaluationDatasetMetricConfigFilterSensitiveLog = (obj) => ({
|
|
281
|
+
...obj,
|
|
282
|
+
...(obj.dataset && { dataset: EvaluationDatasetFilterSensitiveLog(obj.dataset) }),
|
|
283
|
+
...(obj.metricNames && { metricNames: SENSITIVE_STRING }),
|
|
284
|
+
});
|
|
285
|
+
export const AutomatedEvaluationConfigFilterSensitiveLog = (obj) => ({
|
|
286
|
+
...obj,
|
|
287
|
+
...(obj.datasetMetricConfigs && {
|
|
288
|
+
datasetMetricConfigs: obj.datasetMetricConfigs.map((item) => EvaluationDatasetMetricConfigFilterSensitiveLog(item)),
|
|
289
|
+
}),
|
|
290
|
+
});
|
|
291
|
+
export const HumanEvaluationCustomMetricFilterSensitiveLog = (obj) => ({
|
|
292
|
+
...obj,
|
|
293
|
+
...(obj.name && { name: SENSITIVE_STRING }),
|
|
294
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
295
|
+
});
|
|
296
|
+
export const HumanWorkflowConfigFilterSensitiveLog = (obj) => ({
|
|
297
|
+
...obj,
|
|
298
|
+
...(obj.instructions && { instructions: SENSITIVE_STRING }),
|
|
299
|
+
});
|
|
300
|
+
export const HumanEvaluationConfigFilterSensitiveLog = (obj) => ({
|
|
301
|
+
...obj,
|
|
302
|
+
...(obj.humanWorkflowConfig && {
|
|
303
|
+
humanWorkflowConfig: HumanWorkflowConfigFilterSensitiveLog(obj.humanWorkflowConfig),
|
|
304
|
+
}),
|
|
305
|
+
...(obj.customMetrics && {
|
|
306
|
+
customMetrics: obj.customMetrics.map((item) => HumanEvaluationCustomMetricFilterSensitiveLog(item)),
|
|
307
|
+
}),
|
|
308
|
+
...(obj.datasetMetricConfigs && {
|
|
309
|
+
datasetMetricConfigs: obj.datasetMetricConfigs.map((item) => EvaluationDatasetMetricConfigFilterSensitiveLog(item)),
|
|
310
|
+
}),
|
|
311
|
+
});
|
|
312
|
+
export const EvaluationConfigFilterSensitiveLog = (obj) => {
|
|
313
|
+
if (obj.automated !== undefined)
|
|
314
|
+
return { automated: AutomatedEvaluationConfigFilterSensitiveLog(obj.automated) };
|
|
315
|
+
if (obj.human !== undefined)
|
|
316
|
+
return { human: HumanEvaluationConfigFilterSensitiveLog(obj.human) };
|
|
317
|
+
if (obj.$unknown !== undefined)
|
|
318
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
319
|
+
};
|
|
320
|
+
export const EvaluationBedrockModelFilterSensitiveLog = (obj) => ({
|
|
321
|
+
...obj,
|
|
322
|
+
...(obj.inferenceParams && { inferenceParams: SENSITIVE_STRING }),
|
|
323
|
+
});
|
|
324
|
+
export const EvaluationModelConfigFilterSensitiveLog = (obj) => {
|
|
325
|
+
if (obj.bedrockModel !== undefined)
|
|
326
|
+
return { bedrockModel: EvaluationBedrockModelFilterSensitiveLog(obj.bedrockModel) };
|
|
327
|
+
if (obj.$unknown !== undefined)
|
|
328
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
329
|
+
};
|
|
330
|
+
export const EvaluationInferenceConfigFilterSensitiveLog = (obj) => {
|
|
331
|
+
if (obj.models !== undefined)
|
|
332
|
+
return { models: obj.models.map((item) => EvaluationModelConfigFilterSensitiveLog(item)) };
|
|
333
|
+
if (obj.$unknown !== undefined)
|
|
334
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
335
|
+
};
|
|
336
|
+
export const CreateEvaluationJobRequestFilterSensitiveLog = (obj) => ({
|
|
337
|
+
...obj,
|
|
338
|
+
...(obj.jobDescription && { jobDescription: SENSITIVE_STRING }),
|
|
339
|
+
...(obj.evaluationConfig && { evaluationConfig: EvaluationConfigFilterSensitiveLog(obj.evaluationConfig) }),
|
|
340
|
+
...(obj.inferenceConfig && { inferenceConfig: EvaluationInferenceConfigFilterSensitiveLog(obj.inferenceConfig) }),
|
|
341
|
+
});
|
|
342
|
+
export const GetEvaluationJobRequestFilterSensitiveLog = (obj) => ({
|
|
343
|
+
...obj,
|
|
344
|
+
...(obj.jobIdentifier && { jobIdentifier: SENSITIVE_STRING }),
|
|
345
|
+
});
|
|
346
|
+
export const GetEvaluationJobResponseFilterSensitiveLog = (obj) => ({
|
|
347
|
+
...obj,
|
|
348
|
+
...(obj.jobDescription && { jobDescription: SENSITIVE_STRING }),
|
|
349
|
+
...(obj.evaluationConfig && { evaluationConfig: EvaluationConfigFilterSensitiveLog(obj.evaluationConfig) }),
|
|
350
|
+
...(obj.inferenceConfig && { inferenceConfig: EvaluationInferenceConfigFilterSensitiveLog(obj.inferenceConfig) }),
|
|
351
|
+
});
|
|
352
|
+
export const StopEvaluationJobRequestFilterSensitiveLog = (obj) => ({
|
|
353
|
+
...obj,
|
|
354
|
+
...(obj.jobIdentifier && { jobIdentifier: SENSITIVE_STRING }),
|
|
355
|
+
});
|
|
356
|
+
export const GuardrailTopicConfigFilterSensitiveLog = (obj) => ({
|
|
357
|
+
...obj,
|
|
358
|
+
...(obj.name && { name: SENSITIVE_STRING }),
|
|
359
|
+
...(obj.definition && { definition: SENSITIVE_STRING }),
|
|
360
|
+
...(obj.examples && { examples: SENSITIVE_STRING }),
|
|
361
|
+
});
|
|
362
|
+
export const GuardrailTopicPolicyConfigFilterSensitiveLog = (obj) => ({
|
|
363
|
+
...obj,
|
|
364
|
+
...(obj.topicsConfig && {
|
|
365
|
+
topicsConfig: obj.topicsConfig.map((item) => GuardrailTopicConfigFilterSensitiveLog(item)),
|
|
366
|
+
}),
|
|
367
|
+
});
|
|
368
|
+
export const CreateGuardrailRequestFilterSensitiveLog = (obj) => ({
|
|
369
|
+
...obj,
|
|
370
|
+
...(obj.name && { name: SENSITIVE_STRING }),
|
|
371
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
372
|
+
...(obj.topicPolicyConfig && {
|
|
373
|
+
topicPolicyConfig: GuardrailTopicPolicyConfigFilterSensitiveLog(obj.topicPolicyConfig),
|
|
374
|
+
}),
|
|
375
|
+
...(obj.blockedInputMessaging && { blockedInputMessaging: SENSITIVE_STRING }),
|
|
376
|
+
...(obj.blockedOutputsMessaging && { blockedOutputsMessaging: SENSITIVE_STRING }),
|
|
377
|
+
});
|
|
378
|
+
export const CreateGuardrailVersionRequestFilterSensitiveLog = (obj) => ({
|
|
379
|
+
...obj,
|
|
380
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
381
|
+
});
|
|
382
|
+
export const GuardrailTopicFilterSensitiveLog = (obj) => ({
|
|
383
|
+
...obj,
|
|
384
|
+
...(obj.name && { name: SENSITIVE_STRING }),
|
|
385
|
+
...(obj.definition && { definition: SENSITIVE_STRING }),
|
|
386
|
+
...(obj.examples && { examples: SENSITIVE_STRING }),
|
|
387
|
+
});
|
|
388
|
+
export const GuardrailTopicPolicyFilterSensitiveLog = (obj) => ({
|
|
389
|
+
...obj,
|
|
390
|
+
...(obj.topics && { topics: obj.topics.map((item) => GuardrailTopicFilterSensitiveLog(item)) }),
|
|
391
|
+
});
|
|
392
|
+
export const GetGuardrailResponseFilterSensitiveLog = (obj) => ({
|
|
393
|
+
...obj,
|
|
394
|
+
...(obj.name && { name: SENSITIVE_STRING }),
|
|
395
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
396
|
+
...(obj.topicPolicy && { topicPolicy: GuardrailTopicPolicyFilterSensitiveLog(obj.topicPolicy) }),
|
|
397
|
+
...(obj.statusReasons && { statusReasons: SENSITIVE_STRING }),
|
|
398
|
+
...(obj.failureRecommendations && { failureRecommendations: SENSITIVE_STRING }),
|
|
399
|
+
...(obj.blockedInputMessaging && { blockedInputMessaging: SENSITIVE_STRING }),
|
|
400
|
+
...(obj.blockedOutputsMessaging && { blockedOutputsMessaging: SENSITIVE_STRING }),
|
|
401
|
+
});
|
|
402
|
+
export const GuardrailSummaryFilterSensitiveLog = (obj) => ({
|
|
403
|
+
...obj,
|
|
404
|
+
...(obj.name && { name: SENSITIVE_STRING }),
|
|
405
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
406
|
+
});
|
|
407
|
+
export const ListGuardrailsResponseFilterSensitiveLog = (obj) => ({
|
|
408
|
+
...obj,
|
|
409
|
+
...(obj.guardrails && { guardrails: obj.guardrails.map((item) => GuardrailSummaryFilterSensitiveLog(item)) }),
|
|
410
|
+
});
|
|
411
|
+
export const UpdateGuardrailRequestFilterSensitiveLog = (obj) => ({
|
|
412
|
+
...obj,
|
|
413
|
+
...(obj.name && { name: SENSITIVE_STRING }),
|
|
414
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
415
|
+
...(obj.topicPolicyConfig && {
|
|
416
|
+
topicPolicyConfig: GuardrailTopicPolicyConfigFilterSensitiveLog(obj.topicPolicyConfig),
|
|
417
|
+
}),
|
|
418
|
+
...(obj.blockedInputMessaging && { blockedInputMessaging: SENSITIVE_STRING }),
|
|
419
|
+
...(obj.blockedOutputsMessaging && { blockedOutputsMessaging: SENSITIVE_STRING }),
|
|
420
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { BedrockClient } from "../BedrockClient";
|
|
3
|
+
import { ListEvaluationJobsCommand, } from "../commands/ListEvaluationJobsCommand";
|
|
4
|
+
export const paginateListEvaluationJobs = createPaginator(BedrockClient, ListEvaluationJobsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { BedrockClient } from "../BedrockClient";
|
|
3
|
+
import { ListGuardrailsCommand, } from "../commands/ListGuardrailsCommand";
|
|
4
|
+
export const paginateListGuardrails = createPaginator(BedrockClient, ListGuardrailsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from "./Interfaces";
|
|
2
2
|
export * from "./ListCustomModelsPaginator";
|
|
3
|
+
export * from "./ListEvaluationJobsPaginator";
|
|
4
|
+
export * from "./ListGuardrailsPaginator";
|
|
3
5
|
export * from "./ListModelCustomizationJobsPaginator";
|
|
4
6
|
export * from "./ListProvisionedModelThroughputsPaginator";
|