A chat model that uses the Bedrock API.
Bedrock chat model integration built on the Bedrock converse API.
This implementation will eventually replace the existing ChatBedrock implementation once the Bedrock converse API has feature parity with older Bedrock API. Specifically the converse API does not yet support custom Bedrock models.
Prompt Caching Middleware for ChatBedrock and ChatBedrockConverse.
Optimizes API usage by caching conversation prefixes for supported models on AWS Bedrock. Supports Anthropic Claude and Amazon Nova models.
For ChatBedrock (InvokeModel API), adds cache_control to the last
message's content block. For ChatBedrockConverse (Converse API), appends
cachePoint blocks to the system prompt and last message.
Requires both 'langchain' and 'langchain-aws' packages to be installed.
Learn more about prompt caching at:
Anthropic <https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching>AWS Bedrock <https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html>