Skip to content
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

[FEAT]: Prompt Caching for Claude Sonnet 3.5 #2500

Open
brian12184 opened this issue Oct 18, 2024 · 0 comments
Open

[FEAT]: Prompt Caching for Claude Sonnet 3.5 #2500

brian12184 opened this issue Oct 18, 2024 · 0 comments
Labels
enhancement New feature or request feature request

Comments

@brian12184
Copy link

What would you like to see?

It would be helpful to support prompt caching for Claude 3.5 Sonnet. This not only helps cut down on LLM costs, but also latency.

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

This can be done by adding an extra header, as an example...

with anthropic_client.beta.prompt_caching.messages.stream( system=system_prompt, model="claude-3-5-sonnet-20240620", max_tokens=8000, temperature=0, messages=messages, extra_headers={"anthropic-beta": "prompt-caching-2024-07-31"} ) as stream:

@brian12184 brian12184 added enhancement New feature or request feature request labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request
Projects
None yet
Development

No branches or pull requests

1 participant