Skip to content

feat: compress context even more to 54k token #44

feat: compress context even more to 54k token

feat: compress context even more to 54k token #44

Workflow file for this run

name: Backend CI
on:
push:
branches:
- main # Runs on every push to the main branch
pull_request:
branches:
- main # Runs on PR to the main branch
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.poetry/bin:$PATH" # Ensure Poetry is in the PATH
- name: Change to Backend Directory
run: cd backend # Change to the backend folder
- name: Install dependencies with Poetry
run: |
cd backend # Change to the backend folder again if needed
poetry install --no-root # Install the dependencies using Poetry
- name: Create .env file with GitHub Secrets
run: |
echo "FRONTEND_URL=${{ secrets.FRONTEND_URL }}" >> backend/app/.env
# LLM Provider
echo "PROVIDER=${{ secrets.PROVIDER }}" >> backend/app/.env
# Azure OpenAI Configuration
echo "AZURE_API_VERSION=${{ secrets.AZURE_API_VERSION }}" >> backend/app/.env
echo "AZURE_ENDPOINT=${{ secrets.AZURE_ENDPOINT }}" >> backend/app/.env
echo "AZURE_API_KEY=${{ secrets.AZURE_API_KEY }}" >> backend/app/.env
echo "AZURE_DEPLOYMENT_NAME=${{ secrets.AZURE_DEPLOYMENT_NAME }}" >> backend/app/.env
echo "AZURE_EMBEDDING_DEPLOYMENT_NAME=${{ secrets.AZURE_EMBEDDING_DEPLOYMENT_NAME }}" >> backend/app/.env
# Qdrant Configuration
echo "QDRANT_URL=${{ secrets.QDRANT_URL }}" >> backend/app/.env
echo "QDRANT_COLLECTION_NAME=${{ secrets.QDRANT_COLLECTION_NAME }}" >> backend/app/.env
# Langfuse Configuration
echo "LANGFUSE_SECRET_KEY=${{ secrets.LANGFUSE_SECRET_KEY }}" >> backend/app/.env
echo "LANGFUSE_PUBLIC_KEY=${{ secrets.LANGFUSE_PUBLIC_KEY }}" >> backend/app/.env
echo "LANGFUSE_HOST=${{ secrets.LANGFUSE_HOST }}" >> backend/app/.env
- name: Run Tests with Poetry
run: |
cd backend/app
poetry run pytest tests/ --maxfail=1 --disable-warnings -q