generative-ai-cdk-constructs

@cdklabs/generative-ai-cdk-constructs


@cdklabs/generative-ai-cdk-constructs / bedrock / ContentFilter

Interface: ContentFilter

Interface to declare a content filter.

Properties

inputAction?

readonly optional inputAction: GuardrailAction

The action to take when content is detected in the input.


inputEnabled?

readonly optional inputEnabled: boolean

Whether the content filter is enabled for input.


inputModalities?

readonly optional inputModalities: ModalityType[]

The input modalities to apply the content filter to.

Default

undefined - Applies to text modality

inputStrength

readonly inputStrength: ContentFilterStrength

The strength of the content filter to apply to prompts / user input.


outputAction?

readonly optional outputAction: GuardrailAction

The action to take when content is detected in the output.


outputEnabled?

readonly optional outputEnabled: boolean

Whether the content filter is enabled for output.


outputModalities?

readonly optional outputModalities: ModalityType[]

The output modalities to apply the content filter to.

Default

undefined - Applies to text modality

outputStrength

readonly outputStrength: ContentFilterStrength

The strength of the content filter to apply to model responses.


type

readonly type: ContentFilterType

The type of harmful category that the content filter is applied to