Class: Google::Cloud::DiscoveryEngine::V1beta::Assistant::CustomerPolicy::BannedPhrase

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/assistant.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.

Defined Under Namespace

Modules: BannedPhraseMatchType

Instance Attribute Summary collapse

Instance Attribute Details

#ignore_diacritics::Boolean

Returns Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café".

Returns:

  • (::Boolean)

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



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assistant.rb', line 167

class BannedPhrase
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The matching method for the banned phrase.
  module BannedPhraseMatchType
    # Defaults to SIMPLE_STRING_MATCH.
    BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED = 0

    # The banned phrase matches if it is found anywhere in the text as an
    # exact substring.
    SIMPLE_STRING_MATCH = 1

    # Banned phrase only matches if the pattern found in the text is
    # surrounded by word delimiters. The phrase itself may still contain
    # word delimiters.
    WORD_BOUNDARY_STRING_MATCH = 2
  end
end

#match_type::Google::Cloud::DiscoveryEngine::V1beta::Assistant::CustomerPolicy::BannedPhrase::BannedPhraseMatchType

Returns Optional. Match type for the banned phrase.



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assistant.rb', line 167

class BannedPhrase
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The matching method for the banned phrase.
  module BannedPhraseMatchType
    # Defaults to SIMPLE_STRING_MATCH.
    BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED = 0

    # The banned phrase matches if it is found anywhere in the text as an
    # exact substring.
    SIMPLE_STRING_MATCH = 1

    # Banned phrase only matches if the pattern found in the text is
    # surrounded by word delimiters. The phrase itself may still contain
    # word delimiters.
    WORD_BOUNDARY_STRING_MATCH = 2
  end
end

#phrase::String

Returns Required. The raw string content to be banned.

Returns:

  • (::String)

    Required. The raw string content to be banned.



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assistant.rb', line 167

class BannedPhrase
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The matching method for the banned phrase.
  module BannedPhraseMatchType
    # Defaults to SIMPLE_STRING_MATCH.
    BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED = 0

    # The banned phrase matches if it is found anywhere in the text as an
    # exact substring.
    SIMPLE_STRING_MATCH = 1

    # Banned phrase only matches if the pattern found in the text is
    # surrounded by word delimiters. The phrase itself may still contain
    # word delimiters.
    WORD_BOUNDARY_STRING_MATCH = 2
  end
end