Class: Google::Apis::CesV1::GuardrailContentFilter
- Inherits:
-
Object
- Object
- Google::Apis::CesV1::GuardrailContentFilter
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/ces_v1/classes.rb,
lib/google/apis/ces_v1/representations.rb,
lib/google/apis/ces_v1/representations.rb
Overview
Guardrail that bans certain content from being used in the conversation.
Instance Attribute Summary collapse
-
#banned_contents ⇒ Array<String>
Optional.
-
#banned_contents_in_agent_response ⇒ Array<String>
Optional.
-
#banned_contents_in_user_input ⇒ Array<String>
Optional.
-
#disregard_diacritics ⇒ Boolean
(also: #disregard_diacritics?)
Optional.
-
#match_type ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GuardrailContentFilter
constructor
A new instance of GuardrailContentFilter.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GuardrailContentFilter
Returns a new instance of GuardrailContentFilter.
3797 3798 3799 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3797 def initialize(**args) update!(**args) end |
Instance Attribute Details
#banned_contents ⇒ Array<String>
Optional. List of banned phrases. Applies to both user inputs and agent
responses.
Corresponds to the JSON property bannedContents
3774 3775 3776 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3774 def banned_contents @banned_contents end |
#banned_contents_in_agent_response ⇒ Array<String>
Optional. List of banned phrases. Applies only to agent responses.
Corresponds to the JSON property bannedContentsInAgentResponse
3779 3780 3781 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3779 def banned_contents_in_agent_response @banned_contents_in_agent_response end |
#banned_contents_in_user_input ⇒ Array<String>
Optional. List of banned phrases. Applies only to user inputs.
Corresponds to the JSON property bannedContentsInUserInput
3784 3785 3786 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3784 def banned_contents_in_user_input @banned_contents_in_user_input end |
#disregard_diacritics ⇒ Boolean Also known as: disregard_diacritics?
Optional. If true, diacritics are ignored during matching.
Corresponds to the JSON property disregardDiacritics
3789 3790 3791 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3789 def disregard_diacritics @disregard_diacritics end |
#match_type ⇒ String
Required. Match type for the content filter.
Corresponds to the JSON property matchType
3795 3796 3797 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3795 def match_type @match_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3802 3803 3804 3805 3806 3807 3808 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3802 def update!(**args) @banned_contents = args[:banned_contents] if args.key?(:banned_contents) @banned_contents_in_agent_response = args[:banned_contents_in_agent_response] if args.key?(:banned_contents_in_agent_response) @banned_contents_in_user_input = args[:banned_contents_in_user_input] if args.key?(:banned_contents_in_user_input) @disregard_diacritics = args[:disregard_diacritics] if args.key?(:disregard_diacritics) @match_type = args[:match_type] if args.key?(:match_type) end |