**Qt API Review Bot** **What is this?** This is a bot designed to evaluate changes in the Qt public API by analyzing diff files and identifying significant changes that may require review. The bot uses a Large Language Model (LLM) provided by OpenAI to classify changes as either significant or insignificant. This bot is a supplement to the existing API Review process which uses other scripts to generate a collection of interesting changes for each module for review, immediately prior to release. **How does it work?** 1. The bot listens for webhook events on the Gerrit Code Review system. 2. When a new comment is added to a change, the bot processes the diff file and evaluates each changed file. 3. For each file, the bot uses the LLM to analyze the diff and determine whether the changes are significant or insignificant. 4. The bot generates a summary of the significant changes and posts a comment on the Gerrit review page with the results. **Installation** 1. Clone this repository. 2. Install dependencies: `npm install` 3. Modify the `config.json` file with the following contents: ```json { "gerritUsername": "your-gerrit-username", "gerritPassword": "your-gerrit-password", "webhook_port": 8091, "azureKey": "your-openai-api-key", "deploymentId": "", "deploymentId35": "" } ``` Replace `your-gerrit-username`, `your-gerrit-password`, and `your-openai-api-key` with your actual Gerrit credentials and OpenAI API key. **Running the bot** 1. Start the bot by running: `node api_review_GPT.js` 2. The bot will start listening for webhook events on the specified port. **Notes** * Webhooks from gerrit are configured server-side by gerrit-admin@qt-project.org * The bot uses an LLM to determine whether a change is significant or not. False positives or false negatives may occur.