Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaRankingRecord
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaRankingRecord
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discoveryengine_v1beta/classes.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb
Overview
Record message for RankService.Rank method.
Instance Attribute Summary collapse
-
#content ⇒ String
The content of the record.
-
#id ⇒ String
The unique ID to represent the record.
-
#score ⇒ Float
The score of this record based on the given query and selected model.
-
#title ⇒ String
The title of the record.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaRankingRecord
constructor
A new instance of GoogleCloudDiscoveryengineV1betaRankingRecord.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaRankingRecord
Returns a new instance of GoogleCloudDiscoveryengineV1betaRankingRecord.
18455 18456 18457 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 18455 def initialize(**args) update!(**args) end |
Instance Attribute Details
#content ⇒ String
The content of the record. Empty by default. At least one of title or content
should be set otherwise an INVALID_ARGUMENT error is thrown.
Corresponds to the JSON property content
18435 18436 18437 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 18435 def content @content end |
#id ⇒ String
The unique ID to represent the record.
Corresponds to the JSON property id
18440 18441 18442 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 18440 def id @id end |
#score ⇒ Float
The score of this record based on the given query and selected model. The
score will be rounded to 2 decimal places. If the score is close to 0, it will
be rounded to 0.0001 to avoid returning unset.
Corresponds to the JSON property score
18447 18448 18449 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 18447 def score @score end |
#title ⇒ String
The title of the record. Empty by default. At least one of title or content
should be set otherwise an INVALID_ARGUMENT error is thrown.
Corresponds to the JSON property title
18453 18454 18455 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 18453 def title @title end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
18460 18461 18462 18463 18464 18465 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 18460 def update!(**args) @content = args[:content] if args.key?(:content) @id = args[:id] if args.key?(:id) @score = args[:score] if args.key?(:score) @title = args[:title] if args.key?(:title) end |