Anthropic prompt caching middleware.
Requires:
langchain: For agent middleware frameworklangchain-anthropic: For ChatAnthropic model (already a dependency)Anthropic (Claude) chat models.
See the LangChain docs for ChatAnthropic
for tutorials, feature walkthroughs, and examples.
See the Claude Platform docs for a list of the latest models, their capabilities, and pricing.
Prompt Caching Middleware.
Optimizes API usage by caching conversation prefixes for Anthropic models.
Requires both langchain and langchain-anthropic packages to be installed.
Learn more about Anthropic prompt caching here.