Re-query speaker name when multiple speaker names returned during Group Chat speaker selection #4114
Workflow file for this run
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, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: ContribTests | |
on: | |
pull_request: | |
branches: ["main"] | |
paths: | |
- "autogen/**" | |
- "test/agentchat/contrib/**" | |
- ".github/workflows/contrib-tests.yml" | |
- "setup.py" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
permissions: | |
{} | |
# actions: read | |
# checks: read | |
# contents: read | |
# deployments: read | |
jobs: | |
RetrieveChatTest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-2019] | |
python-version: ["3.9", "3.10", "3.11"] | |
exclude: | |
- os: macos-latest | |
python-version: "3.9" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages and dependencies for all tests | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install pytest-cov>=5 | |
- name: Install qdrant_client when python-version is 3.10 | |
if: matrix.python-version == '3.10' | |
run: | | |
pip install -e .[retrievechat-qdrant] | |
- name: Install packages and dependencies for RetrieveChat | |
run: | | |
pip install -e .[retrievechat] | |
- name: Set AUTOGEN_USE_DOCKER based on OS | |
shell: bash | |
run: | | |
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then | |
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV | |
fi | |
- name: Coverage | |
run: | | |
pytest test/test_retrieve_utils.py test/agentchat/contrib/retrievechat/test_retrievechat.py test/agentchat/contrib/retrievechat/test_qdrant_retrievechat.py test/agentchat/contrib/vectordb --skip-openai | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
RetrieveChatTest-Ubuntu: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
services: | |
pgvector: | |
image: ankane/pgvector | |
env: | |
POSTGRES_DB: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
POSTGRES_HOST_AUTH_METHOD: trust | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages and dependencies for all tests | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install pytest | |
- name: Install qdrant_client when python-version is 3.10 | |
if: matrix.python-version == '3.10' | |
run: | | |
pip install -e .[retrievechat-qdrant] | |
- name: Install pgvector when on linux | |
run: | | |
pip install -e .[retrievechat-pgvector] | |
- name: Install unstructured when python-version is 3.9 and on linux | |
if: matrix.python-version == '3.9' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y tesseract-ocr poppler-utils | |
pip install unstructured[all-docs]==0.13.0 | |
- name: Install packages and dependencies for RetrieveChat | |
run: | | |
pip install -e .[retrievechat] | |
- name: Set AUTOGEN_USE_DOCKER based on OS | |
shell: bash | |
run: | | |
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV | |
- name: Coverage | |
run: | | |
pip install pytest-cov>=5 | |
pytest test/test_retrieve_utils.py test/agentchat/contrib/retrievechat test/agentchat/contrib/vectordb --skip-openai | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
CompressionTest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-2019] | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages and dependencies for all tests | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install pytest-cov>=5 | |
- name: Install packages and dependencies for Compression | |
run: | | |
pip install -e . | |
- name: Set AUTOGEN_USE_DOCKER based on OS | |
shell: bash | |
run: | | |
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then | |
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV | |
fi | |
- name: Coverage | |
run: | | |
pytest test/agentchat/contrib/test_compressible_agent.py --skip-openai | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
GPTAssistantAgent: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-2019] | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages and dependencies for all tests | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install pytest-cov>=5 | |
- name: Install packages and dependencies for GPTAssistantAgent | |
run: | | |
pip install -e . | |
- name: Set AUTOGEN_USE_DOCKER based on OS | |
shell: bash | |
run: | | |
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then | |
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV | |
fi | |
- name: Coverage | |
run: | | |
pytest test/agentchat/contrib/test_gpt_assistant.py --skip-openai | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
TeachableAgent: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-2019] | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages and dependencies for all tests | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install pytest-cov>=5 | |
- name: Install packages and dependencies for Teachability | |
run: | | |
pip install -e .[teachable] | |
- name: Set AUTOGEN_USE_DOCKER based on OS | |
shell: bash | |
run: | | |
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then | |
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV | |
fi | |
- name: Coverage | |
run: | | |
pytest test/agentchat/contrib/capabilities/test_teachable_agent.py --skip-openai | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
WebSurfer: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-2019] | |
python-version: ["3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages and dependencies for all tests | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install pytest-cov>=5 | |
- name: Install packages and dependencies for WebSurfer | |
run: | | |
pip install -e .[websurfer] | |
- name: Set AUTOGEN_USE_DOCKER based on OS | |
shell: bash | |
run: | | |
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then | |
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV | |
fi | |
- name: Coverage | |
run: | | |
pytest test/test_browser_utils.py test/agentchat/contrib/test_web_surfer.py --skip-openai | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
LMMTest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-2019] | |
python-version: ["3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages and dependencies for all tests | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install pytest-cov>=5 | |
- name: Install packages and dependencies for LMM | |
run: | | |
pip install -e .[lmm] | |
- name: Set AUTOGEN_USE_DOCKER based on OS | |
shell: bash | |
run: | | |
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then | |
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV | |
fi | |
- name: Coverage | |
run: | | |
pytest test/agentchat/contrib/test_img_utils.py test/agentchat/contrib/test_lmm.py test/agentchat/contrib/test_llava.py test/agentchat/contrib/capabilities/test_vision_capability.py --skip-openai | |
- name: Image Gen Coverage | |
if: ${{ matrix.os != 'windows-2019' && matrix.python-version != '3.12' }} | |
run: | | |
pytest test/agentchat/contrib/capabilities/test_image_generation_capability.py --skip-openai | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
GeminiTest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-2019] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
exclude: | |
- os: macos-latest | |
python-version: "3.9" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages and dependencies for all tests | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install pytest-cov>=5 | |
- name: Install packages and dependencies for Gemini | |
run: | | |
pip install -e .[gemini,test] | |
- name: Set AUTOGEN_USE_DOCKER based on OS | |
shell: bash | |
run: | | |
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then | |
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV | |
fi | |
- name: Coverage | |
run: | | |
pytest test/oai/test_gemini.py --skip-openai | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
ContextHandling: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-2019] | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages and dependencies for all tests | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install pytest-cov>=5 | |
- name: Install packages and dependencies for Context Handling | |
run: | | |
pip install -e . | |
- name: Set AUTOGEN_USE_DOCKER based on OS | |
shell: bash | |
run: | | |
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then | |
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV | |
fi | |
- name: Coverage | |
run: | | |
pytest test/agentchat/contrib/capabilities/test_context_handling.py --skip-openai | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
TransformMessages: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-2019] | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages and dependencies for all tests | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install pytest-cov>=5 | |
- name: Install packages and dependencies for Transform Messages | |
run: | | |
pip install -e . | |
- name: Set AUTOGEN_USE_DOCKER based on OS | |
shell: bash | |
run: | | |
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then | |
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV | |
fi | |
- name: Coverage | |
run: | | |
pytest test/agentchat/contrib/capabilities/test_transform_messages.py --skip-openai | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittest |