返回全部动态
PydanticAI v2.40.0 发布:新增实时会话功能与多项修复
原标题:v2.40.0 (2026-09-04)
AI 摘要
PydanticAI 发布 v2.40.0 版本,新增了后台更新价格、会话中的 barge-in 处理、事件监听器注册、RealtimeSession 的 respond 和 enqueue 方法等功能。同时修复了多个实时音频和流处理相关的 bug,包括 OpenAI Responses 流终止事件的 finish_reason 映射、音频块类型检查、工具失败时的视图终止等问题。
以上摘要由 AI 生成,可能存在误差。事实请以原文为准。
正文节选
<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### 🚀 Features * Add `pydantic_ai.prices.update_in_background()` by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/4841 * Handle barge-in in the session: `handle_barge_in=True`, `interrupt(played_bytes=...)`, and `played_audio_bytes` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7870 * Add `provider_factory` to `infer_realtime_model` by @DouweM in https://github.com/py
发布时间:2026-09-05 08:09
抓取时间:2026-09-05 09:02
来源机构:Pydantic