Skip to content

Commit

Permalink
Merge branch 'main' into fix-litellm-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
lickem22 authored Feb 19, 2025
2 parents c2b4b53 + 6c07054 commit a154f85
Show file tree
Hide file tree
Showing 110 changed files with 9,336 additions and 3,464 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_push_admin_app.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Push Images
name: Build and Push Images admin app
on:
release:
types: [released]
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/deploy_gcp_core_backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
id: "secrets"
uses: "google-github-actions/get-secretmanager-secrets@v2"
with:
secrets: |- #pragma: allowlist secret
domain:${{ secrets.GCP_PROJECT_ID }}/${{ env.RESOURCE_PREFIX }}-domain
secrets: |-
domain:${{ secrets.GCP_PROJECT_ID }}/${{ env.RESOURCE_PREFIX }}-domain
jwt-secret:${{ secrets.GCP_PROJECT_ID }}/${{ env.RESOURCE_PREFIX }}-jwt-secret
google-login-client-id:${{ secrets.GCP_PROJECT_ID }}/${{ env.RESOURCE_PREFIX }}-google-login-client-id
langfuse-secret-key:${{ secrets.GCP_PROJECT_ID }}/${{ env.RESOURCE_PREFIX }}-langfuse-secret-key
Expand All @@ -70,8 +70,6 @@ jobs:
admin-password:${{ secrets.GCP_PROJECT_ID }}/${{ env.RESOURCE_PREFIX }}-admin-password
admin-api-key:${{ secrets.GCP_PROJECT_ID }}/${{ env.RESOURCE_PREFIX }}-admin-api-key
gcp-credential-json:${{ secrets.GCP_PROJECT_ID }}/${{ env.RESOURCE_PREFIX }}-gcp-credential-json
litellm-endpoint:${{ secrets.GCP_PROJECT_ID }}/${{ env.RESOURCE_PREFIX }}-litellm-endpoint
litellm-api-key:${{ secrets.GCP_PROJECT_ID }}/${{ env.RESOURCE_PREFIX }}-litellm-api-key
- name: Copy GCP credentials JSON
working-directory: deployment/docker-compose
Expand Down Expand Up @@ -127,8 +125,7 @@ jobs:
-e ADMIN_PASSWORD="${{ steps.secrets.outputs.admin-password }}" \
-e ADMIN_API_KEY="${{ steps.secrets.outputs.admin-api-key }}" \
-e PROMETHEUS_MULTIPROC_DIR=/tmp \
-e LITELLM_ENDPOINT="${{ steps.secrets.outputs.litellm-endpoint }}" \
-e LITELLM_API_KEY="${{ steps.secrets.outputs.litellm-api-key }}" \
-e LITELLM_ENDPOINT=http://litellm_proxy:4000 \
-e GOOGLE_APPLICATION_CREDENTIALS=/app/credentials.json \
-e URGENCY_CLASSIFIER="cosine_distance_classifier" \
-e REDIS_HOST=redis://redis:6379 \
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy_gcp_litellm_proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
contents: "read"
id-token: "write"

environment: mc-aaq-${{ needs.set-env.outputs.env_name }}

env:
RESOURCE_PREFIX: ${{ secrets.PROJECT_NAME }}-${{ needs.set-env.outputs.env_name }}
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/test_speech_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ on:
- "**"
paths:
- "optional_components/speech_api/**"
- ".github/workflows/test_speech_api.yaml"

env:
PREFERRED_MODEL: base
WHISPER_MODEL_DIR: whisper_models
PIPER_MODELS_DIR: models/piper
ENG_MODEL_NAME: en_US-arctic-medium.onnx
SWAHILI_MODEL_NAME: sw_CD-lanfrica-medium.onnx

