Introducing explicit prompt caching with open-weight models on Amazon Bedrock
许多生成式AI应用会在每次请求时重新发送相同的长上下文。提示缓存功能使Amazon Bedrock上的开源权重模型能够重复使用该上下文,从而减少输入成本和延迟。本文展示了通过Chat Completions API实现的隐式和显式缓存,并将缓存应用到OpenCode编码代理会话中。
Many generative AI applications resend the same long context on every request. Prompt caching lets open-weight models on Amazon Bedrock reuse it to reduce input cost and latency. This post shows implicit and explicit caching through the Chat Completions API and applies caching to an OpenCode coding agent session.