Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaRankRequest
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaRankRequest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discoveryengine_v1alpha/classes.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb
Overview
Request message for RankService.Rank method.
Instance Attribute Summary collapse
-
#ignore_record_details_in_response ⇒ Boolean
(also: #ignore_record_details_in_response?)
If true, the response will contain only record ID and score.
-
#model ⇒ String
The identifier of the model to use.
-
#query ⇒ String
The query to use.
-
#records ⇒ Array<Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaRankingRecord>
Required.
-
#top_n ⇒ Fixnum
The number of results to return.
-
#user_labels ⇒ Hash<String,String>
The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaRankRequest
constructor
A new instance of GoogleCloudDiscoveryengineV1alphaRankRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaRankRequest
Returns a new instance of GoogleCloudDiscoveryengineV1alphaRankRequest.
8597 8598 8599 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 8597 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ignore_record_details_in_response ⇒ Boolean Also known as: ignore_record_details_in_response?
If true, the response will contain only record ID and score. By default, it is
false, the response will contain record details.
Corresponds to the JSON property ignoreRecordDetailsInResponse
8556 8557 8558 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 8556 def ignore_record_details_in_response @ignore_record_details_in_response end |
#model ⇒ String
The identifier of the model to use. It is one of: * semantic-ranker-512@
latest
: Semantic ranking model with maxiumn input token size 512. It is set
to semantic-ranker-512@latest
by default if unspecified.
Corresponds to the JSON property model
8564 8565 8566 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 8564 def model @model end |
#query ⇒ String
The query to use.
Corresponds to the JSON property query
8569 8570 8571 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 8569 def query @query end |
#records ⇒ Array<Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaRankingRecord>
Required. A list of records to rank. At most 200 records to rank.
Corresponds to the JSON property records
8574 8575 8576 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 8574 def records @records end |
#top_n ⇒ Fixnum
The number of results to return. If this is unset or no bigger than zero,
returns all results.
Corresponds to the JSON property topN
8580 8581 8582 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 8580 def top_n @top_n end |
#user_labels ⇒ Hash<String,String>
The user labels applied to a resource must meet the following requirements: *
Each resource can have multiple labels, up to a maximum of 64. * Each label
must be a key-value pair. * Keys have a minimum length of 1 character and a
maximum length of 63 characters and cannot be empty. Values can be empty and
have a maximum length of 63 characters. * Keys and values can contain only
lowercase letters, numeric characters, underscores, and dashes. All characters
must use UTF-8 encoding, and international characters are allowed. * The key
portion of a label must be unique. However, you can use the same key with
multiple resources. * Keys must start with a lowercase letter or international
character. See Google Cloud Document for more details.
Corresponds to the JSON property userLabels
8595 8596 8597 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 8595 def user_labels @user_labels end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
8602 8603 8604 8605 8606 8607 8608 8609 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 8602 def update!(**args) @ignore_record_details_in_response = args[:ignore_record_details_in_response] if args.key?(:ignore_record_details_in_response) @model = args[:model] if args.key?(:model) @query = args[:query] if args.key?(:query) @records = args[:records] if args.key?(:records) @top_n = args[:top_n] if args.key?(:top_n) @user_labels = args[:user_labels] if args.key?(:user_labels) end |