def get_completions()

in src/scripts/gen_completions.py [0:0]


def get_completions(dataset_name, engine, shots_num, indices_path=None, entity_name=None):
    if entity_name:
        with open(f'./data/{dataset_name}/{entity_name}/ranked_completions.json') as json_file:
            dataset = json.load(json_file)
    else:
        with open(f'./data/{dataset_name}/dataset.json') as json_file:
            dataset = json.load(json_file)
    indices = create_indices(dataset_name, indices_path)
    try_prompt(dataset, engine, indices, shots_num, dataset_name, entity_name)