Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RankRequest

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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1RankRequest

Returns a new instance of GoogleCloudDiscoveryengineV1RankRequest.



6696
6697
6698
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6696

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)


6655
6656
6657
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6655

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)


6663
6664
6665
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6663

def model
  @model
end

#queryString

The query to use. Corresponds to the JSON property query

Returns:

  • (String)


6668
6669
6670
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6668

def query
  @query
end

#recordsArray<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RankingRecord>

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



6673
6674
6675
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6673

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)


6679
6680
6681
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6679

def top_n
  @top_n
end

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

Returns:

  • (Hash<String,String>)


6694
6695
6696
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6694

def user_labels
  @user_labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6701
6702
6703
6704
6705
6706
6707
6708
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6701

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