def METHOD_NAME():
    st_time = time.time()
    contexts = request.json.get("utterances_histories", [])
    try:
        responses = []
        confidences = []
        for context in contexts:
            response = generate_response(context, model, tokenizer)
            if len(response) > 3:
                # drop too short responses
                responses += [response]
                confidences += [DEFAULT_CONFIDENCE]
            else:
                responses += [""]
                confidences += [ZERO_CONFIDENCE]
    except Exception as exc:
        logger.exception(exc)
        sentry_sdk.capture_exception(exc)
        responses = [""] * len(contexts)
        confidences = [ZERO_CONFIDENCE] * len(contexts)
    total_time = time.time() - st_time
    logger.info(f"Keywords storyGPT exec time: {total_time:.3f}s")
    return jsonify(list(zip(responses, confidences)))