Changes in Autogen release 0.5.1
Microsoft released [version 0.5.1 of the AutoGen](Release python-v0.5.1 · microsoft/autogen) stable build last week, and I quickly reviewed the release notes to verify if there were any breaking changes to what I had been writing so far using AutoGen. There is code refactoring to change the structure of base types. This release provides enhanced support for structured output. When dealing with model clients directly, you can set the json_output
to a Pydantic model. Here is an example from the release notes.
|
|
If you are using AssistantAgent
, you can use the output_content_type
to a Pydantic model that describes the output format. The agent will automatically reflect on the tool call result and generate a StructuredMessage
with the output content type.
|
|
This release also added support for Azure AI Search as a tool, along with enhancements to SelectorGroupChat
and code executors.
While I was testing the older examples I had built for this series, I encountered a deprecation warning.
|
|
I dug a little deeper and understood that the ModelInfo
object with the following structure is necessary in the future.
|
|
If you are using agents or need tool calling, you must set the function_calling
to True
.