Skip to content

Commit

Permalink
Merge branch 'ag2ai:main' into dev_structure
Browse files Browse the repository at this point in the history
  • Loading branch information
ohdearquant authored Dec 7, 2024
2 parents a0ba641 + 16b6768 commit 5ea4ad4
Show file tree
Hide file tree
Showing 87 changed files with 10,453 additions and 509 deletions.
48 changes: 47 additions & 1 deletion .github/workflows/contrib-graph-rag-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: |
python -m pip install --upgrade pip wheel
pip install pytest
- name: Install Falkor DB SDK when on linux
- name: Install FalkorDB SDK when on linux
run: |
pip install -e .[graph_rag_falkor_db]
- name: Set AUTOGEN_USE_DOCKER based on OS
Expand All @@ -64,3 +64,49 @@ jobs:
with:
file: ./coverage.xml
flags: unittests

GraphRagIntegrationTest-Neo4j-Llmaindex-Ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
services:
neo4j:
image: neo4j:latest
ports:
- 7687:7687
- 7474:7474
env:
NEO4J_AUTH: neo4j/password
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 Neo4j and Llama-index when on linux
run: |
pip install -e .[neo4j_graph_rag]
- name: Set AUTOGEN_USE_DOCKER based on OS
shell: bash
run: |
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
- name: Coverage
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }}
OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }}
run: |
pip install pytest-cov>=5
pytest test/agentchat/contrib/graph_rag/test_neo4j_graph_rag.py --skip-openai
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
40 changes: 40 additions & 0 deletions .github/workflows/contrib-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -732,3 +732,43 @@ jobs:
with:
file: ./coverage.xml
flags: unittests

