Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaRankRequest

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaRankRequest

Returns a new instance of GoogleCloudDiscoveryengineV1alphaRankRequest.



7228
7229
7230
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7228

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

Instance Attribute Details

#ignore_record_details_in_responseBoolean 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

Returns:

  • (Boolean)


7202
7203
7204
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7202

def ignore_record_details_in_response
  @ignore_record_details_in_response
end

#modelString

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

Returns:

  • (String)


7210
7211
7212
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7210

def model
  @model
end

#queryString

The query to use. Corresponds to the JSON property query

Returns:

  • (String)


7215
7216
7217
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7215

def query
  @query
end

#recordsArray<Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaRankingRecord>

Required. A list of records to rank. At most 200 records to rank. Corresponds to the JSON property records



7220
7221
7222
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7220

def records
  @records
end

#top_nFixnum

The number of results to return. If this is unset or no bigger than zero, returns all results. Corresponds to the JSON property topN

Returns:

  • (Fixnum)


7226
7227
7228
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7226

def top_n
  @top_n
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7233
7234
7235
7236
7237
7238
7239
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7233

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