‎2024 Dec 09 7:56 AM - edited ‎2024 Dec 09 8:04 AM
Hi,
I am testing the Personalized Recommendation entitlement and while the /next-items API seems to be working fine with basic parameters used in the request body, if I am trying to use the "boosting_attributes" (as suggested in https://help.sap.com/docs/personalized-recommendation/personalized-recommendation/next-item-recommen...), the response comes back as 422:
Serving instance internal exceptionThis is how my POST request body looks like:
{
"user": "8",
"items_ls": ["49"],
"boosting_attributes": [
{
"categoricalFeatures":{
"categories":{
"values":[
"Drama",
"Comedy"
],
"weights":[
0.2,
0.4
]
}
}
}
],
"k": 3,
"explain": true
}
Any help would be much appreciated.
Thank you.
Request clarification before answering.
Apologies for the late reply but better late than never!
There is a slight error in the request payload where the "boosting_attributes" values should be a dict instead of a list.
The correct request payload should be:
{
"user": "8",
"items_ls": [
"49"
],
"boosting_attributes": {
"categoricalFeatures": {
"categories": {
"values": [
"Drama",
"Comedy"
],
"weights": [
0.2,
0.4
]
}
}
},
"k": 3,
"explain": true
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 11 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.