Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaIntentClassificationConfigExample
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaIntentClassificationConfigExample
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2alpha/classes.rb,
lib/google/apis/retail_v2alpha/representations.rb,
lib/google/apis/retail_v2alpha/representations.rb
Overview
An example for intent classification.
Instance Attribute Summary collapse
-
#classified_positive ⇒ Boolean
(also: #classified_positive?)
Required.
-
#intent_type ⇒ String
Optional.
-
#query ⇒ String
Required.
-
#reason ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2alphaIntentClassificationConfigExample
constructor
A new instance of GoogleCloudRetailV2alphaIntentClassificationConfigExample.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2alphaIntentClassificationConfigExample
Returns a new instance of GoogleCloudRetailV2alphaIntentClassificationConfigExample.
4305 4306 4307 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4305 def initialize(**args) update!(**args) end |
Instance Attribute Details
#classified_positive ⇒ Boolean Also known as: classified_positive?
Required. Whether the example is classified positively.
Corresponds to the JSON property classifiedPositive
4284 4285 4286 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4284 def classified_positive @classified_positive end |
#intent_type ⇒ String
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
4292 4293 4294 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4292 def intent_type @intent_type end |
#query ⇒ String
Required. Example query.
Corresponds to the JSON property query
4297 4298 4299 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4297 def query @query end |
#reason ⇒ String
Optional. The reason for the intent classification. This is used to explain
the intent classification decision.
Corresponds to the JSON property reason
4303 4304 4305 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4303 def reason @reason end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4310 4311 4312 4313 4314 4315 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4310 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 |