Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RankRequest
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RankRequest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discoveryengine_v1/classes.rb,
lib/google/apis/discoveryengine_v1/representations.rb,
lib/google/apis/discoveryengine_v1/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::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RankingRecord>
Required.
-
#top_n ⇒ Fixnum
The number of results to return.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1RankRequest
constructor
A new instance of GoogleCloudDiscoveryengineV1RankRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1RankRequest
Returns a new instance of GoogleCloudDiscoveryengineV1RankRequest.
4478 4479 4480 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4478 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
4452 4453 4454 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4452 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
4460 4461 4462 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4460 def model @model end |
#query ⇒ String
The query to use.
Corresponds to the JSON property query
4465 4466 4467 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4465 def query @query end |
#records ⇒ Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RankingRecord>
Required. A list of records to rank. At most 200 records to rank.
Corresponds to the JSON property records
4470 4471 4472 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4470 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
4476 4477 4478 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4476 def top_n @top_n end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4483 4484 4485 4486 4487 4488 4489 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4483 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) end |