enum ModalityType
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Bedrock.Alpha.ModalityType |
![]() | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#ModalityType |
![]() | software.amazon.awscdk.services.bedrock.alpha.ModalityType |
![]() | aws_cdk.aws_bedrock_alpha.ModalityType |
![]() | @aws-cdk/aws-bedrock-alpha » ModalityType |
The type of modality that can be used in content filters.
Example
const guardrail = new bedrock.Guardrail(this, 'bedrockGuardrails', {
guardrailName: 'my-BedrockGuardrails',
// Configure tier for content filters (optional)
contentFiltersTierConfig: bedrock.TierConfig.STANDARD,
});
guardrail.addContentFilter({
type: bedrock.ContentFilterType.SEXUAL,
inputStrength: bedrock.ContentFilterStrength.HIGH,
outputStrength: bedrock.ContentFilterStrength.MEDIUM,
// props below are optional
inputAction: bedrock.GuardrailAction.BLOCK,
inputEnabled: true,
outputAction: bedrock.GuardrailAction.NONE,
outputEnabled: true,
inputModalities: [bedrock.ModalityType.TEXT, bedrock.ModalityType.IMAGE],
outputModalities: [bedrock.ModalityType.TEXT],
});
Members
Name | Description |
---|---|
TEXT | Text modality for content filters. |
IMAGE | Image modality for content filters. |
TEXT
Text modality for content filters.
IMAGE
Image modality for content filters.