Support Vercel AI Data Stream Protocol
Merged
SA
1y ago+8328+8328+0123456789012345678901234567890123456789-1301-1301-0123456789012345678901234567890123456789
To do:
- New tests for UI adapter & event stream
- Docs
- Docstrings
- Create issue for built-in chat app (https://github.com/pydantic/ai-chat-ui) with
clai weborAgent.to_web()?
This adds support for Vercel AI Elements streams to Pydantic AI.
There's an example frontend in a separate repo github.com/pydantic/pydantic-ai-chat the plan is to either make that into a more complete template, or release a pydantic-ai-chat python library which contains a pre-built react frontend.
@DouweM we should rename this to use the proper terminology of the "Vercel AI Data Stream Protocol"
Here's a demo of basic usage:
https://github.com/user-attachments/assets/284b72bb-2303-4faf-8a5b-e041603c4bc7