Skip to content

Commit

Permalink
Merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
brightsparc committed Jan 1, 2025
2 parents fcca167 + 1ab8d88 commit f095989
Show file tree
Hide file tree
Showing 215 changed files with 9,648 additions and 2,629 deletions.
5 changes: 0 additions & 5 deletions .changeset/chatty-grapes-scream.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/famous-meals-sell.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/moody-snails-serve.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/tall-garlics-carry.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/tough-boats-appear.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/warm-zoos-lie.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/witty-months-train.md

This file was deleted.

21 changes: 3 additions & 18 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,7 @@ on:
jobs:
build_plugins:
runs-on: ubuntu-latest
if: |
inputs.package == 'livekit-agents' ||
inputs.package == 'livekit-plugins-assemblyai' ||
inputs.package == 'livekit-plugins-azure' ||
inputs.package == 'livekit-plugins-cartesia' ||
inputs.package == 'livekit-plugins-deepgram' ||
inputs.package == 'livekit-plugins-elevenlabs' ||
inputs.package == 'livekit-plugins-google' ||
inputs.package == 'livekit-plugins-minimal' ||
inputs.package == 'livekit-plugins-nltk' ||
inputs.package == 'livekit-plugins-openai' ||
inputs.package == 'livekit-plugins-rag' ||
inputs.package == 'livekit-plugins-silero' ||
inputs.package == 'livekit-plugins-anthropic' ||
inputs.package == 'livekit-plugins-llama-index'
if: inputs.package != 'livekit-plugins-browser'
defaults:
run:
working-directory: "${{ startsWith(inputs.package, 'livekit-plugin') && 'livekit-plugins/' || '' }}${{ inputs.package }}"
Expand All @@ -62,7 +47,7 @@ jobs:
run: python -m build

- name: Upload distribution package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: "${{ startsWith(inputs.package, 'livekit-plugin') && 'livekit-plugins/' || '' }}${{ inputs.package }}/dist/"
Expand Down Expand Up @@ -97,7 +82,7 @@ jobs:
CIBW_BUILD_VERBOSITY: 3

- name: Upload distribution package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: livekit-plugins/livekit-plugins-browser/dist/
20 changes: 5 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,8 @@ jobs:

- name: Install all packages
run: |
pip install ./livekit-agents \
./livekit-plugins/livekit-plugins-openai \
./livekit-plugins/livekit-plugins-deepgram \
./livekit-plugins/livekit-plugins-google \
./livekit-plugins/livekit-plugins-nltk \
./livekit-plugins/livekit-plugins-silero \
./livekit-plugins/livekit-plugins-elevenlabs \
./livekit-plugins/livekit-plugins-cartesia \
./livekit-plugins/livekit-plugins-rag \
./livekit-plugins/livekit-plugins-azure \
./livekit-plugins/livekit-plugins-anthropic \
./livekit-plugins/livekit-plugins-llama-index \
./livekit-plugins/livekit-plugins-fal
pip install ./livekit-agents
./livekit-plugins/install_local.sh
- name: Install stub packages
run: |
Expand Down Expand Up @@ -90,5 +79,6 @@ jobs:
-p livekit.plugins.rag \
-p livekit.plugins.azure \
-p livekit.plugins.anthropic \
-p livekit.plugins.fal
-p livekit.plugins.fal \
-p livekit.plugins.playai \
-p livekit.plugins.assemblyai
24 changes: 11 additions & 13 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12" # Specify the Python version you want to use
python-version: "3.12"

- name: Create and activate virtual environment
run: |
Expand All @@ -34,18 +34,8 @@ jobs:
- name: Install package
run: |
source venv/bin/activate
python -m pip install ./livekit-agents \
./livekit-plugins/livekit-plugins-anthropic \
./livekit-plugins/livekit-plugins-azure \
./livekit-plugins/livekit-plugins-cartesia \
./livekit-plugins/livekit-plugins-deepgram \
./livekit-plugins/livekit-plugins-elevenlabs \
./livekit-plugins/livekit-plugins-google \
./livekit-plugins/livekit-plugins-nltk \
./livekit-plugins/livekit-plugins-openai \
./livekit-plugins/livekit-plugins-rag \
./livekit-plugins/livekit-plugins-silero \
./livekit-plugins/livekit-plugins-llama-index
pip install ./livekit-agents
./livekit-plugins/install_local.sh
- name: Build Docs
run: |
Expand All @@ -60,3 +50,11 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
AWS_DEFAULT_REGION: "us-east-1"

- name: Expire cloudfront cache
run: |
aws cloudfront create-invalidation --distribution-id EJJ40KLJ3TRY9 --paths "/python/*"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
AWS_DEFAULT_REGION: "us-east-1"
18 changes: 9 additions & 9 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ jobs:
with:
submodules: true
lfs: true
env:
GITHUB_TOKEN: ${{ secrets.CHANGESETS_PUSH_PAT }}
ssh-key: ${{ secrets.CHANGESETS_PUSH_DEPLOY_KEY }}

