@@ -184,6 +184,23 @@ export const GuardrailContentFilterConfidence = {
184
184
export type GuardrailContentFilterConfidence =
185
185
( typeof GuardrailContentFilterConfidence ) [ keyof typeof GuardrailContentFilterConfidence ] ;
186
186
187
+ /**
188
+ * @public
189
+ * @enum
190
+ */
191
+ export const GuardrailContentFilterStrength = {
192
+ HIGH : "HIGH" ,
193
+ LOW : "LOW" ,
194
+ MEDIUM : "MEDIUM" ,
195
+ NONE : "NONE" ,
196
+ } as const ;
197
+
198
+ /**
199
+ * @public
200
+ */
201
+ export type GuardrailContentFilterStrength =
202
+ ( typeof GuardrailContentFilterStrength ) [ keyof typeof GuardrailContentFilterStrength ] ;
203
+
187
204
/**
188
205
* @public
189
206
* @enum
@@ -219,6 +236,12 @@ export interface GuardrailContentFilter {
219
236
*/
220
237
confidence : GuardrailContentFilterConfidence | undefined ;
221
238
239
+ /**
240
+ * <p>The filter strength setting for the guardrail content filter.</p>
241
+ * @public
242
+ */
243
+ filterStrength ?: GuardrailContentFilterStrength ;
244
+
222
245
/**
223
246
* <p>The guardrail action.</p>
224
247
* @public
@@ -310,6 +333,102 @@ export interface GuardrailContextualGroundingPolicyAssessment {
310
333
filters ?: GuardrailContextualGroundingFilter [ ] ;
311
334
}
312
335
336
+ /**
337
+ * <p>The guardrail coverage for the text characters.</p>
338
+ * @public
339
+ */
340
+ export interface GuardrailTextCharactersCoverage {
341
+ /**
342
+ * <p>The text characters that were guarded by the guardrail coverage.</p>
343
+ * @public
344
+ */
345
+ guarded ?: number ;
346
+
347
+ /**
348
+ * <p>The total text characters by the guardrail coverage.</p>
349
+ * @public
350
+ */
351
+ total ?: number ;
352
+ }
353
+
354
+ /**
355
+ * <p>The action of the guardrail coverage details.</p>
356
+ * @public
357
+ */
358
+ export interface GuardrailCoverage {
359
+ /**
360
+ * <p>The text characters of the guardrail coverage details.</p>
361
+ * @public
362
+ */
363
+ textCharacters ?: GuardrailTextCharactersCoverage ;
364
+ }
365
+
366
+ /**
367
+ * <p>The details on the use of the guardrail.</p>
368
+ * @public
369
+ */
370
+ export interface GuardrailUsage {
371
+ /**
372
+ * <p>The topic policy units processed by the guardrail.</p>
373
+ * @public
374
+ */
375
+ topicPolicyUnits : number | undefined ;
376
+
377
+ /**
378
+ * <p>The content policy units processed by the guardrail.</p>
379
+ * @public
380
+ */
381
+ contentPolicyUnits : number | undefined ;
382
+
383
+ /**
384
+ * <p>The word policy units processed by the guardrail.</p>
385
+ * @public
386
+ */
387
+ wordPolicyUnits : number | undefined ;
388
+
389
+ /**
390
+ * <p>The sensitive information policy units processed by the guardrail.</p>
391
+ * @public
392
+ */
393
+ sensitiveInformationPolicyUnits : number | undefined ;
394
+
395
+ /**
396
+ * <p>The sensitive information policy free units processed by the guardrail.</p>
397
+ * @public
398
+ */
399
+ sensitiveInformationPolicyFreeUnits : number | undefined ;
400
+
401
+ /**
402
+ * <p>The contextual grounding policy units processed by the guardrail.</p>
403
+ * @public
404
+ */
405
+ contextualGroundingPolicyUnits : number | undefined ;
406
+ }
407
+
408
+ /**
409
+ * <p>The invocation metrics for the guardrail.</p>
410
+ * @public
411
+ */
412
+ export interface GuardrailInvocationMetrics {
413
+ /**
414
+ * <p>The processing latency details for the guardrail invocation metrics.</p>
415
+ * @public
416
+ */
417
+ guardrailProcessingLatency ?: number ;
418
+
419
+ /**
420
+ * <p>The usage details for the guardrail invocation metrics.</p>
421
+ * @public
422
+ */
423
+ usage ?: GuardrailUsage ;
424
+
425
+ /**
426
+ * <p>The coverage details for the guardrail invocation metrics.</p>
427
+ * @public
428
+ */
429
+ guardrailCoverage ?: GuardrailCoverage ;
430
+ }
431
+
313
432
/**
314
433
* @public
315
434
* @enum
@@ -622,60 +741,24 @@ export interface GuardrailAssessment {
622
741
* @public
623
742
*/
624
743
contextualGroundingPolicy ?: GuardrailContextualGroundingPolicyAssessment ;
625
- }
626
744
627
- /**
628
- * <p>The output content produced by the guardrail.</p>
629
- * @public
630
- */
631
- export interface GuardrailOutputContent {
632
745
/**
633
- * <p>The specific text for the output content produced by the guardrail.</p>
746
+ * <p>The invocation metrics for the guardrail assessment .</p>
634
747
* @public
635
748
*/
636
- text ?: string ;
749
+ invocationMetrics ?: GuardrailInvocationMetrics ;
637
750
}
638
751
639
752
/**
640
- * <p>The details on the use of the guardrail.</p>
753
+ * <p>The output content produced by the guardrail.</p>
641
754
* @public
642
755
*/
643
- export interface GuardrailUsage {
644
- /**
645
- * <p>The topic policy units processed by the guardrail.</p>
646
- * @public
647
- */
648
- topicPolicyUnits : number | undefined ;
649
-
650
- /**
651
- * <p>The content policy units processed by the guardrail.</p>
652
- * @public
653
- */
654
- contentPolicyUnits : number | undefined ;
655
-
656
- /**
657
- * <p>The word policy units processed by the guardrail.</p>
658
- * @public
659
- */
660
- wordPolicyUnits : number | undefined ;
661
-
662
- /**
663
- * <p>The sensitive information policy units processed by the guardrail.</p>
664
- * @public
665
- */
666
- sensitiveInformationPolicyUnits : number | undefined ;
667
-
668
- /**
669
- * <p>The sensitive information policy free units processed by the guardrail.</p>
670
- * @public
671
- */
672
- sensitiveInformationPolicyFreeUnits : number | undefined ;
673
-
756
+ export interface GuardrailOutputContent {
674
757
/**
675
- * <p>The contextual grounding policy units processed by the guardrail.</p>
758
+ * <p>The specific text for the output content produced by the guardrail.</p>
676
759
* @public
677
760
*/
678
- contextualGroundingPolicyUnits : number | undefined ;
761
+ text ?: string ;
679
762
}
680
763
681
764
/**
@@ -705,6 +788,12 @@ export interface ApplyGuardrailResponse {
705
788
* @public
706
789
*/
707
790
assessments : GuardrailAssessment [ ] | undefined ;
791
+
792
+ /**
793
+ * <p>The guardrail coverage details in the apply guardrail response.</p>
794
+ * @public
795
+ */
796
+ guardrailCoverage ?: GuardrailCoverage ;
708
797
}
709
798
710
799
/**
0 commit comments