@cdklabs/generative-ai-cdk-constructs
@cdklabs/generative-ai-cdk-constructs / bedrock / CustomTopicProps
Interface for creating a custom Topic
readonlydefinition:string
Provide a clear definition to detect and block user inputs and FM responses that fall into this topic. Avoid starting with “don’t”.
`Investment advice refers to inquiries, guidance, or recommendations
regarding the management or allocation of funds or assets with the goal of
generating returns or achieving specific financial objectives.`
readonlyexamples:string[]
Representative phrases that refer to the topic. These phrases can represent a user input or a model response. Add up to 5 phrases, up to 100 characters each.
"Where should I invest my money?"
readonlyoptionalinputAction:GuardrailAction
The action to take when a topic is detected in the input.
readonlyoptionalinputEnabled:boolean
Whether the topic filter is enabled for input.
readonlyname:string
The name of the topic to deny.
readonlyoptionaloutputAction:GuardrailAction
The action to take when a topic is detected in the output.
readonlyoptionaloutputEnabled:boolean
Whether the topic filter is enabled for output.