feat: exploration - analysis of chat history and streamlit dashboard #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies and run AI regression tests with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: LLM regression tests | |
on: | |
# weekdays at 6am | |
schedule: | |
- cron: '0 6 * * 1-5' | |
# or on-demand | |
workflow_dispatch: | |
# or on push to main | |
push: | |
branches: | |
- 'main' | |
permissions: | |
contents: read | |
jobs: | |
ai-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- name: Set up Poetry | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: 1.7.0 | |
- name: Build containers | |
run: | | |
mkdir -p data/elastic/ | |
chmod 777 data/elastic/ | |
cp .env.test .env | |
echo AZURE_OPENAI_ENDPOINT=${{ secrets.AZURE_OPENAI_ENDPOINT }} >> .env | |
echo AZURE_OPENAI_API_KEY=${{ secrets.AZURE_OPENAI_API_KEY }} >> .env | |
echo AZURE_OPENAI_MODEL=azure/gpt-4 >> .env | |
echo OPENAI_API_VERSION=2024-02-01 >> .env | |
sed -i 's/^EMBEDDING_MODEL=.*/EMBEDDING_MODEL=all-mpnet-base-v2/' .env | |
docker compose up -d --wait elasticsearch | |
poetry install --no-root --no-ansi --with dev,ai,api --without worker | |
poetry run download-model --embedding_model all-mpnet-base-v2 | |
- name: Run DeepEval Unit Tests | |
run: poetry run deepeval test run core_api/tests/test_ai.py --mark ai |