@aws-sdk/client-bedrock-runtime 3.596.0 → 3.600.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 CHANGED
@@ -35,6 +35,18 @@ __export(src_exports, {
35
35
  ConverseStreamOutput: () => ConverseStreamOutput,
36
36
  ConverseStreamOutputFilterSensitiveLog: () => ConverseStreamOutputFilterSensitiveLog,
37
37
  ConverseStreamResponseFilterSensitiveLog: () => ConverseStreamResponseFilterSensitiveLog,
38
+ GuardrailContentFilterConfidence: () => GuardrailContentFilterConfidence,
39
+ GuardrailContentFilterType: () => GuardrailContentFilterType,
40
+ GuardrailContentPolicyAction: () => GuardrailContentPolicyAction,
41
+ GuardrailConverseContentBlock: () => GuardrailConverseContentBlock,
42
+ GuardrailManagedWordType: () => GuardrailManagedWordType,
43
+ GuardrailPiiEntityType: () => GuardrailPiiEntityType,
44
+ GuardrailSensitiveInformationPolicyAction: () => GuardrailSensitiveInformationPolicyAction,
45
+ GuardrailStreamProcessingMode: () => GuardrailStreamProcessingMode,
46
+ GuardrailTopicPolicyAction: () => GuardrailTopicPolicyAction,
47
+ GuardrailTopicType: () => GuardrailTopicType,
48
+ GuardrailTrace: () => GuardrailTrace,
49
+ GuardrailWordPolicyAction: () => GuardrailWordPolicyAction,
38
50
  ImageFormat: () => ImageFormat,
39
51
  ImageSource: () => ImageSource,
40
52
  InternalServerException: () => InternalServerException,
@@ -258,6 +270,18 @@ var _AccessDeniedException = class _AccessDeniedException extends BedrockRuntime
258
270
  };
259
271
  __name(_AccessDeniedException, "AccessDeniedException");
260
272
  var AccessDeniedException = _AccessDeniedException;
273
+ var GuardrailTrace = {
274
+ DISABLED: "disabled",
275
+ ENABLED: "enabled"
276
+ };
277
+ var GuardrailConverseContentBlock;
278
+ ((GuardrailConverseContentBlock3) => {
279
+ GuardrailConverseContentBlock3.visit = /* @__PURE__ */ __name((value, visitor) => {
280
+ if (value.text !== void 0)
281
+ return visitor.text(value.text);
282
+ return visitor._(value.$unknown[0], value.$unknown[1]);
283
+ }, "visit");
284
+ })(GuardrailConverseContentBlock || (GuardrailConverseContentBlock = {}));
261
285
  var ImageFormat = {
262
286
  GIF: "gif",
263
287
  JPEG: "jpeg",
@@ -299,6 +323,8 @@ var ContentBlock;
299
323
  return visitor.toolUse(value.toolUse);
300
324
  if (value.toolResult !== void 0)
301
325
  return visitor.toolResult(value.toolResult);
326
+ if (value.guardContent !== void 0)
327
+ return visitor.guardContent(value.guardContent);
302
328
  return visitor._(value.$unknown[0], value.$unknown[1]);
303
329
  }, "visit");
304
330
  })(ContentBlock || (ContentBlock = {}));
@@ -311,6 +337,8 @@ var SystemContentBlock;
311
337
  SystemContentBlock3.visit = /* @__PURE__ */ __name((value, visitor) => {
312
338
  if (value.text !== void 0)
313
339
  return visitor.text(value.text);
340
+ if (value.guardContent !== void 0)
341
+ return visitor.guardContent(value.guardContent);
314
342
  return visitor._(value.$unknown[0], value.$unknown[1]);
315
343
  }, "visit");
316
344
  })(SystemContentBlock || (SystemContentBlock = {}));
@@ -353,10 +381,77 @@ var ConverseOutput;
353
381
  var StopReason = {
354
382
  CONTENT_FILTERED: "content_filtered",
355
383
  END_TURN: "end_turn",
384
+ GUARDRAIL_INTERVENED: "guardrail_intervened",
356
385
  MAX_TOKENS: "max_tokens",
357
386
  STOP_SEQUENCE: "stop_sequence",
358
387
  TOOL_USE: "tool_use"
359
388
  };
