Skip to content

Commit abe4c41

Browse files
committed
Merge branch 'main' into contrib-functions
2 parents 084ab2e + d797d26 commit abe4c41

File tree

176 files changed

+13429
-3838
lines changed

Some content is hidden

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

176 files changed

+13429
-3838
lines changed

.github/workflows/build.yml

+13
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ jobs:
4242
pip install -e .
4343
python -c "import autogen"
4444
pip install pytest mock
45+
- name: Install optional dependencies for code executors
46+
# code executors auto skip without deps, so only run for python 3.11
47+
if: matrix.python-version == '3.11'
48+
run: |
49+
pip install jupyter-client ipykernel
50+
python -m ipykernel install --user --name python3
51+
pip install -e ".[local-jupyter-exec]"
52+
- name: Set AUTOGEN_USE_DOCKER based on OS
53+
shell: bash
54+
run: |
55+
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
56+
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
57+
fi
4558
- name: Test with pytest skipping openai tests
4659
if: matrix.python-version != '3.10' && matrix.os == 'ubuntu-latest'
4760
run: |

.github/workflows/dotnet-build.yml

+112-7
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,25 @@
44
name: dotnet-ci
55

66
on:
7+
workflow_dispatch:
78
pull_request:
8-
branches: [ "main" ]
9+
branches: [ "dotnet" ]
910
paths:
1011
- 'dotnet/**'
12+
push:
13+
branches: [ "dotnet" ]
1114

1215
concurrency:
1316
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
14-
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
17+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' || github.ref != 'refs/heads/dotnet' }}
1518

1619
permissions:
1720
contents: read
21+
packages: write
1822

