anthropics / anthropic-cookbook

A collection of notebooks/recipes showcasing some fun and effective ways of using Claude.
MIT License
6.74k stars 854 forks source link

Prompt caching tutorial error #84

Open alexander-zuev opened 2 months ago

alexander-zuev commented 2 months ago

At the very first step in the prompt caching tutorial, I get the following error while following the tutorial steps: anthropic.BadRequestError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'prompt is too long: 206657 tokens > 199999 maximum'}}

I am following the code exactly up to the step where the non-cached request is supposed to be sent.