# Code Suggestion Comparator ## Overview `code_suggestion_compare` is a Python tool that compares code suggestions generated by different AI coding models on identical prompts. It highlights differences in logic, performance, and readability to help developers choose the best model for their needs. ## Features - Fetch code suggestions from multiple AI coding models using their APIs. - Compare the code suggestions and generate unified diffs. - Output results in JSON or diff format. ## Installation Install the required dependencies: ```bash pip install requests black ``` ## Usage Run the script from the command line: ```bash python code_suggestion_compare.py --api_keys --prompt "" --output ``` ### Arguments - `--api_keys`: List of API keys for the models. - `--prompt`: The prompt to send to the models. - `--output`: Output format. Choose between `json` (default) or `diff`. ### Example ```bash python code_suggestion_compare.py --api_keys key1 key2 --prompt "def add(a, b): ..." --output diff ``` ## Testing To run the tests, use `pytest`: ```bash pytest test_code_suggestion_compare.py ``` The tests mock the network requests to ensure no actual API calls are made.