Class: Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig

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

Configuration for a single generated question.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2GenerativeQuestionConfig

Returns a new instance of GoogleCloudRetailV2GenerativeQuestionConfig.



2404
2405
2406
# File 'lib/google/apis/retail_v2/classes.rb', line 2404

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

Instance Attribute Details

#allowed_in_conversationBoolean Also known as: allowed_in_conversation?

Optional. Whether the question is asked at serving time. Corresponds to the JSON property allowedInConversation

Returns:

  • (Boolean)


2369
2370
2371
# File 'lib/google/apis/retail_v2/classes.rb', line 2369

def allowed_in_conversation
  @allowed_in_conversation
end

#catalogString

Required. Resource name of the catalog. Format: projects/project/locations/ location/catalogs/catalog Corresponds to the JSON property catalog

Returns:

  • (String)


2376
2377
2378
# File 'lib/google/apis/retail_v2/classes.rb', line 2376

def catalog
  @catalog
end

#example_valuesArray<String>

Output only. Values that can be used to answer the question. Corresponds to the JSON property exampleValues

Returns:

  • (Array<String>)


2381
2382
2383
# File 'lib/google/apis/retail_v2/classes.rb', line 2381

def example_values
  @example_values
end

#facetString

Required. The facet to which the question is associated. Corresponds to the JSON property facet

Returns:

  • (String)


2386
2387
2388
# File 'lib/google/apis/retail_v2/classes.rb', line 2386

def facet
  @facet
end

#final_questionString

Optional. The question that will be used at serving time. Question can have a max length of 300 bytes. When not populated, generated_question should be used. Corresponds to the JSON property finalQuestion

Returns:

  • (String)


2392
2393
2394
# File 'lib/google/apis/retail_v2/classes.rb', line 2392

def final_question
  @final_question
end

#frequencyFloat

Output only. The ratio of how often a question was asked. Corresponds to the JSON property frequency

Returns:

  • (Float)


2397
2398
2399
# File 'lib/google/apis/retail_v2/classes.rb', line 2397

def frequency
  @frequency
end

#generated_questionString

Output only. The LLM generated question. Corresponds to the JSON property generatedQuestion

Returns:

  • (String)


2402
2403
2404
# File 'lib/google/apis/retail_v2/classes.rb', line 2402

def generated_question
  @generated_question
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2409
2410
2411
2412
2413
2414
2415
2416
2417
# File 'lib/google/apis/retail_v2/classes.rb', line 2409

def update!(**args)
  @allowed_in_conversation = args[:allowed_in_conversation] if args.key?(:allowed_in_conversation)
  @catalog = args[:catalog] if args.key?(:catalog)
  @example_values = args[:example_values] if args.key?(:example_values)
  @facet = args[:facet] if args.key?(:facet)
  @final_question = args[:final_question] if args.key?(:final_question)
  @frequency = args[:frequency] if args.key?(:frequency)
  @generated_question = args[:generated_question] if args.key?(:generated_question)
end