GuardrailContentFilter class
Constructors
-
GuardrailContentFilter({Input<
List< ? bannedContents, Input<String> ?>List< ? bannedContentsInAgentResponses, Input<String> ?>List< ? bannedContentsInUserInputs, Input<String> ?>bool?> ? disregardDiacritics, required Input<String> matchType}) -
Creates a new GuardrailContentFilter.
bannedContentsList of banned phrases. Applies to both user inputs and agent responses.bannedContentsInAgentResponsesList of banned phrases. Applies only to agent responses.bannedContentsInUserInputsList of banned phrases. Applies only to user inputs.disregardDiacriticsIf true, diacritics are ignored during matching.matchTypeMatch type for the content filter.const -
GuardrailContentFilter.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
bannedContents
→ Input<
List< ?String> ?> -
List of banned phrases. Applies to both user inputs and agent responses.
final
-
bannedContentsInAgentResponses
→ Input<
List< ?String> ?> -
List of banned phrases. Applies only to agent responses.
final
-
bannedContentsInUserInputs
→ Input<
List< ?String> ?> -
List of banned phrases. Applies only to user inputs.
final
-
disregardDiacritics
→ Input<
bool?> ? -
If true, diacritics are ignored during matching.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
matchType
→ Input<
String> -
Match type for the content filter.
Possible values:
SIMPLE_STRING_MATCH
WORD_BOUNDARY_STRING_MATCH
REGEXP_MATCH
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited