Module: RubynCode::LLM::Adapters::PromptCaching
- Included in:
- Anthropic
- Defined in:
- lib/rubyn_code/llm/adapters/prompt_caching.rb
Overview
Anthropic prompt caching logic.
Injects ‘cache_control: { type: ’ephemeral’ }‘ into system blocks, tool definitions, and the last message — enabling Anthropic’s prompt caching to skip re-processing static content across turns.
Constant Summary collapse
- CACHE_EPHEMERAL =
{ type: 'ephemeral' }.freeze
- OAUTH_GATE =
"You are Claude Code, Anthropic's official CLI for Claude."