我们发布了 Gemini Interactions API 的思考和签名指南

TL;DR · AI 摘要
Gemini Interactions API 发布了专门的指南,介绍如何处理思考步骤和签名,以保持上下文并简化开发流程。
核心要点
- Gemini Interactions API 引入了 `thought` 步骤,用于加密签名并保留上下文。
- 支持状态模式和无状态模式,简化了签名管理和状态传递。
- 智能兼容性允许在会话中切换模型,后端自动处理旧的思考块。
结构提纲
按章节快速跳转。
- §引言
介绍 Gemini Interactions API 的新功能和指南。
解释 `thought` 步骤的作用和加密签名的用途。
- ·状态模式
描述状态模式下的工作方式,服务器管理所有签名和状态。
说明无状态模式下如何传递完整历史记录,无需手动处理签名。
介绍如何在会话中切换模型,后端自动处理旧的思考块。
强调新的开发体验改进,使开发者能够专注于构建代理行为。
思维导图
用一张图看清主题之间的关系。
查看大纲文本(无障碍 / 无 JS 友好)
- Gemini Interactions API
- 思考步骤和签名
- 加密签名
- 保留上下文
- 状态模式
- 服务器管理签名和状态
- 无状态模式
- 传递完整历史记录
- 智能兼容性
- 切换模型
- 后端处理思考块
- 开发体验提升
- 简化签名管理
- 聚焦代理行为
金句 / Highlights
值得收藏与分享的关键句。
在 Interactions 中,我们有一个专门的 `thought` 步骤,用于加密签名并保留上下文,包含可选的推理摘要。
状态模式:无需操作,服务器为您管理所有签名和状态。
智能兼容性:在会话中切换模型,只需传递旧的思考块;后端处理其余部分。
Here's what you need to https://t.co/xzzP7Q3ZQd" / X
Philipp Schmid on X: "We published a dedicated guide for thinking and signatures for the Gemini Interactions API. In Interactions we have a dedicated `thought` steps an encrypted signature that preserves context across turns and containing a optional summary of the reasoning. Here's what you need to https://t.co/xzzP7Q3ZQd" / X
Don’t miss what’s happening

Philipp Schmid 
We published a dedicated guide for thinking and signatures for the Gemini Interactions API. In Interactions we have a dedicated thought steps an encrypted signature that preserves context across turns and containing a optional summary of the reasoning. Here's what you need to know: - Stateful mode: Nothing to do, the server manages all signatures and state for you. - Stateless mode: Pass the full history back. No need to extract or inject signatures manually. - Smart compatibility: Switch models mid-session and just pass the old thought blocks; the backend handles the rest. - No complex parsing: Keep the thought blocks. Don't edit them, and the model continues reasoning. This is a massive DevX upgrade that lets you focus on building agent behavior instead of wrestling with state and signature validation. Full guide below
·
7
4
56
22
Read 7 replies