def main()

in genai-on-vertex-ai/gemini/needle_in_a_haystack/needlehaystack/run.py [0:0]


def main():
    """
    The main function to execute the testing process based on command line arguments.
    
    It parses the command line arguments, selects the appropriate model provider and evaluator,
    and initiates the testing process either for single-needle or multi-needle scenarios.
    """
    args = CLI(CommandArgs, as_positional=False)
    args.model_to_test = get_model_to_test(args)
    args.evaluator = get_evaluator(args)
    
    tester = LLMNeedleHaystackTester(**args.__dict__)
    tester.start_test()