Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1beta/classes.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb

Overview

Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase

Returns a new instance of GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase.



21252
21253
21254
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21252

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#ignore_diacriticsBoolean Also known as: ignore_diacritics?

Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café". Corresponds to the JSON property ignoreDiacritics

Returns:

  • (Boolean)


21239
21240
21241
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21239

def ignore_diacritics
  @ignore_diacritics
end

#match_typeString

Optional. Match type for the banned phrase. Corresponds to the JSON property matchType

Returns:

  • (String)


21245
21246
21247
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21245

def match_type
  @match_type
end

#phraseString

Required. The raw string content to be banned. Corresponds to the JSON property phrase

Returns:

  • (String)


21250
21251
21252
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21250

def phrase
  @phrase
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



21257
21258
21259
21260
21261
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21257

def update!(**args)
  @ignore_diacritics = args[:ignore_diacritics] if args.key?(:ignore_diacritics)
  @match_type = args[:match_type] if args.key?(:match_type)
  @phrase = args[:phrase] if args.key?(:phrase)
end