SwarmTest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
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 Swarms
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_swarm.py --skip-openai
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
27 changes: 13 additions & 14 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,21 @@ jobs:
# - name: Conda list
# shell: pwsh
# run: conda list
- name: Build autogen
- name: Build pyautogen
shell: pwsh
run: |
pip install twine
python setup.py sdist bdist_wheel --name "autogen"
python setup.py sdist bdist_wheel
- name: Publish pyautogen to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYAUTOGEN_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYAUTOGEN_PYPI_PASSWORD }}
shell: pwsh
run: twine upload dist/*pyautogen*
- name: Build autogen
shell: pwsh
run: |
python setup_autogen.py sdist bdist_wheel
- name: Publish autogen to PyPI
env:
TWINE_USERNAME: ${{ secrets.AUTOGEN_PYPI_USERNAME }}
Expand All @@ -57,21 +67,10 @@ jobs:
- name: Build ag2
shell: pwsh
run: |
pip install twine
python setup.py sdist bdist_wheel --name "ag2"
python setup_ag2.py sdist bdist_wheel
- name: Publish ag2 to PyPI
env:
TWINE_USERNAME: ${{ secrets.AUTOGEN_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.AUTOGEN_PYPI_PASSWORD }}
shell: pwsh
run: twine upload dist/ag2*
- name: Build pyautogen
shell: pwsh
run: |
python setup.py sdist bdist_wheel --name "pyautogen"
- name: Publish pyautogen to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYAUTOGEN_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYAUTOGEN_PYPI_PASSWORD }}
shell: pwsh
run: twine upload dist/*pyautogen*
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ repos:
website/docs/tutorial/code-executors.ipynb |
website/docs/topics/code-execution/custom-executor.ipynb |
website/docs/topics/non-openai-models/cloud-gemini.ipynb |
notebook/.*
notebook/.* |
test/agentchat/contrib/graph_rag/trip_planner_data/.* |
test/agentchat/contrib/graph_rag/paul_graham_essay.txt
)$
# See https://jaredkhan.com/blog/mypy-pre-commit
- repo: local
Expand Down
6 changes: 5 additions & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
| Davor Runje | [davorrunje](https://github.com/davorrunje) | airt.ai | Tool calling, IO |
| Aaron Ward | [AaronWard](https://github.com/AaronWard) | yappstore.ai | all |
| Rudy Wu | [rudyalways](https://github.com/rudyalways) | Google | all, group chats, sequential chats |
| Haiyang Li | [ohdearquant](https://github.com/ohdearquant) | - | all, sequential chats, structured output, low-level|
| Eric Moore | [emooreatx](https://github.com/emooreatx) | IBM | all|
| Evan David | [evandavid1](https://github.com/evandavid1) | - | all |
| Tvrtko Sternak | [sternakt](https://github.com/sternakt) | airt.ai | structured output |


**Pending Maintainers list (Marked with \*, Waiting for explicit approval from the maintainers)**
| Name | GitHub Handle | Organization | Features |
|-----------------|------------------------------------------------------------|------------------------|-----------------------------------------|
| Olaoluwa Ademola Salami * | [olaoluwasalami](https://github.com/olaoluwasalami) | DevOps Engineer | |
| Rajan Chari * | [rajan-chari](https://github.com/rajan-chari) | Microsoft Research | CAP |
| Evan David * | [evandavid1](https://github.com/evandavid1) | - | gpt assistant, group chat, rag, autobuild |

## I would like to join this list. How can I help the project?
> We're always looking for new contributors to join our team and help improve the project. For more information, please refer to our [CONTRIBUTING](https://ag2ai.github.io/ag2/docs/contributor-guide/contributing) guide.
Expand Down
36 changes: 11 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<a name="readme-top"></a>

![Pypi Downloads](https://img.shields.io/pypi/dm/pyautogen?label=PyPI%20downloads)
[![PyPI version](https://badge.fury.io/py/autogen.svg)](https://badge.fury.io/py/autogen)
[![Build](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml/badge.svg)](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml)
![Python Version](https://img.shields.io/badge/3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)
Expand All @@ -8,39 +9,27 @@

<!-- [![NuGet version](https://badge.fury.io/nu/AutoGen.Core.svg)](https://badge.fury.io/nu/AutoGen.Core) -->


<a name="readme-top"></a>

<div align="center">
<img src="./website/static/img/ag2.png" alt="AutoGen Logo" width="100">


</div>
# [AG2](https://github.com/ag2ai/ag2)

[📚 Cite paper](#related-papers).
<!-- <p align="center">
<img src="https://github.com/ag2ai/ag2/blob/main/website/static/img/flaml.svg" width=200>
<br>
</p> -->

> [!IMPORTANT]
> **:tada: IMPORTANT**
>
> :fire: :tada: **Nov 11, 2024:** We are evolving AutoGen into **AG2**!
> A new organization [AG2ai](https://github.com/ag2ai) is created to host the development of AG2 and related projects with open governance. Check [AG2's new look](https://ag2.ai/).
>
> :fire: :tada: Nov 11, 2024: We are evolving AutoGen into AG2! A new organization [ag2ai](https://github.com/ag2ai) is created to host the development of AG2 and related projects with open governance. We invite collaborators from all organizations and individuals to join the development.
> We invite collaborators from all organizations and individuals to join the development.

:fire: :tada: AG2 is available via `ag2` (or its alias `autogen` or `pyautogen`) on PyPI! Starting with version 0.3.2, you can now install AG2 using:
```
pip install ag2
```
or
:fire: :tada: AG2 is available via `pyautogen` (or its alias `autogen` or `ag2`) on PyPI!

```
pip install pyautogen
```
or
```
pip install autogen
```


📄 **License:**
We adopt the Apache 2.0 license from v0.3. This enhances our commitment to open-source collaboration while providing additional protections for contributors and users alike.
Expand Down Expand Up @@ -98,8 +87,7 @@ AG2 (formerly AutoGen) is an open-source programming framework for building AI a
The project is currently maintained by a [dynamic group of volunteers](MAINTAINERS.md) from several organizations. Contact project administrators Chi Wang and Qingyun Wu via [[email protected]](mailto:[email protected]) if you are interested in becoming a maintainer.


![AutoGen Overview](./website/static/img/autogen_agentchat.png)

![AutoGen Overview](https://media.githubusercontent.com/media/ag2ai/ag2/refs/heads/main/website/static/img/autogen_agentchat.png)


<p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
Expand Down Expand Up @@ -199,7 +187,7 @@ python test/twoagent.py
After the repo is cloned.
The figure below shows an example conversation flow with AG2.

![Agent Chat Example](./website/static/img/chat_example.png)
![Agent Chat Example](https://media.githubusercontent.com/media/ag2ai/ag2/refs/heads/main/website/static/img/chat_example.png)


Alternatively, the [sample code](https://github.com/ag2ai/build-with-ag2/blob/main/samples/simple_chat.py) here allows a user to chat with an AG2 agent in ChatGPT style.
Expand Down Expand Up @@ -252,8 +240,6 @@ In addition, you can find:

- [Contributing guide](https://ag2ai.github.io/ag2/docs/Contribute)

- [Roadmap](https://ag2.ai/#roadmap) and [Roadmap Issues](https://github.com/ag2ai/ag2/issues?q=is%3Aopen+is%3Aissue+label%3Aroadmap)

<p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
<a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
↑ Back to Top ↑
Expand Down
1 change: 1 addition & 0 deletions autogen/agentchat/contrib/agent_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class AgentBuilder:
# Task requirement
- Expert's name should follow the format: [skill]_Expert.
- Only reply the names of the experts, separated by ",".
- If coding skills are required, they should be limited to Python and Shell.
For example: Python_Expert, Math_Expert, ... """

AGENT_SYS_MSG_PROMPT = """# Your goal
Expand Down
Empty file.
Loading

0 comments on commit 5ea4ad4

Please sign in to comment.