GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1PredictRequest (google_api_recommendation_engine v0.4.5) View Source
Request message for Predict method.
Attributes
-
dryRun
(type:boolean()
, default:nil
) - Optional. Use dryRun mode for this prediction query. If set to true, a fake model will be used that returns arbitrary catalog items. Note that the dryRun mode should only be used for testing the API, or if the model is not ready. -
filter
(type:String.t
, default:nil
) - Optional. Filter for restricting prediction results. Accepts values for tags and thefilterOutOfStockItems
flag. Tag expressions. Restricts predictions to items that match all of the specified tags. Boolean operatorsOR
andNOT
are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space.-"tagA"
is also supported and is equivalent toNOT "tagA"
. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1 KiB. filterOutOfStockItems. Restricts predictions to items that do not have a stockState value of OUT_OF_STOCK. Examples: tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") filterOutOfStockItems tag=(-"promotional") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular items to be returned instead, setstrictFiltering
to false inPredictRequest.params
. -
labels
(type:map()
, default:nil
) - Optional. The labels for the predict request. Label keys can contain lowercase letters, digits and hyphens, must start with a letter, and must end with a letter or digit. Non-zero label values can contain lowercase letters, digits and hyphens, must start with a letter, and must end with a letter or digit. * No more than 64 labels can be associated with a given request. See https://goo.gl/xmQnxf for more information on and examples of labels. -
pageSize
(type:integer()
, default:nil
) - Optional. Maximum number of results to return per page. Set this property to the number of prediction results required. If zero, the service will choose a reasonable default. -
pageToken
(type:String.t
, default:nil
) - Optional. The previous PredictResponse.next_page_token. -
params
(type:map()
, default:nil
) - Optional. Additional domain specific parameters for the predictions. Allowed values:returnCatalogItem
: Boolean. If set to true, the associated catalogItem object will be returned in thePredictResponse.PredictionResult.itemMetadata
object in the method response.returnItemScore
: Boolean. If set to true, the prediction 'score' corresponding to each returned item will be set in themetadata
field in the prediction response. The given 'score' indicates the probability of an item being clicked/purchased given the user's context and history.strictFiltering
: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular items instead of empty if your filter blocks all prediction results.priceRerankLevel
: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request level control and adjust prediction results based on product price. *diversityLevel
: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request level control and adjust prediction results based on product category. -
userEvent
(type:GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1UserEvent.t
, default:nil
) - Required. Context about the user, what they are looking at and what action they took to trigger the predict request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging.
Link to this section Summary
Functions
Unwrap a decoded JSON object into its complex fields.
Link to this section Types
Specs
t() :: %GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1PredictRequest{ dryRun: boolean() | nil, filter: String.t() | nil, labels: map() | nil, pageSize: integer() | nil, pageToken: String.t() | nil, params: map() | nil, userEvent: GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1UserEvent.t() | nil }
Link to this section Functions
Specs
Unwrap a decoded JSON object into its complex fields.