Skip to content

Commit b0bfdb0

Browse files
authored
Merge branch 'main' into main
2 parents ee8aa91 + 3d6a770 commit b0bfdb0

File tree

478 files changed

+31363
-9408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

478 files changed

+31363
-9408
lines changed

.github/workflows/contrib-openai.yml

+2-78
Original file line numberDiff line numberDiff line change
@@ -111,46 +111,7 @@ jobs:
111111
with:
112112
file: ./coverage.xml
113113
flags: unittests
114-
CompressionTest:
115-
strategy:
116-
matrix:
117-
os: [ubuntu-latest]
118-
python-version: ["3.9"]
119-
runs-on: ${{ matrix.os }}
120-
environment: openai1
121-
steps:
122-
# checkout to pr branch
123-
- name: Checkout
124-
uses: actions/checkout@v4
125-
with:
126-
ref: ${{ github.event.pull_request.head.sha }}
127-
- name: Set up Python ${{ matrix.python-version }}
128-
uses: actions/setup-python@v5
129-
with:
130-
python-version: ${{ matrix.python-version }}
131-
- name: Install packages and dependencies
132-
run: |
133-
docker --version
134-
python -m pip install --upgrade pip wheel
135-
pip install -e .
136-
python -c "import autogen"
137-
pip install pytest-cov>=5 pytest-asyncio
138-
- name: Install packages for test when needed
139-
run: |
140-
pip install docker
141-
- name: Coverage
142-
env:
143-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
144-
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
145-
AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }}
146-
OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }}
147-
run: |
148-
pytest test/agentchat/contrib/test_compressible_agent.py
149-
- name: Upload coverage to Codecov
150-
uses: codecov/codecov-action@v3
151-
with:
152-
file: ./coverage.xml
153-
flags: unittests
114+
154115
GPTAssistantAgent:
155116
strategy:
156117
matrix:
@@ -306,44 +267,7 @@ jobs:
306267
with:
307268
file: ./coverage.xml
308269
flags: unittests
309-
ContextHandling:
310-
strategy:
311-
matrix:
312-
os: [ubuntu-latest]
313-
python-version: ["3.11"]
314-
runs-on: ${{ matrix.os }}
315-
environment: openai1
316-
steps:
317-
# checkout to pr branch
318-
- name: Checkout
319-
uses: actions/checkout@v4
320-
with:
321-
ref: ${{ github.event.pull_request.head.sha }}
322-
- name: Set up Python ${{ matrix.python-version }}
323-
uses: actions/setup-python@v5
324-
with:
325-
python-version: ${{ matrix.python-version }}
326-
- name: Install packages and dependencies
327-
run: |
328-
docker --version
329-
python -m pip install --upgrade pip wheel
330-
pip install -e .
331-
python -c "import autogen"
332-
pip install pytest-cov>=5
333-
- name: Coverage
334-
env:
335-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
336-
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
337-
AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }}
338-
OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }}
339-
BING_API_KEY: ${{ secrets.BING_API_KEY }}
340-
run: |
341-
pytest test/agentchat/contrib/capabilities/test_context_handling.py
342-
- name: Upload coverage to Codecov
343-
uses: codecov/codecov-action@v3
344-
with:
345-
file: ./coverage.xml
346-
flags: unittests
270+
347271
ImageGen:
348272
strategy:
349273
matrix:

.github/workflows/contrib-tests.yml

+125-71
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
paths:
1010
- "autogen/**"
1111
- "test/agentchat/contrib/**"
12+
- "test/test_browser_utils.py"
13+
- "test/test_retrieve_utils.py"
1214
- ".github/workflows/contrib-tests.yml"
1315
- "setup.py"
1416

