Class RankRequest (0.11.12)

RankRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request message for RankService.Rank method.

Attributes

Name Description
ranking_config str
Required. The resource name of the rank service config, such as projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config.
model str
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.
top_n int
The number of results to return. If this is unset or no bigger than zero, returns all results.
query str
The query to use.
records MutableSequence[google.cloud.discoveryengine_v1alpha.types.RankingRecord]
Required. A list of records to rank. At most 200 records to rank.
ignore_record_details_in_response bool
If true, the response will contain only record ID and score. By default, it is false, the response will contain record details.