Skip to content

Commit

Permalink
Merge branch 'main' into fix_cloud_event
Browse files Browse the repository at this point in the history
  • Loading branch information
rysweet authored Dec 10, 2024
2 parents 279b3bc + 7e7265d commit 8f6ad45
Show file tree
Hide file tree
Showing 79 changed files with 691 additions and 1,007 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
{ ref: "v0.4.0.dev7", dest-dir: "0.4.0.dev7" },
{ ref: "v0.4.0.dev8", dest-dir: "0.4.0.dev8" },
{ ref: "v0.4.0.dev9", dest-dir: "0.4.0.dev9" },
{ ref: "v0.4.0.dev10", dest-dir: "0.4.0.dev10" },
]
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ We will update verion numbers according to the following rules:

1. Create a PR that updates the version numbers across the codebase ([example](https://github.com/microsoft/autogen/pull/4359))
2. The docs CI will fail for the PR, but this is expected and will be resolved in the next step
2. After merging the PR, create and push a tag that corresponds to the new verion. For example, for `0.4.0.dev9`:
- `git tag 0.4.0.dev9 && git push origin 0.4.0.dev9`
2. After merging the PR, create and push a tag that corresponds to the new verion. For example, for `0.4.0.dev10`:
- `git tag 0.4.0.dev10 && git push origin 0.4.0.dev10`
3. Restart the docs CI by finding the failed [job corresponding to the `push` event](https://github.com/microsoft/autogen/actions/workflows/docs.yml) and restarting all jobs
4. Run [this](https://github.com/microsoft/autogen/actions/workflows/single-python-package.yml) workflow for each of the packages that need to be released and get an approval for the release for it to run

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40pyautogen)](https://twitter.com/pyautogen) [![LinkedIn](https://img.shields.io/badge/LinkedIn-Company?style=flat&logo=linkedin&logoColor=white)](https://www.linkedin.com/company/105812540)
[![GitHub Discussions](https://img.shields.io/badge/Discussions-Q%26A-green?logo=github)](https://github.com/microsoft/autogen/discussions) [![0.2 Docs](https://img.shields.io/badge/Docs-0.2-blue)](https://microsoft.github.io/autogen/0.2/) [![0.4 Docs](https://img.shields.io/badge/Docs-0.4-blue)](https://microsoft.github.io/autogen/dev/)
[![PyPi autogen-core](https://img.shields.io/badge/PyPi-autogen--core-blue?logo=pypi)](https://pypi.org/project/autogen-core/0.4.0.dev9/) [![PyPi autogen-agentchat](https://img.shields.io/badge/PyPi-autogen--agentchat-blue?logo=pypi)](https://pypi.org/project/autogen-agentchat/0.4.0.dev9/) [![PyPi autogen-ext](https://img.shields.io/badge/PyPi-autogen--ext-blue?logo=pypi)](https://pypi.org/project/autogen-ext/0.4.0.dev9/)
[![PyPi autogen-core](https://img.shields.io/badge/PyPi-autogen--core-blue?logo=pypi)](https://pypi.org/project/autogen-core/0.4.0.dev10/) [![PyPi autogen-agentchat](https://img.shields.io/badge/PyPi-autogen--agentchat-blue?logo=pypi)](https://pypi.org/project/autogen-agentchat/0.4.0.dev10/) [![PyPi autogen-ext](https://img.shields.io/badge/PyPi-autogen--ext-blue?logo=pypi)](https://pypi.org/project/autogen-ext/0.4.0.dev10/)

</div>

Expand Down Expand Up @@ -105,7 +105,7 @@ We look forward to your contributions!
First install the packages:

```bash
pip install 'autogen-agentchat==0.4.0.dev9' 'autogen-ext[openai]==0.4.0.dev9'
pip install 'autogen-agentchat==0.4.0.dev10' 'autogen-ext[openai]==0.4.0.dev10'
```

The following code uses OpenAI's GPT-4o model and you need to provide your
Expand Down
7 changes: 6 additions & 1 deletion docs/switcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@
{
"name": "0.4.0.dev9",
"version": "0.4.0.dev9",
"url": "/autogen/0.4.0.dev9/",
"url": "/autogen/0.4.0.dev9/"
},
{
"name": "0.4.0.dev10",
"version": "0.4.0.dev10",
"url": "/autogen/0.4.0.dev10/",
"preferred": true
}
]
2 changes: 1 addition & 1 deletion python/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AutoGen Python packages

[![0.4 Docs](https://img.shields.io/badge/Docs-0.4-blue)](https://microsoft.github.io/autogen/dev/)
[![PyPi autogen-core](https://img.shields.io/badge/PyPi-autogen--core-blue?logo=pypi)](https://pypi.org/project/autogen-core/0.4.0.dev9/) [![PyPi autogen-agentchat](https://img.shields.io/badge/PyPi-autogen--agentchat-blue?logo=pypi)](https://pypi.org/project/autogen-agentchat/0.4.0.dev9/) [![PyPi autogen-ext](https://img.shields.io/badge/PyPi-autogen--ext-blue?logo=pypi)](https://pypi.org/project/autogen-ext/0.4.0.dev9/)
[![PyPi autogen-core](https://img.shields.io/badge/PyPi-autogen--core-blue?logo=pypi)](https://pypi.org/project/autogen-core/0.4.0.dev10/) [![PyPi autogen-agentchat](https://img.shields.io/badge/PyPi-autogen--agentchat-blue?logo=pypi)](https://pypi.org/project/autogen-agentchat/0.4.0.dev10/) [![PyPi autogen-ext](https://img.shields.io/badge/PyPi-autogen--ext-blue?logo=pypi)](https://pypi.org/project/autogen-ext/0.4.0.dev10/)

This directory works as a single `uv` workspace containing all project packages. See [`packages`](./packages/) to discover all project packages.

Expand Down
4 changes: 2 additions & 2 deletions python/packages/autogen-agentchat/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "autogen-agentchat"
version = "0.4.0.dev9"
version = "0.4.0.dev10"
license = {file = "LICENSE-CODE"}
description = "AutoGen agents and teams library"
readme = "README.md"
Expand All @@ -15,7 +15,7 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"autogen-core==0.4.0.dev9",
"autogen-core==0.4.0.dev10",
]

[tool.uv]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class AssistantAgent(BaseChatAgent):
import asyncio
from autogen_core import CancellationToken
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.messages import TextMessage
Expand Down Expand Up @@ -149,7 +149,7 @@ async def main() -> None:
.. code-block:: python
import asyncio
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.messages import TextMessage
from autogen_agentchat.ui import Console
Expand Down Expand Up @@ -183,7 +183,7 @@ async def main() -> None:
import asyncio
from autogen_core import CancellationToken
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.messages import TextMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SocietyOfMindAgent(BaseChatAgent):
import asyncio
from autogen_agentchat.agents import AssistantAgent, SocietyOfMindAgent
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_agentchat.conditions import MaxMessageTermination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ class Handoff(BaseModel):
target: str
"""The name of the target agent to handoff to."""

description: str = Field(default=None)
description: str = Field(default="")
"""The description of the handoff such as the condition under which it should happen and the target agent's ability.
If not provided, it is generated from the target agent's name."""

name: str = Field(default=None)
name: str = Field(default="")
"""The name of this handoff configuration. If not provided, it is generated from the target agent's name."""

message: str = Field(default=None)
message: str = Field(default="")
"""The message to the target agent.
If not provided, it is generated from the target agent's name."""

@model_validator(mode="before")
@classmethod
def set_defaults(cls, values: Dict[str, Any]) -> Dict[str, Any]:
if values.get("description") is None:
if not values.get("description"):
values["description"] = f"Handoff to {values['target']}."
if values.get("name") is None:
if not values.get("name"):
values["name"] = f"transfer_to_{values['target']}".lower()
else:
name = values["name"]
Expand All @@ -40,7 +40,7 @@ def set_defaults(cls, values: Dict[str, Any]) -> Dict[str, Any]:
# Check if name is a valid identifier.
if not name.isidentifier():
raise ValueError(f"Handoff name must be a valid identifier: {values['name']}")
if values.get("message") is None:
if not values.get("message"):
values["message"] = (
f"Transferred to {values['target']}, adopting the role of {values['target']} immediately."
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async def run(
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.conditions import MaxMessageTermination
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main() -> None:
Expand Down Expand Up @@ -219,7 +219,7 @@ async def main() -> None:
from autogen_agentchat.conditions import MaxMessageTermination
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_core import CancellationToken
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main() -> None:
Expand Down Expand Up @@ -286,7 +286,7 @@ async def run_stream(
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.conditions import MaxMessageTermination
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main() -> None:
Expand Down Expand Up @@ -320,7 +320,7 @@ async def main() -> None:
from autogen_agentchat.ui import Console
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_core import CancellationToken
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main() -> None:
Expand Down Expand Up @@ -437,7 +437,7 @@ async def reset(self) -> None:
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.conditions import MaxMessageTermination
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main() -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MagenticOneGroupChat(BaseGroupChat):
.. code-block:: python
import asyncio
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import MagenticOneGroupChat
from autogen_agentchat.ui import Console
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class RoundRobinGroupChat(BaseGroupChat):
.. code-block:: python
import asyncio
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_agentchat.conditions import TextMentionTermination
Expand Down Expand Up @@ -113,7 +113,7 @@ async def get_weather(location: str) -> str:
.. code-block:: python
import asyncio
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_agentchat.conditions import TextMentionTermination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class SelectorGroupChat(BaseGroupChat):
.. code-block:: python
import asyncio
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import SelectorGroupChat
from autogen_agentchat.conditions import TextMentionTermination
Expand Down Expand Up @@ -273,7 +273,7 @@ async def book_trip() -> str:
import asyncio
from typing import Sequence
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import SelectorGroupChat
from autogen_agentchat.conditions import TextMentionTermination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Swarm(BaseGroupChat):
.. code-block:: python
import asyncio
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import Swarm
from autogen_agentchat.conditions import MaxMessageTermination
Expand Down Expand Up @@ -143,7 +143,7 @@ async def main() -> None:
.. code-block:: python
import asyncio
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import Swarm
from autogen_agentchat.conditions import HandoffTermination, MaxMessageTermination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)
from autogen_core import Image
from autogen_core.tools import FunctionTool
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from openai.resources.chat.completions import AsyncCompletions
from openai.types.chat.chat_completion import ChatCompletion, Choice
from openai.types.chat.chat_completion_chunk import ChatCompletionChunk
Expand Down
3 changes: 2 additions & 1 deletion python/packages/autogen-agentchat/tests/test_group_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
from autogen_core import AgentId, CancellationToken
from autogen_core.tools import FunctionTool
from autogen_ext.code_executors.local import LocalCommandLineCodeExecutor
from autogen_ext.models import OpenAIChatCompletionClient, ReplayChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.models.replay import ReplayChatCompletionClient
from openai.resources.chat.completions import AsyncCompletions
from openai.types.chat.chat_completion import ChatCompletion, Choice
from openai.types.chat.chat_completion_chunk import ChatCompletionChunk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
)
from autogen_agentchat.teams._group_chat._magentic_one._magentic_one_orchestrator import MagenticOneOrchestrator
from autogen_core import AgentId, CancellationToken
from autogen_ext.models import ReplayChatCompletionClient
from autogen_ext.models.replay import ReplayChatCompletionClient
from utils import FileLogHandler

logger = logging.getLogger(EVENT_LOGGER_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from autogen_agentchat.agents import AssistantAgent, SocietyOfMindAgent
from autogen_agentchat.conditions import MaxMessageTermination
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_ext.models import OpenAIChatCompletionClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
from openai.resources.chat.completions import AsyncCompletions
from openai.types.chat.chat_completion import ChatCompletion, Choice
from openai.types.chat.chat_completion_chunk import ChatCompletionChunk
Expand Down
4 changes: 2 additions & 2 deletions python/packages/autogen-core/docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ AgentChat </div>
High-level API that includes preset agents and teams for building multi-agent systems.

```sh
pip install 'autogen-agentchat==0.4.0.dev9'
pip install 'autogen-agentchat==0.4.0.dev10'
```

💡 *Start here if you are looking for an API similar to AutoGen 0.2.*
Expand All @@ -77,7 +77,7 @@ Get Started
Provides building blocks for creating asynchronous, event driven multi-agent systems.

```sh
pip install 'autogen-core==0.4.0.dev9'
pip install 'autogen-core==0.4.0.dev10'
```

+++
Expand Down
12 changes: 6 additions & 6 deletions python/packages/autogen-core/docs/src/packages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ myst:
Library that is at a similar level of abstraction as AutoGen 0.2, including default agents and group chat.

```sh
pip install 'autogen-agentchat==0.4.0.dev9'
pip install 'autogen-agentchat==0.4.0.dev10'
```

[{fas}`circle-info;pst-color-primary` User Guide](/user-guide/agentchat-user-guide/index.md) | [{fas}`file-code;pst-color-primary` API Reference](/reference/python/autogen_agentchat.rst) | [{fab}`python;pst-color-primary` PyPI](https://pypi.org/project/autogen-agentchat/0.4.0.dev9/) | [{fab}`github;pst-color-primary` Source](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-agentchat)
[{fas}`circle-info;pst-color-primary` User Guide](/user-guide/agentchat-user-guide/index.md) | [{fas}`file-code;pst-color-primary` API Reference](/reference/python/autogen_agentchat.rst) | [{fab}`python;pst-color-primary` PyPI](https://pypi.org/project/autogen-agentchat/0.4.0.dev10/) | [{fab}`github;pst-color-primary` Source](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-agentchat)
:::

(pkg-info-autogen-core)=
Expand All @@ -46,10 +46,10 @@ pip install 'autogen-agentchat==0.4.0.dev9'
Implements the core functionality of the AutoGen framework, providing basic building blocks for creating multi-agent systems.

```sh
pip install 'autogen-core==0.4.0.dev9'
pip install 'autogen-core==0.4.0.dev10'
```

[{fas}`circle-info;pst-color-primary` User Guide](/user-guide/core-user-guide/index.md) | [{fas}`file-code;pst-color-primary` API Reference](/reference/python/autogen_core.rst) | [{fab}`python;pst-color-primary` PyPI](https://pypi.org/project/autogen-core/0.4.0.dev9/) | [{fab}`github;pst-color-primary` Source](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-core)
[{fas}`circle-info;pst-color-primary` User Guide](/user-guide/core-user-guide/index.md) | [{fas}`file-code;pst-color-primary` API Reference](/reference/python/autogen_core.rst) | [{fab}`python;pst-color-primary` PyPI](https://pypi.org/project/autogen-core/0.4.0.dev10/) | [{fab}`github;pst-color-primary` Source](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-core)
:::

(pkg-info-autogen-ext)=
Expand All @@ -61,7 +61,7 @@ pip install 'autogen-core==0.4.0.dev9'
Implementations of core components that interface with external services, or use extra dependencies. For example, Docker based code execution.

```sh
pip install 'autogen-ext==0.4.0.dev9'
pip install 'autogen-ext==0.4.0.dev10'
```

Extras:
Expand All @@ -71,7 +71,7 @@ Extras:
- `docker` needed for {py:class}`~autogen_ext.code_executors.docker.DockerCommandLineCodeExecutor`
- `openai` needed for {py:class}`~autogen_ext.models.OpenAIChatCompletionClient`

[{fas}`circle-info;pst-color-primary` User Guide](/user-guide/extensions-user-guide/index.md) | [{fas}`file-code;pst-color-primary` API Reference](/reference/python/autogen_ext.agents.web_surfer.rst) | [{fab}`python;pst-color-primary` PyPI](https://pypi.org/project/autogen-ext/0.4.0.dev9/) | [{fab}`github;pst-color-primary` Source](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-ext)
[{fas}`circle-info;pst-color-primary` User Guide](/user-guide/extensions-user-guide/index.md) | [{fas}`file-code;pst-color-primary` API Reference](/reference/python/autogen_ext.agents.web_surfer.rst) | [{fab}`python;pst-color-primary` PyPI](https://pypi.org/project/autogen-ext/0.4.0.dev10/) | [{fab}`github;pst-color-primary` Source](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-ext)
:::

(pkg-info-autogen-magentic-one)=
Expand Down
Loading

0 comments on commit 8f6ad45

Please sign in to comment.