@@ -85,6 +87,10 @@ jobs:
8587
--health-retries 5
8688
ports:
8789
- 5432:5432
90+
mongodb:
91+
image: mongodb/mongodb-atlas-local:latest
92+
ports:
93+
- 27017:27017
8894
steps:
8995
- uses: actions/checkout@v4
9096
- name: Set up Python ${{ matrix.python-version }}
@@ -102,6 +108,9 @@ jobs:
102108
- name: Install pgvector when on linux
103109
run: |
104110
pip install -e .[retrievechat-pgvector]
111+
- name: Install mongodb when on linux
112+
run: |
113+
pip install -e .[retrievechat-mongodb]
105114
- name: Install unstructured when python-version is 3.9 and on linux
106115
if: matrix.python-version == '3.9'
107116
run: |
@@ -154,41 +163,6 @@ jobs:
154163
file: ./coverage.xml
155164
flags: unittests
156165

157-
CompressionTest:
158-
runs-on: ${{ matrix.os }}
159-
strategy:
160-
fail-fast: false
161-
matrix:
162-
os: [ubuntu-latest, macos-latest, windows-2019]
163-
python-version: ["3.10"]
164-
steps:
165-
- uses: actions/checkout@v4
166-
- name: Set up Python ${{ matrix.python-version }}
167-
uses: actions/setup-python@v5
168-
with:
169-
python-version: ${{ matrix.python-version }}
170-
- name: Install packages and dependencies for all tests
171-
run: |
172-
python -m pip install --upgrade pip wheel
173-
pip install pytest-cov>=5
174-
- name: Install packages and dependencies for Compression
175-
run: |
176-
pip install -e .
177-
- name: Set AUTOGEN_USE_DOCKER based on OS
178-
shell: bash
179-
run: |
180-
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
181-
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
182-
fi
183-
- name: Coverage
184-
run: |
185-
pytest test/agentchat/contrib/test_compressible_agent.py --skip-openai
186-
- name: Upload coverage to Codecov
187-
uses: codecov/codecov-action@v3
188-
with:
189-
file: ./coverage.xml
190-
flags: unittests
191-
192166
GPTAssistantAgent:
193167
runs-on: ${{ matrix.os }}
194168
strategy:
@@ -375,41 +349,6 @@ jobs:
375349
file: ./coverage.xml
376350
flags: unittests
377351

378-
ContextHandling:
379-
runs-on: ${{ matrix.os }}
380-
strategy:
381-
fail-fast: false
382-
matrix:
383-
os: [ubuntu-latest, macos-latest, windows-2019]
384-
python-version: ["3.11"]
385-
steps:
386-
- uses: actions/checkout@v4
387-
- name: Set up Python ${{ matrix.python-version }}
388-
uses: actions/setup-python@v5
389-
with:
390-
python-version: ${{ matrix.python-version }}
391-
- name: Install packages and dependencies for all tests
392-
run: |
393-
python -m pip install --upgrade pip wheel
394-
pip install pytest-cov>=5
395-
- name: Install packages and dependencies for Context Handling
396-
run: |
397-
pip install -e .
398-
- name: Set AUTOGEN_USE_DOCKER based on OS
399-
shell: bash
400-
run: |
401-
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
402-
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
403-
fi
404-
- name: Coverage
405-
run: |
406-
pytest test/agentchat/contrib/capabilities/test_context_handling.py --skip-openai
407-
- name: Upload coverage to Codecov
408-
uses: codecov/codecov-action@v3
409-
with:
410-
file: ./coverage.xml
411-
flags: unittests
412-
413352
TransformMessages:
414353
runs-on: ${{ matrix.os }}
415354
strategy:
@@ -476,7 +415,6 @@ jobs:
476415
file: ./coverage.xml
477416
flags: unittests
478417

