Google AI Studio API 支持在对话中途追加 system 指令
用 Google AI Studio API 建多轮对话的开发者可以关注:现在能在会话中途追加 system 规则和工具更新,而且之前的轮次缓存不失效,省 token 也省延迟。以前中途改规则得重发整段上下文,现在直接注入就行。
Google AI Studio 推出 API 改进:开发者可在多轮对话中途发送 system_input 步骤,为会话追加新的规则或工具更新,而无需重开会话。
此前 system prompt 只能在对话开头设定,中途改规则意味着重建整段上下文。这次改进的关键在于追加新指令时保留之前轮次的缓存,因此不会破坏 prompt cache,能省下重复计算上下文的 token 费用和延迟。
对构建多轮智能体的开发者来说,动态注入工具变更或行为规则变得更轻量,适合需要在会话中途切换工具集或调整行为的场景。
we shipped a nice API improvement: mid-conversation system instructions🚀 you can send a `system_input` step to append new rules or tool updates while keeping earlier turns cached Google AI Studio @GoogleAIStudio x.com/i/article/2128… 🔗 View Quoted Tweet📊 9 ⚡
This report is categorized under AITOP's "Products" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Google AI Studio, prompt engineering, MCP and tools, agents.
Source attribution: curated from Patrick Loeber (@patloeber).