MCPcopy Create free account
hub / github.com/SeldonIO/seldon-server / recommendations

Function recommendations

client/js-client/src/rlClient.js:333–352  ·  view source on GitHub ↗
(user_id, callback, options)

Source from the content-addressed store, hash-verified

331 }
332
333 function recommendations(user_id, callback, options) {
334 var o = options || {};
335 return recommendationsFor(user_id, function (response) {
336 var recommendations_list = [],
337 cohort = "-";
338 if ((response !== null) && (response !== undefined) && (response.error_id === undefined)) {
339 if (response.list) {
340 recommendations_list = response.list;
341 } else {
342 recommendations_list = response.recommendedItems;
343 cohort = response.cohort;
344 }
345
346 if (o.appendClick) {
347 appendClickTo(recommendations_list, options);
348 }
349 }
350 callback({recs: recommendations_list, cohort: cohort});
351 }, o);
352 }
353
354 return {
355 init: function (overrides) {

Callers

nothing calls this directly

Calls 2

recommendationsForFunction · 0.85
appendClickToFunction · 0.85

Tested by

no test coverage detected