Skip to content

Cache control support #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 6, 2024
Merged

Cache control support #27

merged 7 commits into from
Sep 6, 2024

Conversation

fumito-ito
Copy link
Owner

refs: https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching

Prompt Caching is a powerful feature that optimizes your API usage by allowing resuming from specific prefixes in your prompts. This approach significantly reduces processing time and costs for repetitive tasks or prompts with consistent elements.

Here’s an example of how to implement Prompt Caching with the Messages API using a cache_control in system prompt.

@fumito-ito fumito-ito merged commit 0f48d12 into main Sep 6, 2024
1 check passed
@fumito-ito fumito-ito deleted the feature/cache-control branch September 6, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant