Skip to content

Commit 841ed31

Browse files
authored
Merge branch 'main' into main
2 parents 3e7cf18 + af9b300 commit 841ed31

File tree

339 files changed

+32866
-8769
lines changed

Some content is hidden

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

339 files changed

+32866
-8769
lines changed

.devcontainer/Dockerfile

+11-5
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,24 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:3.10
99
# Update the OS and maybe install packages
1010
#
1111
ENV DEBIAN_FRONTEND=noninteractive
12+
13+
# add git lhs to apt
14+
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
15+
1216
RUN apt-get update \
1317
&& apt-get upgrade -y \
14-
&& apt-get -y install --no-install-recommends build-essential npm \
18+
&& apt-get -y install --no-install-recommends build-essential npm git-lfs \
1519
&& apt-get autoremove -y \
1620
&& apt-get clean -y \
17-
&& wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.4.549/quarto-1.4.549-linux-amd64.deb \
18-
&& dpkg -i quarto-1.4.549-linux-amd64.deb \
19-
&& rm -rf /var/lib/apt/lists/* quarto-1.4.549-linux-amd64.deb
21+
&& arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
22+
&& wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.23/quarto-1.5.23-linux-${arch}.deb \
23+
&& dpkg -i quarto-1.5.23-linux-${arch}.deb \
24+
&& rm -rf /var/lib/apt/lists/* quarto-1.5.23-linux-${arch}.deb
2025
ENV DEBIAN_FRONTEND=dialog
2126

2227
# For docs
2328
RUN npm install --global yarn
29+
RUN pip install --upgrade pip
2430
RUN pip install pydoc-markdown
2531
RUN pip install pyyaml
26-
RUN pip install colored
32+
RUN pip install colored

.devcontainer/dev/Dockerfile

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Basic setup
22
FROM python:3.11-slim-bookworm
33

4+
# add git lhs to apt
5+
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
6+
47
# Update and install necessary packages
58
RUN apt-get update && apt-get -y update
69
# added vim and nano for convenience
7-
RUN apt-get install -y sudo git npm vim nano curl wget
10+
RUN apt-get install -y sudo git npm vim nano curl wget git-lfs
811

912
# Setup a non-root user 'autogen' with sudo access
1013
RUN adduser --disabled-password --gecos '' autogen
@@ -33,17 +36,18 @@ RUN cd website
3336
RUN yarn install --frozen-lockfile --ignore-engines
3437

3538
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
36-
wget -q https://github.com/quarto-dev/quarto-cli/releases/download/v1.4.549/quarto-1.4.549-linux-${arch}.tar.gz && \
39+
wget -q https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.23/quarto-1.5.23-linux-${arch}.tar.gz && \
3740
mkdir -p /home/autogen/quarto/ && \
38-
tar -xzf quarto-1.4.549-linux-${arch}.tar.gz --directory /home/autogen/quarto/ && \
39-
rm quarto-1.4.549-linux-${arch}.tar.gz
41+
tar -xzf quarto-1.5.23-linux-${arch}.tar.gz --directory /home/autogen/quarto/ && \
42+
rm quarto-1.5.23-linux-${arch}.tar.gz
4043

41-
ENV PATH="${PATH}:/home/autogen/quarto/quarto-1.4.549/bin/"
44+
ENV PATH="${PATH}:/home/autogen/quarto/quarto-1.5.23/bin/"
4245

4346
# Exposes the Yarn port for Docusaurus
4447
EXPOSE 3000
4548

4649
# Pre-load popular Python packages
50+
RUN pip install --upgrade pip
4751
RUN pip install numpy pandas matplotlib seaborn scikit-learn requests urllib3 nltk pillow pytest beautifulsoup4
4852

4953
# Set the default command to bash

.devcontainer/full/Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
FROM python:3.11-slim-bookworm
22

3+
# add git lhs to apt
4+
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
5+
36
# Update and install dependencies
47
RUN apt-get update \
58
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
6-
software-properties-common sudo\
9+
software-properties-common sudo git-lfs \
710
&& apt-get clean \
811
&& rm -rf /var/lib/apt/lists/*
912

.devcontainer/studio/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:3.10
99
# Update the OS and maybe install packages
1010
#
1111
ENV DEBIAN_FRONTEND=noninteractive
12+
13+
# add git lhs to apt
14+
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
15+
1216
RUN apt-get update \
1317
&& apt-get upgrade -y \
14-
&& apt-get -y install --no-install-recommends build-essential npm \
18+
&& apt-get -y install --no-install-recommends build-essential npm git-lfs \
1519
&& apt-get autoremove -y \
1620
&& apt-get clean -y \
1721
&& rm -rf /var/lib/apt/lists/*
1822
ENV DEBIAN_FRONTEND=dialog
1923

2024
# For docs
2125
RUN npm install --global yarn
26+
RUN pip install --upgrade pip
2227
RUN pip install pydoc-markdown

.gitattributes

Whitespace-only changes.

.github/ISSUE_TEMPLATE/bug_report.yml

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ body:
2222
3. ...
2323
4. See error
2424
placeholder: How can we replicate the issue?
25+
- type: textarea
26+
id: modelused
27+
attributes:
28+
label: Model Used
29+
description: A description of the model that was used when the error was encountered
30+
placeholder: gpt-4, mistral-7B etc
2531
- type: textarea
2632
id: expected_behavior
2733
attributes:

.github/workflows/build.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
os: [ubuntu-latest, macos-latest, windows-latest]
3232
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
3333
steps:
34-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3535
- name: Set up Python ${{ matrix.python-version }}
36-
uses: actions/setup-python@v4
36+
uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
3939
- name: Install packages and dependencies
@@ -46,9 +46,8 @@ jobs:
4646
# code executors auto skip without deps, so only run for python 3.11
4747
if: matrix.python-version == '3.11'
4848
run: |
49-
pip install jupyter-client ipykernel
49+
pip install -e ".[jupyter-executor]"
5050
python -m ipykernel install --user --name python3
51-
pip install -e ".[local-jupyter-exec]"
5251
- name: Set AUTOGEN_USE_DOCKER based on OS
5352
shell: bash
5453
run: |
@@ -58,16 +57,16 @@ jobs:
5857
- name: Test with pytest skipping openai tests
5958
if: matrix.python-version != '3.10' && matrix.os == 'ubuntu-latest'
6059
run: |
61-
pytest test --skip-openai
60+
pytest test --skip-openai --durations=10 --durations-min=1.0
6261
- name: Test with pytest skipping openai and docker tests
6362
if: matrix.python-version != '3.10' && matrix.os != 'ubuntu-latest'
6463
run: |
65-
pytest test --skip-openai --skip-docker
64+
pytest test --skip-openai --skip-docker --durations=10 --durations-min=1.0
6665
- name: Coverage
6766
if: matrix.python-version == '3.10'
6867
run: |
6968
pip install -e .[test,redis]
70-
coverage run -a -m pytest test --ignore=test/agentchat/contrib --skip-openai
69+
coverage run -a -m pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0
7170
coverage xml
7271
- name: Upload coverage to Codecov
7372
if: matrix.python-version == '3.10'

.github/workflows/contrib-openai.yml

+50-15
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
steps:
2828
# checkout to pr branch
2929
- name: Checkout
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131
with:
3232
ref: ${{ github.event.pull_request.head.sha }}
3333
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v4
34+
uses: actions/setup-python@v5
3535
with:
3636
python-version: ${{ matrix.python-version }}
3737
- name: Install packages and dependencies
@@ -70,11 +70,11 @@ jobs:
7070
steps:
7171
# checkout to pr branch
7272
- name: Checkout
73-
uses: actions/checkout@v3
73+
uses: actions/checkout@v4
7474
with:
7575
ref: ${{ github.event.pull_request.head.sha }}
7676
- name: Set up Python ${{ matrix.python-version }}
77-
uses: actions/setup-python@v4
77+
uses: actions/setup-python@v5
7878
with:
7979
python-version: ${{ matrix.python-version }}
8080
- name: Install packages and dependencies
@@ -111,11 +111,11 @@ jobs:
111111
steps:
112112
# checkout to pr branch
113113
- name: Checkout
114-
uses: actions/checkout@v3
114+
uses: actions/checkout@v4
115115
with:
116116
ref: ${{ github.event.pull_request.head.sha }}
117117
- name: Set up Python ${{ matrix.python-version }}
118-
uses: actions/setup-python@v4
118+
uses: actions/setup-python@v5
119119
with:
120120
python-version: ${{ matrix.python-version }}
121121
- name: Install packages and dependencies
@@ -152,11 +152,11 @@ jobs:
152152
steps:
153153
# checkout to pr branch
154154
- name: Checkout
155-
uses: actions/checkout@v3
155+
uses: actions/checkout@v4
156156
with:
157157
ref: ${{ github.event.pull_request.head.sha }}
158158
- name: Set up Python ${{ matrix.python-version }}
159-
uses: actions/setup-python@v4
159+
uses: actions/setup-python@v5
160160
with:
161161
python-version: ${{ matrix.python-version }}
162162
- name: Install packages and dependencies
@@ -173,7 +173,7 @@ jobs:
173173
AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }}
174174
OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }}
175175
run: |
176-
coverage run -a -m pytest test/agentchat/contrib/test_teachable_agent.py
176+
coverage run -a -m pytest test/agentchat/contrib/capabilities/test_teachable_agent.py
177177
coverage xml
178178
- name: Upload coverage to Codecov
179179
uses: codecov/codecov-action@v3
@@ -190,11 +190,11 @@ jobs:
190190
steps:
191191
# checkout to pr branch
192192
- name: Checkout
193-
uses: actions/checkout@v3
193+
uses: actions/checkout@v4
194194
with:
195195
ref: ${{ github.event.pull_request.head.sha }}
196196
- name: Set up Python ${{ matrix.python-version }}
197-
uses: actions/setup-python@v4
197+
uses: actions/setup-python@v5
198198
with:
199199
python-version: ${{ matrix.python-version }}
200200
- name: Install packages and dependencies
@@ -231,11 +231,11 @@ jobs:
231231
steps:
232232
# checkout to pr branch
233233
- name: Checkout
234-
uses: actions/checkout@v3
234+
uses: actions/checkout@v4
235235
with:
236236
ref: ${{ github.event.pull_request.head.sha }}
237237
- name: Set up Python ${{ matrix.python-version }}
238-
uses: actions/setup-python@v4
238+
uses: actions/setup-python@v5
239239
with:
240240
python-version: ${{ matrix.python-version }}
241241
- name: Install packages and dependencies
@@ -279,11 +279,11 @@ jobs:
279279
steps:
280280
# checkout to pr branch
281281
- name: Checkout
282-
uses: actions/checkout@v3
282+
uses: actions/checkout@v4
283283
with:
284284
ref: ${{ github.event.pull_request.head.sha }}
285285
- name: Set up Python ${{ matrix.python-version }}
286-
uses: actions/setup-python@v4
286+
uses: actions/setup-python@v5
287287
with:
288288
python-version: ${{ matrix.python-version }}
289289
- name: Install packages and dependencies
@@ -308,3 +308,38 @@ jobs:
308308
with:
309309
file: ./coverage.xml
310310
flags: unittests
311+
ImageGen:
312+
strategy:
313+
matrix:
314+
os: [ubuntu-latest]
315+
python-version: ["3.12"]
316+
runs-on: ${{ matrix.os }}
317+
environment: openai1
318+
steps:
319+
# checkout to pr branch
320+
- name: Checkout
321+
uses: actions/checkout@v4
322+
with:
323+
ref: ${{ github.event.pull_request.head.sha }}
324+
- name: Set up Python ${{ matrix.python-version }}
325+
uses: actions/setup-python@v5
326+
with:
327+
python-version: ${{ matrix.python-version }}
328+
- name: Install packages and dependencies
329+
run: |
330+
docker --version
331+
python -m pip install --upgrade pip wheel
332+
pip install -e .[lmm]
333+
python -c "import autogen"
334+
pip install coverage pytest
335+
- name: Coverage
336+
env:
337+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
338+
run: |
339+
coverage run -a -m pytest test/agentchat/contrib/capabilities/test_image_generation_capability.py
340+
coverage xml
341+
- name: Upload coverage to Codecov
342+
uses: codecov/codecov-action@v3
343+
with:
344+
file: ./coverage.xml
345+
flags: unittests

0 commit comments

Comments
 (0)