GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1PredictRequest (google_api_recommendation_engine v0.3.1) 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 dummy 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 the filterOutOfStockItems flag. Tag expressions. Restricts predictions to items that match all of the specified tags. Boolean operators OR and NOT 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 to NOT "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, set strictFiltering to false in PredictRequest.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 the PredictResponse.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 the metadata 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.
  • 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(),
    filter: String.t(),
    labels: map(),
    pageSize: integer(),
    pageToken: String.t(),
    params: map(),
    userEvent:
      GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1UserEvent.t()
  }

Link to this section Functions

Specs

decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.