Class RankRequest (0.13.4)

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.
user_labels MutableMapping[str, str]
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

Classes

UserLabelsEntry

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

The abstract base class for a message.

Parameters
Name Description
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.