COMING SOON
This page describes how to configure a generic AI Provider for use with the AI Review Assistant.
If any of the headers, body content or query parameters require a secret, use the $API_KEY
placeholder, and fill the actual value in the API Key section.
Request section
Section | Instructions |
---|---|
API URL | Enter the REST API address for your AI Provider. This has to be the endpoint for a chat (message based) completion |
API Key | Enter your API key |
Headers | Add all the key-value Http Headers for your AI Provider. For example, a Basic Authorization or a version controlling header. |
Query Parameters | Add all key-value pairs that you would find after the |
Request Body | Add all members for the JSON content. For example, the model, a stop sequence, a maximum number of tokens… |
Response Section
Section | Instructions |
---|---|
Success Query | Enter the JSON query to retrieve the content of the chat message completion. For example, if the JSON response from the API is { "content": [ { "text": "Hi! My name is Claude.", "type": "text" } ] } Then the query will be |
Error Query | Enter the query to retrieve the error message when an error occurs. This is not strictly necessary, but it will help users when an error pops up. |
Test and Save
Click on the Test button and verify that you receive a confirmation message that everything is configured properly.
Click on the Save button.
If you have trouble in configuring our AI Review Assistant, we are happy to help! 🎉
More on JSON Query Language (JQL)
AI Review Assistant uses a custom JSON Query Language (JQL) to extract text information from JSON formatted responses.
A JQL query is a text snippet, describing a path from the root of a JSON document to a single text field.
Format
A JQL query is made of selections joined with a period (.
). For example a.b.c
is a path made of three selections (a
, b
, and c
). Selections are evaluated from left to right, and each describes how to extract a nested value from a JSON document. For a JQL query to be valid, the final selection must extract a String value.
Each selection can be one of two kinds, a field selection or an array selection.
Field Selection
A field selection extracts a field of a JSON object. For example message
requires the current JSON object to have a field message
(e.g. {"message":<value>}
) and extracts the associated value.
Array Selection
An array selection combines field selection with indexing. For example content[0]
requires the current JSON object to have a field content
associated with an array, (e.g. {"content":[<values>...]}
) and tries to extract the element of the array at index 0
.