shipfeedAI news, curated daily

00:32:14 CET
21 MAY00:32:14shipfeed
pull to refreshlast sync
Just in — 30 new
§ agents · storyline

AutoGen — python v0.5.1

AutoGen releases Python v0.5.1 with a breaking type-hint change in AgentChat, replacing `ChatMessage` and `AgentEvent` union types with `BaseChatMessage` and `BaseAgentEvent` base classes to support custom message types.

Apr 4 · · primary fetch1 sourceupdated Apr 4 ·

What's New AgentChat Message Types (Type Hint Changes) [!IMPORTANT] TL;DR: If you are not using custom agents or custom termination conditions, you don't need to change anything. Otherwise, update `AgentEvent` to `BaseAgentEvent` and `ChatMessage` to `BaseChatMessage` in your type hints. This is a breaking change on type hinting only, not on usage. We updated the message types in AgentChat in this new release. The purpose of this change is to support custom message types defined by applications. Previously, message types are fixed and we use the union types `ChatMessage` and `AgentEvent` to refer to all the concrete built-in message types.

Now, in the main branch, the message types are organized into hierarchy: existing built-in concrete message types are subclassing either `BaseChatMessage` and `BaseAgentEvent`, depending it was part of the `ChatMessage` or `AgentEvent` union. We refactored all message handlers `on_messages`, `on_messages_stream`, `run`, `run_stream` and `TerminationCondition` to use the base classes in their type hints. If you are subclassing `BaseChatAgent` to create your custom agents, or subclassing `TerminationCondition` to create your custom termination…

read full article on github.com
§ sources1 publication · timeline below
  1. github.comautogen python-v0.5.1primary
AutoGen — python v0.5.1 · shipfeed