@app.get('/activation')
async def activation(request: Request):
    '\n    Returns the activation value for the given set of heuristics\n    '
    heuristics = request.json['heuristics']
    try:
        utv = (await app.predictor.get_user_taste_vector(heuristics['user']))
    except KeyError:
        utv = None
    ac = ActivationCalculator(heuristics, request['accessor'])
    a = (await ac.get_activation(utv))
    return json({'activation': a, 'received_heuristics': heuristics})
Returns the activation value for the given set of heuristics
@app.get('/activation')
async def activation(request: Request):
    '\n    \n    '
    heuristics = request.json['heuristics']
    try:
        utv = (await app.predictor.get_user_taste_vector(heuristics['user']))
    except KeyError:
        utv = None
    ac = ActivationCalculator(heuristics, request['accessor'])
    a = (await ac.get_activation(utv))
    return json({'activation': a, 'received_heuristics': heuristics})