389
+ var GuardrailContentPolicyAction = {
390
+ BLOCKED: "BLOCKED"
391
+ };
392
+ var GuardrailContentFilterConfidence = {
393
+ HIGH: "HIGH",
394
+ LOW: "LOW",
395
+ MEDIUM: "MEDIUM",
396
+ NONE: "NONE"
397
+ };
398
+ var GuardrailContentFilterType = {
399
+ HATE: "HATE",
400
+ INSULTS: "INSULTS",
401
+ MISCONDUCT: "MISCONDUCT",
402
+ PROMPT_ATTACK: "PROMPT_ATTACK",
403
+ SEXUAL: "SEXUAL",
404
+ VIOLENCE: "VIOLENCE"
405
+ };
406
+ var GuardrailSensitiveInformationPolicyAction = {
407
+ ANONYMIZED: "ANONYMIZED",
408
+ BLOCKED: "BLOCKED"
409
+ };
410
+ var GuardrailPiiEntityType = {
411
+ ADDRESS: "ADDRESS",
412
+ AGE: "AGE",
413
+ AWS_ACCESS_KEY: "AWS_ACCESS_KEY",
414
+ AWS_SECRET_KEY: "AWS_SECRET_KEY",
415
+ CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER",
416
+ CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER",
417
+ CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV",
418
+ CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY",
419
+ CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER",
420
+ DRIVER_ID: "DRIVER_ID",
421
+ EMAIL: "EMAIL",
422
+ INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER",
423
+ IP_ADDRESS: "IP_ADDRESS",
424
+ LICENSE_PLATE: "LICENSE_PLATE",
425
+ MAC_ADDRESS: "MAC_ADDRESS",
426
+ NAME: "NAME",
427
+ PASSWORD: "PASSWORD",
428
+ PHONE: "PHONE",
429
+ PIN: "PIN",
430
+ SWIFT_CODE: "SWIFT_CODE",
431
+ UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER",
432
+ UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER",
433
+ UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",
434
+ URL: "URL",
435
+ USERNAME: "USERNAME",
436
+ US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER",
437
+ US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER",
438
+ US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",
439
+ US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER",
440
+ US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER",
441
+ VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER"
442
+ };
443
+ var GuardrailTopicPolicyAction = {
444
+ BLOCKED: "BLOCKED"
445
+ };
446
+ var GuardrailTopicType = {
447
+ DENY: "DENY"
448
+ };
449
+ var GuardrailWordPolicyAction = {
450
+ BLOCKED: "BLOCKED"
451
+ };
452
+ var GuardrailManagedWordType = {
453
+ PROFANITY: "PROFANITY"
454
+ };
360
455
  var _InternalServerException = class _InternalServerException extends BedrockRuntimeServiceException {
361
456
  /**
362
457
  * @internal
@@ -478,6 +573,10 @@ var _ValidationException = class _ValidationException extends BedrockRuntimeServ
478
573
  };
479
574
  __name(_ValidationException, "ValidationException");
480
575
  var ValidationException = _ValidationException;
576
+ var GuardrailStreamProcessingMode = {
577
+ ASYNC: "async",
578
+ SYNC: "sync"
579
+ };
481
580
  var ContentBlockDelta;
482
581
  ((ContentBlockDelta2) => {
483
582
  ContentBlockDelta2.visit = /* @__PURE__ */ __name((value, visitor) => {
@@ -658,6 +757,7 @@ var se_ConverseCommand = /* @__PURE__ */ __name(async (input, context) => {
658
757
  (0, import_smithy_client.take)(input, {
659
758
  additionalModelRequestFields: (_) => se_Document(_, context),
660
759
  additionalModelResponseFieldPaths: (_) => (0, import_smithy_client._json)(_),
760
+ guardrailConfig: (_) => (0, import_smithy_client._json)(_),
661
761
  inferenceConfig: (_) => se_InferenceConfiguration(_, context),
662
762
  messages: (_) => se_Messages(_, context),
663
763
  system: (_) => (0, import_smithy_client._json)(_),
@@ -679,6 +779,7 @@ var se_ConverseStreamCommand = /* @__PURE__ */ __name(async (input, context) =>
679
779
  (0, import_smithy_client.take)(input, {
680
780
  additionalModelRequestFields: (_) => se_Document(_, context),
681
781
  additionalModelResponseFieldPaths: (_) => (0, import_smithy_client._json)(_),
782
+ guardrailConfig: (_) => (0, import_smithy_client._json)(_),
682
783
  inferenceConfig: (_) => se_InferenceConfiguration(_, context),
683
784
  messages: (_) => se_Messages(_, context),
684
785
  system: (_) => (0, import_smithy_client._json)(_),
@@ -737,6 +838,7 @@ var de_ConverseCommand = /* @__PURE__ */ __name(async (output, context) => {
737
838
  metrics: import_smithy_client._json,
738
839
  output: (_) => de_ConverseOutput((0, import_core2.awsExpectUnion)(_), context),
739
840
  stopReason: import_smithy_client.expectString,
841
+ trace: import_smithy_client._json,
740
842
  usage: import_smithy_client._json
741
843
  });
742
844
  Object.assign(contents, doc);
@@ -1133,6 +1235,7 @@ var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context
1133
1235
  }, "de_ValidationException_event");
1134
1236
  var se_ContentBlock = /* @__PURE__ */ __name((input, context) => {
1135
1237
  return ContentBlock.visit(input, {
1238
+ guardContent: (value) => ({ guardContent: (0, import_smithy_client._json)(value) }),
1136
1239
  image: (value) => ({ image: se_ImageBlock(value, context) }),
1137
1240
  text: (value) => ({ text: value }),
1138
1241
  toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context) }),
@@ -1237,6 +1340,11 @@ var se_Document = /* @__PURE__ */ __name((input, context) => {
1237
1340
  return input;
1238
1341
  }, "se_Document");
1239
1342
  var de_ContentBlock = /* @__PURE__ */ __name((output, context) => {
1343
+ if (output.guardContent != null) {
1344
+ return {
1345
+ guardContent: (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(output.guardContent))
1346
+ };
1347
+ }
1240
1348
  if (output.image != null) {
1241
1349
  return {
1242
1350
  image: de_ImageBlock(output.image, context)
@@ -1460,6 +1568,8 @@ var BedrockRuntime = _BedrockRuntime;
1460
1568
  InvokeModelCommand,
1461
1569
  InvokeModelWithResponseStreamCommand,
1462
1570
  AccessDeniedException,
1571
+ GuardrailTrace,
1572
+ GuardrailConverseContentBlock,
1463
1573
  ImageFormat,
1464
1574
  ImageSource,
1465
1575
  ToolResultContentBlock,
@@ -1472,6 +1582,15 @@ var BedrockRuntime = _BedrockRuntime;
1472
1582
  Tool,
1473
1583
  ConverseOutput,
1474
1584
  StopReason,
1585
+ GuardrailContentPolicyAction,
1586
+ GuardrailContentFilterConfidence,
1587
+ GuardrailContentFilterType,
1588
+ GuardrailSensitiveInformationPolicyAction,
1589
+ GuardrailPiiEntityType,
1590
+ GuardrailTopicPolicyAction,
1591
+ GuardrailTopicType,
1592
+ GuardrailWordPolicyAction,
1593
+ GuardrailManagedWordType,
1475
1594
  InternalServerException,
1476
1595
  ModelErrorException,
1477
1596
  ModelNotReadyException,
@@ -1479,6 +1598,7 @@ var BedrockRuntime = _BedrockRuntime;
1479
1598
  ResourceNotFoundException,
1480
1599
  ThrottlingException,
1481
1600
  ValidationException,
1601
+ GuardrailStreamProcessingMode,
1482
1602
  ContentBlockDelta,
1483
1603
  ContentBlockStart,
1484
1604
  ModelStreamErrorException,
@@ -12,6 +12,18 @@ export class AccessDeniedException extends __BaseException {
12
12
  Object.setPrototypeOf(this, AccessDeniedException.prototype);
13
13
  }
14
14
  }
15
+ export const GuardrailTrace = {
16
+ DISABLED: "disabled",
17
+ ENABLED: "enabled",
18
+ };
19
+ export var GuardrailConverseContentBlock;
20
+ (function (GuardrailConverseContentBlock) {
21
+ GuardrailConverseContentBlock.visit = (value, visitor) => {
22
+ if (value.text !== undefined)
23
+ return visitor.text(value.text);
24
+ return visitor._(value.$unknown[0], value.$unknown[1]);
25
+ };
26
+ })(GuardrailConverseContentBlock || (GuardrailConverseContentBlock = {}));
15
27
  export const ImageFormat = {
16
28
  GIF: "gif",
17
29
  JPEG: "jpeg",
@@ -53,6 +65,8 @@ export var ContentBlock;
53
65
  return visitor.toolUse(value.toolUse);
54
66
  if (value.toolResult !== undefined)
55
67
  return visitor.toolResult(value.toolResult);
68
+ if (value.guardContent !== undefined)
69
+ return visitor.guardContent(value.guardContent);
56
70
  return visitor._(value.$unknown[0], value.$unknown[1]);
57
71
  };
58
72
  })(ContentBlock || (ContentBlock = {}));
@@ -65,6 +79,8 @@ export var SystemContentBlock;
65
79
  SystemContentBlock.visit = (value, visitor) => {
66
80
  if (value.text !== undefined)
67
81
  return visitor.text(value.text);
82
+ if (value.guardContent !== undefined)
83
+ return visitor.guardContent(value.guardContent);
68
84
  return visitor._(value.$unknown[0], value.$unknown[1]);
69
85
  };
70
86
  })(SystemContentBlock || (SystemContentBlock = {}));
@@ -107,10 +123,77 @@ export var ConverseOutput;
107
123
  export const StopReason = {
108
124
  CONTENT_FILTERED: "content_filtered",
109
125
  END_TURN: "end_turn",
126
+ GUARDRAIL_INTERVENED: "guardrail_intervened",
110
127
  MAX_TOKENS: "max_tokens",
111
128
  STOP_SEQUENCE: "stop_sequence",
112
129
  TOOL_USE: "tool_use",
113
130
  };
131
+ export const GuardrailContentPolicyAction = {
132
+ BLOCKED: "BLOCKED",
133
+ };
134
+ export const GuardrailContentFilterConfidence = {
135
+ HIGH: "HIGH",
136
+ LOW: "LOW",
137
+ MEDIUM: "MEDIUM",
138
+ NONE: "NONE",
139
+ };
140
+ export const GuardrailContentFilterType = {
141
+ HATE: "HATE",
142
+ INSULTS: "INSULTS",
143
+ MISCONDUCT: "MISCONDUCT",
144
+ PROMPT_ATTACK: "PROMPT_ATTACK",
145
+ SEXUAL: "SEXUAL",
146
+ VIOLENCE: "VIOLENCE",
147
+ };
148
+ export const GuardrailSensitiveInformationPolicyAction = {
149
+ ANONYMIZED: "ANONYMIZED",
150
+ BLOCKED: "BLOCKED",
151
+ };
152
+ export const GuardrailPiiEntityType = {
153
+ ADDRESS: "ADDRESS",
154
+ AGE: "AGE",
155
+ AWS_ACCESS_KEY: "AWS_ACCESS_KEY",
156
+ AWS_SECRET_KEY: "AWS_SECRET_KEY",
157
+ CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER",
158
+ CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER",
159
+ CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV",
160
+ CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY",
161
+ CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER",
162
+ DRIVER_ID: "DRIVER_ID",
163
+ EMAIL: "EMAIL",
164
+ INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER",
165
+ IP_ADDRESS: "IP_ADDRESS",
166
+ LICENSE_PLATE: "LICENSE_PLATE",
167
+ MAC_ADDRESS: "MAC_ADDRESS",
168
+ NAME: "NAME",
169
+ PASSWORD: "PASSWORD",
170
+ PHONE: "PHONE",
171
+ PIN: "PIN",
172
+ SWIFT_CODE: "SWIFT_CODE",
173
+ UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER",
174
+ UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER",
175
+ UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",
176
+ URL: "URL",
177
+ USERNAME: "USERNAME",
178
+ US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER",
179
+ US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER",
180
+ US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",
181
+ US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER",
182
+ US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER",
183
+ VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER",
184
+ };
185
+ export const GuardrailTopicPolicyAction = {
186
+ BLOCKED: "BLOCKED",
187
+ };
188
+ export const GuardrailTopicType = {
189
+ DENY: "DENY",
190
+ };
191
+ export const GuardrailWordPolicyAction = {
192
+ BLOCKED: "BLOCKED",
193
+ };
194
+ export const GuardrailManagedWordType = {
195
+ PROFANITY: "PROFANITY",
196
+ };
114
197
  export class InternalServerException extends __BaseException {
115
198
  constructor(opts) {
116
199
  super({
@@ -197,6 +280,10 @@ export class ValidationException extends __BaseException {
197
280
  Object.setPrototypeOf(this, ValidationException.prototype);
198
281
  }
199
282
  }
283
+ export const GuardrailStreamProcessingMode = {
284
+ ASYNC: "async",
285
+ SYNC: "sync",
286
+ };
200
287
  export var ContentBlockDelta;
201
288
  (function (ContentBlockDelta) {
202
289
  ContentBlockDelta.visit = (value, visitor) => {
@@ -14,6 +14,7 @@ export const se_ConverseCommand = async (input, context) => {
14
14
  body = JSON.stringify(take(input, {
15
15
  additionalModelRequestFields: (_) => se_Document(_, context),
16
16
  additionalModelResponseFieldPaths: (_) => _json(_),
17
+ guardrailConfig: (_) => _json(_),
17
18
  inferenceConfig: (_) => se_InferenceConfiguration(_, context),
18
19
  messages: (_) => se_Messages(_, context),
19
20
  system: (_) => _json(_),
@@ -33,6 +34,7 @@ export const se_ConverseStreamCommand = async (input, context) => {
33
34
  body = JSON.stringify(take(input, {
34
35
  additionalModelRequestFields: (_) => se_Document(_, context),
35
36
  additionalModelResponseFieldPaths: (_) => _json(_),
37
+ guardrailConfig: (_) => _json(_),
36
38
  inferenceConfig: (_) => se_InferenceConfiguration(_, context),
37
39
  messages: (_) => se_Messages(_, context),
38
40
  system: (_) => _json(_),
@@ -90,6 +92,7 @@ export const de_ConverseCommand = async (output, context) => {
90
92
  metrics: _json,
91
93
  output: (_) => de_ConverseOutput(__expectUnion(_), context),
92
94
  stopReason: __expectString,
95
+ trace: _json,
93
96
  usage: _json,
94
97
  });
95
98
  Object.assign(contents, doc);
@@ -480,6 +483,7 @@ const de_ValidationException_event = async (output, context) => {
480
483
  };
481
484
  const se_ContentBlock = (input, context) => {
482
485
  return ContentBlock.visit(input, {
486
+ guardContent: (value) => ({ guardContent: _json(value) }),
483
487
  image: (value) => ({ image: se_ImageBlock(value, context) }),
484
488
  text: (value) => ({ text: value }),
485
489
  toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context) }),
@@ -592,6 +596,11 @@ const se_Document = (input, context) => {
592
596
  return input;
593
597
  };
594
598
  const de_ContentBlock = (output, context) => {
599
+ if (output.guardContent != null) {
600
+ return {
601
+ guardContent: _json(__expectUnion(output.guardContent)),
602
+ };
603
+ }
595
604
  if (output.image != null) {
596
605
  return {
597
606
  image: de_ImageBlock(output.image, context),
@@ -31,7 +31,13 @@ declare const ConverseCommand_base: {
31
31
  * a consistent interface that works with all models that
32
32
  * support messages. This allows you to write code once and use it with different models.
33
33
  * Should a model have unique inference parameters, you can also pass those unique parameters
34
- * to the model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html">Run inference</a> in the Bedrock User Guide.</p>
34
+ * to the model.</p>
35
+ * <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
36
+ * To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
37
+ * To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i>
38
+ * </p>
39
+ * <p>For example code, see <i>Converse API examples</i> in the <i>Amazon Bedrock User Guide</i>.
40
+ * </p>
35
41
  * <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action. </p>
36
42
  * @example
37
43
  * Use a bare-bones client and the command you need to make an API call.
@@ -74,6 +80,11 @@ declare const ConverseCommand_base: {
74
80
  * ],
75
81
  * status: "success" || "error",
76
82
  * },
83
+ * guardContent: { // GuardrailConverseContentBlock Union: only one key present
84
+ * text: { // GuardrailConverseTextBlock
85
+ * text: "STRING_VALUE", // required
86
+ * },
87
+ * },
77
88
  * },
78
89
  * ],
79
90
  * },
@@ -81,6 +92,11 @@ declare const ConverseCommand_base: {
81
92
  * system: [ // SystemContentBlocks
82
93
  * { // SystemContentBlock Union: only one key present
83
94
  * text: "STRING_VALUE",
95
+ * guardContent: {// Union: only one key present
96
+ * text: {
97
+ * text: "STRING_VALUE", // required
98
+ * },
99
+ * },
84
100
  * },
85
101
  * ],
86
102
  * inferenceConfig: { // InferenceConfiguration
@@ -111,6 +127,11 @@ declare const ConverseCommand_base: {
111
127
  * },
112
128
  * },
113
129
  * },
130
+ * guardrailConfig: { // GuardrailConfiguration
131
+ * guardrailIdentifier: "STRING_VALUE", // required
132
+ * guardrailVersion: "STRING_VALUE", // required
133
+ * trace: "enabled" || "disabled",
134
+ * },
114
135
  * additionalModelRequestFields: "DOCUMENT_VALUE",
115
136
  * additionalModelResponseFieldPaths: [ // AdditionalModelResponseFieldPaths
116
137
  * "STRING_VALUE",
@@ -152,11 +173,16 @@ declare const ConverseCommand_base: {
152
173
  * // ],
153
174
  * // status: "success" || "error",
154
175
  * // },
176
+ * // guardContent: { // GuardrailConverseContentBlock Union: only one key present
177
+ * // text: { // GuardrailConverseTextBlock
178
+ * // text: "STRING_VALUE", // required
179
+ * // },
180
+ * // },
155
181
  * // },
156
182
  * // ],
157
183
  * // },
158
184
  * // },
159
- * // stopReason: "end_turn" || "tool_use" || "max_tokens" || "stop_sequence" || "content_filtered", // required
185
+ * // stopReason: "end_turn" || "tool_use" || "max_tokens" || "stop_sequence" || "guardrail_intervened" || "content_filtered", // required
160
186
  * // usage: { // TokenUsage
161
187
  * // inputTokens: Number("int"), // required
162
188
  * // outputTokens: Number("int"), // required
@@ -166,6 +192,123 @@ declare const ConverseCommand_base: {
166
192
  * // latencyMs: Number("long"), // required
167
193
  * // },
168
194
  * // additionalModelResponseFields: "DOCUMENT_VALUE",
195
+ * // trace: { // ConverseTrace
196
+ * // guardrail: { // GuardrailTraceAssessment
197
+ * // modelOutput: [ // ModelOutputs
198
+ * // "STRING_VALUE",
199
+ * // ],
200
+ * // inputAssessment: { // GuardrailAssessmentMap
201
+ * // "<keys>": { // GuardrailAssessment
202
+ * // topicPolicy: { // GuardrailTopicPolicyAssessment
203
+ * // topics: [ // GuardrailTopicList // required
204
+ * // { // GuardrailTopic
205
+ * // name: "STRING_VALUE", // required
206
+ * // type: "DENY", // required
207
+ * // action: "BLOCKED", // required
208
+ * // },
209
+ * // ],
210
+ * // },
211
+ * // contentPolicy: { // GuardrailContentPolicyAssessment
212
+ * // filters: [ // GuardrailContentFilterList // required
213
+ * // { // GuardrailContentFilter
214
+ * // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK", // required
215
+ * // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH", // required
216
+ * // action: "BLOCKED", // required
217
+ * // },
218
+ * // ],
219
+ * // },
220
+ * // wordPolicy: { // GuardrailWordPolicyAssessment
221
+ * // customWords: [ // GuardrailCustomWordList // required
222
+ * // { // GuardrailCustomWord
223
+ * // match: "STRING_VALUE", // required
224
+ * // action: "BLOCKED", // required
225
+ * // },
226
+ * // ],
227
+ * // managedWordLists: [ // GuardrailManagedWordList // required
228
+ * // { // GuardrailManagedWord
229
+ * // match: "STRING_VALUE", // required
230
+ * // type: "PROFANITY", // required
231
+ * // action: "BLOCKED", // required
232
+ * // },
233
+ * // ],
234
+ * // },
235
+ * // sensitiveInformationPolicy: { // GuardrailSensitiveInformationPolicyAssessment
236
+ * // piiEntities: [ // GuardrailPiiEntityFilterList // required
237
+ * // { // GuardrailPiiEntityFilter
238
+ * // match: "STRING_VALUE", // required
239
+ * // 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", // required
240
+ * // action: "ANONYMIZED" || "BLOCKED", // required
241
+ * // },
242
+ * // ],
243
+ * // regexes: [ // GuardrailRegexFilterList // required
244
+ * // { // GuardrailRegexFilter
245
+ * // name: "STRING_VALUE",
246
+ * // match: "STRING_VALUE",
247
+ * // regex: "STRING_VALUE",
248
+ * // action: "ANONYMIZED" || "BLOCKED", // required
249
+ * // },
250
+ * // ],
251
+ * // },
252
+ * // },
253
+ * // },
254
+ * // outputAssessments: { // GuardrailAssessmentListMap
255
+ * // "<keys>": [ // GuardrailAssessmentList
256
+ * // {
257
+ * // topicPolicy: {
258
+ * // topics: [ // required
259
+ * // {
260
+ * // name: "STRING_VALUE", // required
261
+ * // type: "DENY", // required
262
+ * // action: "BLOCKED", // required
263
+ * // },
264
+ * // ],
265
+ * // },
266
+ * // contentPolicy: {
267
+ * // filters: [ // required
268
+ * // {
269
+ * // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK", // required
270
+ * // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH", // required
271
+ * // action: "BLOCKED", // required
272
+ * // },
273
+ * // ],
274
+ * // },
275
+ * // wordPolicy: {
276
+ * // customWords: [ // required
277
+ * // {
278
+ * // match: "STRING_VALUE", // required
279
+ * // action: "BLOCKED", // required
280
+ * // },
281
+ * // ],
282
+ * // managedWordLists: [ // required
283
+ * // {
284
+ * // match: "STRING_VALUE", // required
285
+ * // type: "PROFANITY", // required
286
+ * // action: "BLOCKED", // required
287
+ * // },
288
+ * // ],
289
+ * // },
290
+ * // sensitiveInformationPolicy: {
291
+ * // piiEntities: [ // required
292
+ * // {
293
+ * // match: "STRING_VALUE", // required
294
+ * // 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", // required
295
+ * // action: "ANONYMIZED" || "BLOCKED", // required
296
+ * // },
297
+ * // ],
298
+ * // regexes: [ // required
299
+ * // {
300
+ * // name: "STRING_VALUE",
301
+ * // match: "STRING_VALUE",
302
+ * // regex: "STRING_VALUE",
303
+ * // action: "ANONYMIZED" || "BLOCKED", // required
304
+ * // },
305
+ * // ],
306
+ * // },
307
+ * // },
308
+ * // ],
309
+ * // },
310
+ * // },
311
+ * // },
169
312
  * // };
170
313
  *
171
314
  * ```