From 40491e5ba67e4e5017841c9874fc64347a2f7880 Mon Sep 17 00:00:00 2001 From: Test Date: Sat, 24 Aug 2024 10:59:14 -0700 Subject: [PATCH] Update anthropicllm.md --- .../reference/Model Providers/anthropicllm.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/docs/reference/Model Providers/anthropicllm.md b/docs/docs/reference/Model Providers/anthropicllm.md index 309f29ab2..a29bf34a9 100644 --- a/docs/docs/reference/Model Providers/anthropicllm.md +++ b/docs/docs/reference/Model Providers/anthropicllm.md @@ -16,3 +16,24 @@ To setup Anthropic, obtain an API key from [here](https://www.anthropic.com/api) ``` [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Anthropic.ts) + +## Prompt caching + +Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching). + +Currently, we only allow caching of the system message. To enable this feature, update your your model configuration with `"cacheSystemMessage": true`: + +```json +{ + "models": [ + { + // Enable prompt caching + "cacheSystemMessage": true, + "title": "Anthropic", + "provider": "anthropic", + "model": "claude-3-5-sonnet-20240620", + "apiKey": "YOUR_API_KEY" + } + ] +} +```