jobs:
test:
Expand All @@ -31,20 +35,13 @@ jobs:
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r optional_components/speech_api/requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu
python -m pip install -r requirements-dev.txt
python -m pip install pytest
- name: Run Speech Unit Tests
env:
PREFERRED_MODEL: ${{ env.PREFERRED_MODEL }}
WHISPER_MODEL_DIR: ${{ env.WHISPER_MODEL_DIR }}
PIPER_MODELS_DIR: ${{ env.PIPER_MODELS_DIR }}
ENG_MODEL_NAME: ${{ env.ENG_MODEL_NAME }}
SWAHILI_MODEL_NAME: ${{ env.SWAHILI_MODEL_NAME }}
run: |
mkdir -p $WHISPER_MODEL_DIR
cd optional_components/speech_api
python -m pytest
cd ../..
rm -rf $WHISPER_MODEL_DIR
make tests
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ repos:
hooks:
- id: mypy
exclude: ^data/|^scripts/
additional_dependencies: [types-PyYAML==6.0.12.12, types-python-dateutil, redis]
additional_dependencies:
[types-PyYAML==6.0.12.12, types-python-dateutil, redis, types-requests]
args: [--ignore-missing-imports, --explicit-package-base]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3" # Use the sha / tag you want to point at
Expand Down
26 changes: 13 additions & 13 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -309,49 +309,49 @@
"filename": "core_backend/tests/api/conftest.py",
"hashed_secret": "407c6798fe20fd5d75de4a233c156cc0fce510e3",
"is_verified": false,
"line_number": 44
"line_number": 46
},
{
"type": "Secret Keyword",
"filename": "core_backend/tests/api/conftest.py",
"hashed_secret": "42553e798bc193bcf25368b5e53ec7cd771483a7",
"is_verified": false,
"line_number": 45
"line_number": 47
},
{
"type": "Secret Keyword",
"filename": "core_backend/tests/api/conftest.py",
"hashed_secret": "9fb7fe1217aed442b04c0f5e43b5d5a7d3287097",
"is_verified": false,
"line_number": 48
"line_number": 50
},
{
"type": "Secret Keyword",
"filename": "core_backend/tests/api/conftest.py",
"hashed_secret": "767ef7376d44bb6e52b390ddcd12c1cb1b3902a4",
"is_verified": false,
"line_number": 49
"line_number": 51
},
{
"type": "Secret Keyword",
"filename": "core_backend/tests/api/conftest.py",
"hashed_secret": "70240b5d0947cc97447de496284791c12b2e678a",
"is_verified": false,
"line_number": 54
"line_number": 56
},
{
"type": "Secret Keyword",
"filename": "core_backend/tests/api/conftest.py",
"hashed_secret": "80fea3e25cb7e28550d13af9dfda7a9bd08c1a78",
"is_verified": false,
"line_number": 55
"line_number": 57
},
{
"type": "Secret Keyword",
"filename": "core_backend/tests/api/conftest.py",
"hashed_secret": "3465834d516797458465ae4ed2c62e7020032c4e",
"is_verified": false,
"line_number": 316
"line_number": 318
}
],
"core_backend/tests/api/test.env": [
Expand All @@ -369,14 +369,14 @@
"filename": "core_backend/tests/api/test_dashboard_overview.py",
"hashed_secret": "233243ef95e736679cb1d5664a4c71ba89c10664",
"is_verified": false,
"line_number": 154
"line_number": 155
},
{
"type": "Secret Keyword",
"filename": "core_backend/tests/api/test_dashboard_overview.py",
"hashed_secret": "6367c48dd193d56ea7b0baad25b19455e529f5ee",
"is_verified": false,
"line_number": 290
"line_number": 291
}
],
"core_backend/tests/api/test_dashboard_performance.py": [
Expand All @@ -403,14 +403,14 @@
"filename": "core_backend/tests/api/test_question_answer.py",
"hashed_secret": "1d2be5ef28a76e2207456e7eceabe1219305e43d",
"is_verified": false,
"line_number": 295
"line_number": 294
},
{
"type": "Secret Keyword",
"filename": "core_backend/tests/api/test_question_answer.py",
"hashed_secret": "6367c48dd193d56ea7b0baad25b19455e529f5ee",
"is_verified": false,
"line_number": 648
"line_number": 660
}
],
"core_backend/tests/api/test_user_tools.py": [
Expand All @@ -419,7 +419,7 @@
"filename": "core_backend/tests/api/test_user_tools.py",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 47
"line_number": 70
}
],
"core_backend/tests/rails/test_language_identification.py": [
Expand Down Expand Up @@ -550,5 +550,5 @@
}
]
},
"generated_at": "2024-10-29T14:53:14Z"
"generated_at": "2025-02-18T19:32:13Z"
}
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ fresh-env :
fi

# Dev requirements
setup-dev: setup-db setup-redis #setup-embeddings-arm
teardown-dev: teardown-db teardown-redis teardown-embeddings
setup-dev: setup-db setup-redis setup-llm-proxy #setup-embeddings-arm
teardown-dev: teardown-db teardown-redis teardown-embeddings teardown-llm-proxy

## Helper targets
guard-%:
Expand Down
Loading

0 comments on commit a154f85

Please sign in to comment.