-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add anthropic_cache_messages model setting and automatically strip cache points over the limit
#3442
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
base: main
Are you sure you want to change the base?
Conversation
|
One more thing, if enable |
|
@DouweM You're right, we can handle this more generically:
|
ec1dcb5 to
b4862a0
Compare
CachePoint stripping in AnthropicModel
CachePoint stripping in AnthropicModelanthropic_cache_messages model setting and automatically strip cache points over the limit
docs/models/anthropic.md
Outdated
| async def main(): | ||
| # First call - writes to cache | ||
| result1 = await agent.run([ | ||
| async def main(): # noqa: F811 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this noqa for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test_examples.py seems to complain about main being declared but not used. Maybe I can just use run_sync
Co-authored-by: Douwe Maan <me@douwe.me>
closes #3441
closes #3467