Class: Google::Apis::RetailV2::GoogleCloudRetailV2IntentClassificationConfig

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

Overview

The public proto to represent the intent classification config. It will be converted to the internal proto in the backend.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2IntentClassificationConfig

Returns a new instance of GoogleCloudRetailV2IntentClassificationConfig.



2834
2835
2836
# File 'lib/google/apis/retail_v2/classes.rb', line 2834

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

Instance Attribute Details

#blocklist_keywordsArray<String>

Optional. A list of keywords that will be used to classify the query to the " BLOCKLISTED" intent type. The keywords are case insensitive. Corresponds to the JSON property blocklistKeywords

Returns:

  • (Array<String>)


2807
2808
2809
# File 'lib/google/apis/retail_v2/classes.rb', line 2807

def blocklist_keywords
  @blocklist_keywords
end

#disabled_intent_typesArray<String>

Optional. A list of intent types that will be disabled for this customer. The intent types must match one of the predefined intent types defined at https:// cloud.google.com/retail/docs/reference/rpc/google.cloud.retail.v2alpha# querytype Corresponds to the JSON property disabledIntentTypes

Returns:

  • (Array<String>)


2815
2816
2817
# File 'lib/google/apis/retail_v2/classes.rb', line 2815

def disabled_intent_types
  @disabled_intent_types
end

#exampleArray<Google::Apis::RetailV2::GoogleCloudRetailV2IntentClassificationConfigExample>

Optional. A list of examples for intent classification. Corresponds to the JSON property example



2820
2821
2822
# File 'lib/google/apis/retail_v2/classes.rb', line 2820

def example
  @example
end

#inline_sourceGoogle::Apis::RetailV2::GoogleCloudRetailV2IntentClassificationConfigInlineSource

Inline source for intent classifications. Corresponds to the JSON property inlineSource



2825
2826
2827
# File 'lib/google/apis/retail_v2/classes.rb', line 2825

def inline_source
  @inline_source
end

#model_preambleString

Optional. Customers can use the preamble to specify any requirements for blocklisting intent classification. This preamble will be added to the blocklisting intent classification model prompt. Corresponds to the JSON property modelPreamble

Returns:

  • (String)


2832
2833
2834
# File 'lib/google/apis/retail_v2/classes.rb', line 2832

def model_preamble
  @model_preamble
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2839
2840
2841
2842
2843
2844
2845
# File 'lib/google/apis/retail_v2/classes.rb', line 2839

def update!(**args)
  @blocklist_keywords = args[:blocklist_keywords] if args.key?(:blocklist_keywords)
  @disabled_intent_types = args[:disabled_intent_types] if args.key?(:disabled_intent_types)
  @example = args[:example] if args.key?(:example)
  @inline_source = args[:inline_source] if args.key?(:inline_source)
  @model_preamble = args[:model_preamble] if args.key?(:model_preamble)
end