|
| 1 | +/* |
| 2 | + This file is auto-generated, do not edit |
| 3 | +*/ |
| 4 | + |
| 5 | +package com.recombee.apiclientkotlin.bindings |
| 6 | +/** |
| 7 | + * CompositeRecommendationStageParameters |
| 8 | + * @param returnProperties With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user. |
| 9 | +
|
| 10 | +Example response with `returnProperties` set in the `resultSettings`: |
| 11 | +```json |
| 12 | + { |
| 13 | + "recommId": "ee94fa8b-efe7-4b35-abc6-2bc3456d66ed", |
| 14 | + "source": { |
| 15 | + "id": "category-sport" |
| 16 | + }, |
| 17 | + "recomms": [ |
| 18 | + { |
| 19 | + "id": "article-1024", |
| 20 | + "values": { |
| 21 | + "title": "Champions League: Stunning Comeback Secures Final Spot", |
| 22 | + "categories": ["Sport", "Football"], |
| 23 | + "author": "Jane Smith", |
| 24 | + "url": "newsportal.com/articles/champions-league-comeback" |
| 25 | + } |
| 26 | + }, |
| 27 | + { |
| 28 | + "id": "article-2031", |
| 29 | + "values": { |
| 30 | + "title": "Top 10 Moments from the Summer Olympics", |
| 31 | + "categories": ["Sport", "Olympics"], |
| 32 | + "author": "Mark Johnson", |
| 33 | + "url": "newsportal.com/articles/olympic-top-moments" |
| 34 | + } |
| 35 | + }, |
| 36 | + { |
| 37 | + "id": "article-3042", |
| 38 | + "values": { |
| 39 | + "title": "Rising Stars in Women's Tennis to Watch This Season", |
| 40 | + "categories": ["Sport", "Tennis"], |
| 41 | + "author": "Laura Chen", |
| 42 | + "url": "newsportal.com/articles/womens-tennis-stars" |
| 43 | + } |
| 44 | + } |
| 45 | + ], |
| 46 | + "numberNextRecommsCalls": 0 |
| 47 | + } |
| 48 | +
|
| 49 | +``` |
| 50 | +
|
| 51 | + * @param includedProperties Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. |
| 52 | +
|
| 53 | +Example response for `returnProperties=true` and `includedProperties=title,url` set in `resultSettings`: |
| 54 | +```json |
| 55 | + { |
| 56 | + "recommId": "ee94fa8b-efe7-4b35-abc6-2bc3456d66ed", |
| 57 | + "source": { |
| 58 | + "id": "category-sport" |
| 59 | + }, |
| 60 | + "recomms": [ |
| 61 | + { |
| 62 | + "id": "article-1024", |
| 63 | + "values": { |
| 64 | + "title": "Champions League: Stunning Comeback Secures Final Spot", |
| 65 | + "url": "newsportal.com/articles/champions-league-comeback" |
| 66 | + } |
| 67 | + }, |
| 68 | + { |
| 69 | + "id": "article-2031", |
| 70 | + "values": { |
| 71 | + "title": "Top 10 Moments from the Summer Olympics", |
| 72 | + "url": "newsportal.com/articles/olympic-top-moments" |
| 73 | + } |
| 74 | + }, |
| 75 | + { |
| 76 | + "id": "article-3042", |
| 77 | + "values": { |
| 78 | + "title": "Rising Stars in Women's Tennis to Watch This Season", |
| 79 | + "url": "newsportal.com/articles/womens-tennis-stars" |
| 80 | + } |
| 81 | + } |
| 82 | + ], |
| 83 | + "numberNextRecommsCalls": 0 |
| 84 | + } |
| 85 | +
|
| 86 | +``` |
| 87 | +
|
| 88 | + * @param filter Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended entities based on the values of their attributes. |
| 89 | +
|
| 90 | +Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). |
| 91 | +
|
| 92 | + * @param booster Number-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to boost the recommendation rate of some entities based on the values of their attributes. |
| 93 | +
|
| 94 | +Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). |
| 95 | +
|
| 96 | + * @param logic Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. |
| 97 | +See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details. |
| 98 | +
|
| 99 | +The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. |
| 100 | +
|
| 101 | +Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). |
| 102 | +
|
| 103 | + * @param reqlExpressions Only usable if the stage corresponds to the one of these recommendation endpoints: |
| 104 | +
|
| 105 | +- [Recommend Items To User](https://docs.recombee.com/api#recommend-items-to-user) |
| 106 | +- [Recommend Items To Item](https://docs.recombee.com/api#recommend-items-to-item) |
| 107 | +- [Recommend Items to Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment) |
| 108 | +- [Recommend Users to Item](https://docs.recombee.com/api#recommend-users-to-item) |
| 109 | +- [Recommend Users To User](https://docs.recombee.com/api#recommend-users-to-user) |
| 110 | +
|
| 111 | +A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended item. |
| 112 | +This can be used to compute additional properties of the recommended items that are not stored in the database. |
| 113 | +
|
| 114 | +The keys are the names of the expressions, and the values are the actual ReQL expressions. |
| 115 | +
|
| 116 | +Example request: |
| 117 | +```json |
| 118 | +{ |
| 119 | + "reqlExpressions": { |
| 120 | + "isInUsersCity": "context_user[\"city\"] in 'cities'", |
| 121 | + "distanceToUser": "earth_distance('location', context_user[\"location\"])" |
| 122 | + } |
| 123 | +} |
| 124 | +``` |
| 125 | +
|
| 126 | +Example response: |
| 127 | +```json |
| 128 | +{ |
| 129 | + "recommId": "ce52ada4-e4d9-4885-943c-407db2dee837", |
| 130 | + "source": { |
| 131 | + "id": "restaurant-123", |
| 132 | + "reqlEvaluations": { |
| 133 | + "isInUsersCity": true, |
| 134 | + "distanceToUser": 3450.5 |
| 135 | + } |
| 136 | + }, |
| 137 | + "recomms": |
| 138 | + [ |
| 139 | + { |
| 140 | + "id": "restaurant-178", |
| 141 | + "reqlEvaluations": { |
| 142 | + "isInUsersCity": true, |
| 143 | + "distanceToUser": 5200.2 |
| 144 | + } |
| 145 | + }, |
| 146 | + { |
| 147 | + "id": "bar-42", |
| 148 | + "reqlEvaluations": { |
| 149 | + "isInUsersCity": false, |
| 150 | + "distanceToUser": 2516.0 |
| 151 | + } |
| 152 | + } |
| 153 | + ], |
| 154 | + "numberNextRecommsCalls": 0 |
| 155 | +} |
| 156 | +``` |
| 157 | +
|
| 158 | + * @param minRelevance **Expert option:** Only usable if the stage corresponds to the one of these recommendation endpoints: |
| 159 | +
|
| 160 | +- [Recommend Items To User](https://docs.recombee.com/api#recommend-items-to-user) |
| 161 | +- [Recommend Items To Item](https://docs.recombee.com/api#recommend-items-to-item) |
| 162 | +- [Recommend Items to Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment) |
| 163 | +
|
| 164 | +If the *userId* is provided: Specifies the threshold of how relevant must the recommended items be to the user. |
| 165 | +
|
| 166 | +Possible values one of: `"low"`, `"medium"`, `"high"`. |
| 167 | +
|
| 168 | +The default value is `"low"`, meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations being appended to reach the full *count*. |
| 169 | +This behavior may be suppressed by using `"medium"` or `"high"` values. In such case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it. |
| 170 | +
|
| 171 | + * @param rotationRate **Expert option:** Only usable if the stage corresponds to the one of these recommendation endpoints: |
| 172 | +- [Recommend Items To User](https://docs.recombee.com/api#recommend-items-to-user) |
| 173 | +- [Recommend Items To Item](https://docs.recombee.com/api#recommend-items-to-item) |
| 174 | +- [Recommend Items to Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment) |
| 175 | +- [Recommend Users To User](https://docs.recombee.com/api#recommend-users-to-user) |
| 176 | +
|
| 177 | +If the *userId* is provided: If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. |
| 178 | +
|
| 179 | +You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items. |
| 180 | +
|
| 181 | + * @param rotationTime **Expert option:** Only usable if the stage corresponds to the one of these recommendation endpoints: |
| 182 | +- [Recommend Items To User](https://docs.recombee.com/api#recommend-items-to-user) |
| 183 | +- [Recommend Items To Item](https://docs.recombee.com/api#recommend-items-to-item) |
| 184 | +- [Recommend Items to Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment) |
| 185 | +- [Recommend Users To User](https://docs.recombee.com/api#recommend-users-to-user) |
| 186 | +
|
| 187 | +If the *userId* is provided: Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. |
| 188 | +
|
| 189 | + */ |
| 190 | +public class CompositeRecommendationStageParameters( |
| 191 | + public val returnProperties: Boolean? = null, |
| 192 | + public val includedProperties: List<String>? = null, |
| 193 | + public val filter: String? = null, |
| 194 | + public val booster: String? = null, |
| 195 | + public val logic: Logic? = null, |
| 196 | + public val reqlExpressions: Map<String, String>? = null, |
| 197 | + public val minRelevance: String? = null, |
| 198 | + public val rotationRate: Double? = null, |
| 199 | + public val rotationTime: Double? = null): RecombeeBinding() { |
| 200 | +} |
| 201 | + |
0 commit comments