Step 1: Create a test suite
Follow the instructions in Creating Test Suites to create a test suite. Copy the link to the test suite, you’ll need it later.Step 2: Create your LLM function
In the root directory of your repo, you should create a file calledvals_entry.py
. This file should have a single python function with the following signature:
Step 3: Create an API Key and add it to Github Secrets
On the Vals AI Admin Page, you should create a new API Key with a memorable name (e.g., CICD API Key). Copy the API key. Next, in your Github Repo, go to SETTINGS > Secrets and Variables > Actions. Press “New Repository Secret”. The name should be VALS_API_KEY and the value should be the secret.Step 4: Add a Github Action
Create a new file,.github/workflows/run_vals.yaml
. In it, you can add the following configuration. This tells Github to run the Vals AI workflow on every new PR. Replace the suite_link
parameter to the suite with the suite you created in step 1.