Configure ChatGPT for AI Review Assistant
This page describes how to configure ChatGPT as your AI provider for AI Review Assistant. This guide is also relevant to you if you are using similar providers like Azure OpenAI.
If it is the first time you are using the app, most of the ChatGPT configuration are pre-filled for you. Some steps might therefore be already done.
As a repository administrator, follow these steps:
Go the Code Review Assistant repository settings
Make sure you are in the AI Review Assistant tab on top
In the API URL section, enter the REST API address for ChatGPT:
https://api.openai.com/v1/chat/completions
. If you are using Azure OpenAI, the address will be of the formhttps://{resource-name}.openai.azure.com/openai/deployments/{deployment-id}/completions
instead.In the Headers section, click on the “Add Header” button and enter
Authorization
on the left side, andBearer $API_SECRET
on the right side, as shown belowIn the Request Body section, click on the ➕ icon. Enter
model
in the input, then click onAdd > Text
and entergpt-4-1106-preview
.
The gpt-4-1106-preview
model is the most up-to-date model at the time of this writing. Make sure to check-out the available models in their official documentation.
(Optional/Advanced) Customize the request body even further. Still in the Request Body section, add other optional parameters as documented in the official OpenAI documentation.
In the API Key section, enter your ChatGPT API key.
In the Response Mapping JQL section, enter
choices[0].message.content
.In the Response Error Mapping JQL section, enter
error.message
.Click on the “Test” button. Check that you get the validation that everything is configured properly.
Click “Save” to save your configuration.
If you have trouble in configuring our AI Review Assistant, we are happy to help! 🎉