返回全部动态

Google Gen AI JavaScript SDK v2.29.0 发布:新增流式续传与用量计费字段

原标题:v2.29.0

Google Gen AI JavaScript SDK Releases一手来源API 更新质量 67

AI 摘要

Google 发布 Gen AI JavaScript SDK v2.29.0,新增流式续传(continuation)相关能力,包括累积流式续传用量元数据、暴露 initialPromptTokenCount、在 Interactions 事件中加入 continuation_token 与 CONTINUATION_REQUIRED 状态,并支持自动消费续传令牌。同时修复了流式续传的边界问题(过期令牌、AbortError、中断后从最新检查点恢复)并提高默认 HTTP 超时。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

## [2.29.0](https://github.com/googleapis/js-genai/compare/v2.28.0...v2.29.0) (2026-10-13) ### Features * accumulate streaming continuation usage metadata and expose initialPromptTokenCount ([dbc961f](https://github.com/googleapis/js-genai/commit/dbc961f0294e3fdc9d8fc277b9921bada8f97b90)) * Add `continuation_token` to the Interactions `interaction.status_update` event. ([a93776c](https://github.com/googleapis/js-genai/commit/a93776c9479d69d280ca1d2fc9784a8cebc5417a)) * Add a CONTINUATION_REQU


发布时间:2026-10-13 12:45
抓取时间:2026-10-13 12:50
来源机构:Google
阅读原文github.com