Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaIntentClassificationConfigExample

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

Overview

An example for intent classification.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaIntentClassificationConfigExample

Returns a new instance of GoogleCloudRetailV2betaIntentClassificationConfigExample.



5311
5312
5313
# File 'lib/google/apis/retail_v2beta/classes.rb', line 5311

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

Instance Attribute Details

#classified_positiveBoolean Also known as: classified_positive?

Required. Whether the example is classified positively. Corresponds to the JSON property classifiedPositive

Returns:

  • (Boolean)


5290
5291
5292
# File 'lib/google/apis/retail_v2beta/classes.rb', line 5290

def classified_positive
  @classified_positive
end

#intent_typeString

Optional. The intent_type 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 intentType

Returns:

  • (String)


5298
5299
5300
# File 'lib/google/apis/retail_v2beta/classes.rb', line 5298

def intent_type
  @intent_type
end

#queryString

Required. Example query. Corresponds to the JSON property query

Returns:

  • (String)


5303
5304
5305
# File 'lib/google/apis/retail_v2beta/classes.rb', line 5303

def query
  @query
end

#reasonString

Optional. The reason for the intent classification. This is used to explain the intent classification decision. Corresponds to the JSON property reason

Returns:

  • (String)


5309
5310
5311
# File 'lib/google/apis/retail_v2beta/classes.rb', line 5309

def reason
  @reason
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5316
5317
5318
5319
5320
5321
# File 'lib/google/apis/retail_v2beta/classes.rb', line 5316

def update!(**args)
  @classified_positive = args[:classified_positive] if args.key?(:classified_positive)
  @intent_type = args[:intent_type] if args.key?(:intent_type)
  @query = args[:query] if args.key?(:query)
  @reason = args[:reason] if args.key?(:reason)
end