1923
jobs:
2024
build:
21-
name: CI
25+
name: Build
2226
runs-on: ubuntu-latest
2327
defaults:
2428
run:
@@ -28,10 +32,111 @@ jobs:
2832
- name: Setup .NET
2933
uses: actions/setup-dotnet@v3
3034
with:
31-
global-json-file: global.json
35+
global-json-file: dotnet/global.json
3236
- name: Restore dependencies
33-
run: dotnet restore
37+
run: |
38+
# dotnet nuget add source --name dotnet-tool https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json --configfile NuGet.config
39+
dotnet restore -bl
3440
- name: Build
35-
run: dotnet build --no-restore
41+
run: |
42+
echo "Build AutoGen"
43+
dotnet build --no-restore --configuration Release -bl /p:SignAssembly=true
3644
- name: Unit Test
37-
run: dotnet test --no-build --verbosity normal
45+
run: dotnet test --no-build -bl --configuration Release
46+
openai-test:
47+
name: Run openai test
48+
runs-on: ubuntu-latest
49+
environment: dotnet
50+
defaults:
51+
run:
52+
working-directory: dotnet
53+
if: success() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dotnet')
54+
needs: build
55+
steps:
56+
- uses: actions/checkout@v3
57+
- name: Setup .NET
58+
uses: actions/setup-dotnet@v3
59+
with:
60+
global-json-file: dotnet/global.json
61+
- name: Restore dependencies
62+
run: |
63+
dotnet restore -bl
64+
- name: Build
65+
run: |
66+
echo "Build AutoGen"
67+
dotnet build --no-restore --configuration Release -bl /p:SignAssembly=true
68+
- name: OpenAI Test
69+
run: dotnet test --no-build -bl --configuration Release
70+
env:
71+
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
72+
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
73+
AZURE_GPT_35_MODEL_ID: ${{ secrets.AZURE_GPT_35_MODEL_ID }}
74+
OEPNAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
75+
- name: Pack
76+
run: |
77+
echo "Create nightly build package"
78+
dotnet pack --no-build --configuration Release --output './output/nightly' -p:VersionSuffix=nightly-${{github.run_id}} -bl
79+
80+
echo "Create release build package"
81+
dotnet pack --no-build --configuration Release --output './output/release' -bl
82+
83+
echo "ls output directory"
84+
ls -R ./output
85+
- name: Upload package
86+
uses: actions/upload-artifact@v2
87+
with:
88+
name: nightly
89+
path: ./dotnet/output/nightly
90+
- name: Upload package
91+
uses: actions/upload-artifact@v2
92+
with:
93+
name: release
94+
path: ./dotnet/output/release
95+
publish:
96+
environment: dotnet-internal-feed
97+
name: Publish to nightly feeds
98+
runs-on: ubuntu-latest
99+
defaults:
100+
run:
101+
working-directory: dotnet
102+
needs: openai-test
103+
steps:
104+
- name: Setup .NET
105+
uses: actions/setup-dotnet@v3
106+
with:
107+
dotnet-version: '6.0.x'
108+
source-url: https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/AutoGen/nuget/v3/index.json
109+
env:
110+
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_DEVOPS_TOKEN }}
111+
- uses: actions/download-artifact@v2
112+
with:
113+
name: nightly
114+
path: ./dotnet/output/nightly
115+
- uses: actions/download-artifact@v2
116+
with:
117+
name: release
118+
path: ./dotnet/output/release
119+
- name: Publish nightly package to Azure Devops
120+
run: |
121+
echo "Publish nightly package to Azure Devops"
122+
echo "ls output directory"
123+
ls -R ./output/nightly
124+
dotnet nuget push --api-key AzureArtifacts ./output/nightly/*.nupkg --skip-duplicate
125+
env:
126+
AZURE_ARTIFACTS_FEED_URL: https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/AutoGen/nuget/v3/index.json
127+
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_DEVOPS_TOKEN }}
128+
- name: Publish nightly package to github package
129+
run: |
130+
echo "Publish nightly package to github package"
131+
echo "ls output directory"
132+
ls -R ./output/nightly
133+
dotnet nuget push --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/microsoft/index.json" ./output/nightly/*.nupkg --skip-duplicate
134+
- name: Publish nightly package to agentchat myget feed
135+
run: |
136+
echo "Publish nightly package to agentchat myget feed"
137+
echo "ls output directory"
138+
ls -R ./output/nightly
139+
dotnet nuget push --api-key ${{ secrets.MYGET_TOKEN }} --source "https://www.myget.org/F/agentchat/api/v3/index.json" ./output/nightly/*.nupkg --skip-duplicate
140+
env:
141+
MYGET_TOKEN: ${{ secrets.MYGET_TOKEN }}
142+

.github/workflows/dotnet-run-openai-test-and-notebooks.yml

-58
This file was deleted.

.github/workflows/openai.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- "test/**"
1212
- "notebook/agentchat_auto_feedback_from_code_execution.ipynb"
1313
- "notebook/agentchat_function_call.ipynb"
14+
- "notebook/agentchat_groupchat_finite_state_machine.ipynb"
1415
- ".github/workflows/openai.yml"
1516
permissions: {}
1617
# actions: read

OAI_CONFIG_LIST_sample

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
"api_key": "<your Azure OpenAI API key here>",
1313
"base_url": "<your Azure OpenAI API base here>",
1414
"api_type": "azure",
15-
"api_version": "2023-07-01-preview"
15+
"api_version": "2024-02-15-preview"
1616
},
1717
{
1818
"model": "<your Azure OpenAI deployment name>",
1919
"api_key": "<your Azure OpenAI API key here>",
2020
"base_url": "<your Azure OpenAI API base here>",
2121
"api_type": "azure",
22-
"api_version": "2023-07-01-preview"
22+
"api_version": "2024-02-15-preview"
2323
}
2424
]

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<br>
1414
</p> -->
1515

16+
:fire: Jan 30: AutoGen is highlighted by Peter Lee in Microsoft Research Forum [Keynote](https://t.co/nUBSjPDjqD).
17+
1618
:warning: Jan 23: **Breaking Change in Latest Release v0.2.8** `use_docker` defaults to `True` for code-execution. See [blog post](https://microsoft.github.io/autogen/blog/2024/01/23/Code-execution-in-docker) for details and [FAQ](https://microsoft.github.io/autogen/docs/FAQ#agents-are-throwing-due-to-docker-not-running-how-can-i-resolve-this) for troubleshooting any issues.
1719

1820
:fire: Dec 31: [AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework](https://arxiv.org/abs/2308.08155) is selected by [TheSequence: My Five Favorite AI Papers of 2023](https://thesequence.substack.com/p/my-five-favorite-ai-papers-of-2023).
@@ -23,7 +25,7 @@
2325

2426
:fire: Nov 8: AutoGen is selected into [Open100: Top 100 Open Source achievements](https://www.benchcouncil.org/evaluation/opencs/annual.html) 35 days after spinoff.
2527

26-
:fire: Nov 6: AutoGen is mentioned by Satya Nadella in a [fireside chat](https://youtu.be/0pLBvgYtv6U) around 13:20.
28+
:fire: Nov 6: AutoGen is mentioned by Satya Nadella in a [fireside chat](https://youtu.be/0pLBvgYtv6U).
2729

2830
:fire: Nov 1: AutoGen is the top trending repo on GitHub in October 2023.
2931

TRANSPARENCY_FAQS.md

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ While AutoGen automates LLM workflows, decisions about how to use specific LLM o
3030
## How was AutoGen evaluated? What metrics are used to measure performance?
3131
- Current version of AutoGen was evaluated on six applications to illustrate its potential in simplifying the development of high-performance multi-agent applications. These applications are selected based on their real-world relevance, problem difficulty and problem solving capabilities enabled by AutoGen, and innovative potential.
3232
- These applications involve using AutoGen to solve math problems, question answering, decision making in text world environments, supply chain optimization, etc. For each of these domains AutoGen was evaluated on various success based metrics (i.e., how often the AutoGen based implementation solved the task). And, in some cases, AutoGen based approach was also evaluated on implementation efficiency (e.g., to track reductions in developer effort to build). More details can be found at: https://aka.ms/AutoGen/TechReport
33+
- The team has conducted tests where a “red” agent attempts to get the default AutoGen assistant to break from its alignment and guardrails. The team has observed that out of 70 attempts to break guardrails, only 1 was successful in producing text that would have been flagged as problematic by Azure OpenAI filters. The team has not observed any evidence that AutoGen (or GPT models as hosted by OpenAI or Azure) can produce novel code exploits or jailbreak prompts, since direct prompts to “be a hacker”, “write exploits”, or “produce a phishing email” are refused by existing filters.
3334

3435
## What are the limitations of AutoGen? How can users minimize the impact of AutoGen’s limitations when using the system?
3536
AutoGen relies on existing LLMs. Experimenting with AutoGen would retain common limitations of large language models; including:

autogen/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from .version import __version__
33
from .oai import *
44
from .agentchat import *
5+
from .exception_utils import *
56
from .code_utils import DEFAULT_MODEL, FAST_MODEL
67

78

autogen/agent_utils.py

-50
This file was deleted.

autogen/agentchat/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
from .conversable_agent import ConversableAgent, register_function
44
from .groupchat import GroupChat, GroupChatManager
55
from .user_proxy_agent import UserProxyAgent
6+
from .chat import initiate_chats, ChatResult
7+
from .utils import gather_usage_summary
68

79
__all__ = (
810
"Agent",
@@ -12,4 +14,7 @@
1214
"GroupChat",
1315
"GroupChatManager",
1416
"register_function",
17+
"initiate_chats",
18+
"gather_usage_summary",
19+
"ChatResult",
1520
)

0 commit comments

Comments
 (0)