479-
480418
AnthropicTest:
481419
runs-on: ${{ matrix.os }}
482420
strategy:
@@ -598,3 +536,119 @@ jobs:
598536
with:
599537
file: ./coverage.xml
600538
flags: unittests
539+
540+
GroqTest:
541+
runs-on: ${{ matrix.os }}
542+
strategy:
543+
fail-fast: false
544+
matrix:
545+
os: [ubuntu-latest, macos-latest, windows-2019]
546+
python-version: ["3.9", "3.10", "3.11", "3.12"]
547+
exclude:
548+
- os: macos-latest
549+
python-version: "3.9"
550+
steps:
551+
- uses: actions/checkout@v4
552+
with:
553+
lfs: true
554+
- name: Set up Python ${{ matrix.python-version }}
555+
uses: actions/setup-python@v5
556+
with:
557+
python-version: ${{ matrix.python-version }}
558+
- name: Install packages and dependencies for all tests
559+
run: |
560+
python -m pip install --upgrade pip wheel
561+
pip install pytest-cov>=5
562+
- name: Install packages and dependencies for Groq
563+
run: |
564+
pip install -e .[groq,test]
565+
- name: Set AUTOGEN_USE_DOCKER based on OS
566+
shell: bash
567+
run: |
568+
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
569+
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
570+
fi
571+
- name: Coverage
572+
run: |
573+
pytest test/oai/test_groq.py --skip-openai
574+
- name: Upload coverage to Codecov
575+
uses: codecov/codecov-action@v3
576+
with:
577+
file: ./coverage.xml
578+
flags: unittests
579+
580+
CohereTest:
581+
runs-on: ${{ matrix.os }}
582+
strategy:
583+
matrix:
584+
os: [ubuntu-latest, macos-latest, windows-latest]
585+
python-version: ["3.9", "3.10", "3.11", "3.12"]
586+
steps:
587+
- uses: actions/checkout@v4
588+
with:
589+
lfs: true
590+
- name: Set up Python ${{ matrix.python-version }}
591+
uses: actions/setup-python@v5
592+
with:
593+
python-version: ${{ matrix.python-version }}
594+
- name: Install packages and dependencies for all tests
595+
run: |
596+
python -m pip install --upgrade pip wheel
597+
pip install pytest-cov>=5
598+
- name: Install packages and dependencies for Cohere
599+
run: |
600+
pip install -e .[cohere,test]
601+
- name: Set AUTOGEN_USE_DOCKER based on OS
602+
shell: bash
603+
run: |
604+
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
605+
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
606+
fi
607+
- name: Coverage
608+
run: |
609+
pytest test/oai/test_cohere.py --skip-openai
610+
- name: Upload coverage to Codecov
611+
uses: codecov/codecov-action@v3
612+
with:
613+
file: ./coverage.xml
614+
flags: unittests
615+
616+
BedrockTest:
617+
runs-on: ${{ matrix.os }}
618+
strategy:
619+
fail-fast: false
620+
matrix:
621+
os: [ubuntu-latest, macos-latest, windows-2019]
622+
python-version: ["3.9", "3.10", "3.11", "3.12"]
623+
exclude:
624+
- os: macos-latest
625+
python-version: "3.9"
626+
steps:
627+
- uses: actions/checkout@v4
628+
with:
629+
lfs: true
630+
- name: Set up Python ${{ matrix.python-version }}
631+
uses: actions/setup-python@v5
632+
with:
633+
python-version: ${{ matrix.python-version }}
634+
- name: Install packages and dependencies for all tests
635+
run: |
636+
python -m pip install --upgrade pip wheel
637+
pip install pytest-cov>=5
638+
- name: Install packages and dependencies for Amazon Bedrock
639+
run: |
640+
pip install -e .[boto3,test]
641+
- name: Set AUTOGEN_USE_DOCKER based on OS
642+
shell: bash
643+
run: |
644+
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
645+
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
646+
fi
647+
- name: Coverage
648+
run: |
649+
pytest test/oai/test_bedrock.py --skip-openai
650+
- name: Upload coverage to Codecov
651+
uses: codecov/codecov-action@v3
652+
with:
653+
file: ./coverage.xml
654+
flags: unittests

0 commit comments

Comments
 (0)