What happened?
Describe the bug
When I run the code in the cookbook:
One error is encounted:
ValueError: Dataclass has a union type, which is not supported. To use a union, use a Pydantic model
To Reproduce
Steps to reproduce the behavior. Please include code and outputs such as stacktrace.
Just follow the cookbook, step by step, and you will see
Expected behavior
No error
Screenshots

Additional context
autogen_core version: 0.5.1
llama_index version: 0.12.28
Which packages was the bug in?
Python Core (autogen-core)
AutoGen library version.
Python 0.5.1
Other library version.
No response
Model used
gpt-4o
Model provider
Azure OpenAI
Other model provider
No response
Python version
3.12
.NET version
None
Operating system
MacOS