mirror of
https://github.com/microsoft/autogen.git
synced 2025-06-26 22:30:10 +00:00

## Why are these changes needed? This PR fixes a `TypeError: Cannot instantiate typing.Union` that occurs when using the `MultimodalWebSurfer_agent` with Anthropic models. The error was caused by the incorrect usage of `typing.Union` as a class constructor instead of a type hint within the `_anthropic_client.py` file. The code was attempting to instantiate `typing.Union`, which is not allowed. The fix correctly uses `typing.Union` within type hints, and uses the correct `Base64ImageSourceParam` type. It also updates the `pyproject.toml` dependency. ## Related issue number Closes #6035 ## Checks - [ ] I've included any doc changes needed for <https://microsoft.github.io/autogen/>. See <https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to build and test documentation locally. - [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [v] I've made sure all auto checks have passed. --------- Co-authored-by: Victor Dibia <victordibia@microsoft.com>
AutoGen Extensions
AutoGen is designed to be extensible. The autogen-ext
package contains many different component implementations maintained by the AutoGen project. However, we strongly encourage others to build their own components and publish them as part of the ecosytem.