def get_nn_responses(context_token_ids,
                     nn_model,
                     mode,
                     output_candidates_num=1,
                     output_seq_len=MAX_PREDICTIONS_LENGTH,
                     condition_ids=None,
                     **kwargs):
    """
    Predicts output_candidates_num responses for every context and returns them in form of strings.
    See get_nn_response_ids for the details.

    :param context_token_ids: numpy array of integers, shape (contexts_num, INPUT_CONTEXT_SIZE, INPUT_SEQUENCE_LENGTH)
    :param nn_model: trained model
    :param mode: prediction mode, see const PREDICTION_MODES
    :param output_candidates_num: number of responses to be generated for each context
    :param output_seq_len: max length of generated responses
    :param condition_ids: extra info to be taken into account while generating response (emotion, for example)

    :return: list of lists of strings, shape (contexts_num, output_candidates_num)
    """

    response_tokens_ids = get_nn_response_ids(context_token_ids, nn_model, mode, output_candidates_num, output_seq_len,
                                              condition_ids, **kwargs)
    # shape (contexts_num, output_candidates_num, output_seq_len), numpy array of integers

    responses = [
        transform_token_ids_to_sentences(response_candidates_tokens_ids, nn_model.index_to_token)
        for response_candidates_tokens_ids in response_tokens_ids
    ]
    # responses shape (contexts_num, output_candidates_num), list of lists of strings

    return responses

    Predicts output_candidates_num responses for every context and returns them in form of strings.
    See get_nn_response_ids for the details.

    :param context_token_ids: numpy array of integers, shape (contexts_num, INPUT_CONTEXT_SIZE, INPUT_SEQUENCE_LENGTH)
    :param nn_model: trained model
    :param mode: prediction mode, see const PREDICTION_MODES
    :param output_candidates_num: number of responses to be generated for each context
    :param output_seq_len: max length of generated responses
    :param condition_ids: extra info to be taken into account while generating response (emotion, for example)

    :return: list of lists of strings, shape (contexts_num, output_candidates_num)
    
cakechat/dialog_model/inference/predict.py