- uses: pnpm/action-setup@v4
- name: Use Node.js 20
Expand Down Expand Up @@ -84,7 +83,7 @@ jobs:
uses: livekit/agents/.github/workflows/build-package.yml@main
with:
package: ${{ matrix.package.name }}
artifact_name: python-package-distributions
artifact_name: python-package-dist-${{matrix.package.name}}

publish:
needs:
Expand All @@ -96,10 +95,11 @@ jobs:

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
path: dist
pattern: python-package-dist-*
merge-multiple: true

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
Expand All @@ -108,9 +108,9 @@ jobs:
password: ${{ secrets.PYPI_API_TOKEN }}

trigger-docs-publish:
name: Publish Docs
name: Publish Docs
needs: publish
uses: ./.github/workflows/publish-docs.yml
secrets:
DOCS_DEPLOY_AWS_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
DOCS_DEPLOY_AWS_API_SECRET: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
DOCS_DEPLOY_AWS_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
DOCS_DEPLOY_AWS_API_SECRET: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
42 changes: 21 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,26 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-14-large, macos-14, windows-2019, ubuntu-20.04, namespace-profile-default-arm64]
os: [
# disabled Intel Macs due to pytorch 2.3+ not supporting it
# macos-14-large,
macos-14,
windows-2019,
ubuntu-20.04,
namespace-profile-default-arm64,
]
python_version: ["3.9", "3.12"]
test_group: ["base"]
include:
# Include llm, stt, and tts tests only on Ubuntu 20.04 with Python 3.9
- os: ubuntu-20.04
python_version: "3.9"
python_version: "3.12"
test_group: llm
- os: ubuntu-20.04
python_version: "3.9"
python_version: "3.12"
test_group: stt
- os: ubuntu-20.04
python_version: "3.9"
python_version: "3.12"
test_group: tts

runs-on: ${{ matrix.os }}
Expand All @@ -54,7 +61,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: ${{ matrix.python_version }}
cache: "pip"

- name: Install ffmpeg (Linux)
Expand All @@ -70,6 +77,7 @@ jobs:
sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1_arm64.deb
sudo dpkg -i libssl-dev_1.1.1-1ubuntu2.1_arm64.deb
- name: Install ffmpeg (macOS)
if: ${{ startsWith(matrix.os, 'macos') }}
run: brew install ffmpeg
Expand All @@ -81,20 +89,9 @@ jobs:
- name: Install packages
shell: bash
run: |
pip3 install pytest pytest-asyncio pytest-timeout './livekit-agents[codecs]' psutil
pip3 install -r ./tests/test-requirements.txt
pip3 install ./livekit-agents \
./livekit-plugins/livekit-plugins-openai \
./livekit-plugins/livekit-plugins-deepgram \
./livekit-plugins/livekit-plugins-google \
./livekit-plugins/livekit-plugins-nltk \
./livekit-plugins/livekit-plugins-silero \
./livekit-plugins/livekit-plugins-elevenlabs \
./livekit-plugins/livekit-plugins-cartesia \
./livekit-plugins/livekit-plugins-azure \
./livekit-plugins/livekit-plugins-anthropic \
./livekit-plugins/livekit-plugins-assemblyai \
./livekit-plugins/livekit-plugins-fal
pip install pytest pytest-asyncio pytest-timeout './livekit-agents[codecs]' psutil
pip install -r ./tests/test-requirements.txt
./livekit-plugins/install_local.sh
- name: Run tests
shell: bash
Expand All @@ -110,8 +107,11 @@ jobs:
AZURE_SPEECH_REGION: ${{ secrets.AZURE_SPEECH_REGION }} # nit: doesn't have to be secret
GOOGLE_CREDENTIALS_JSON: ${{ secrets.GOOGLE_CREDENTIALS_JSON }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
ASSEMBLYAI_API_KEY: ${{ secrets.ASSEMBLYAI_API_KEY }}
FAL_KEY: ${{ secrets.FAL_KEY }}
PLAYHT_API_KEY: ${{ secrets.PLAYHT_API_KEY }}
PLAYHT_USER_ID: ${{ secrets.PLAYHT_USER_ID }}
GOOGLE_APPLICATION_CREDENTIALS: google.json
PYTEST_ADDOPTS: "--color=yes"
working-directory: tests
Expand All @@ -120,7 +120,7 @@ jobs:
case "${{ matrix.test_group }}" in
base)
test_files="test_aio.py test_tokenizer.py test_vad.py test_ipc.py test_fallback.py"
test_files="test_aio.py test_tokenizer.py test_vad.py test_ipc.py test_tts_fallback.py test_stt_fallback.py test_message_change.py test_build_func_desc.py test_create_func.py"
;;
llm)
test_files="test_llm.py"
Expand All @@ -136,4 +136,4 @@ jobs:
exit 1
;;
esac
pytest --asyncio-mode=auto --timeout=60 $test_files
pytest $test_files
Loading

0 comments on commit f095989

Please sign in to comment.