-
Notifications
You must be signed in to change notification settings - Fork 6k
add cachePoint to messages #18130
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?
add cachePoint to messages #18130
Conversation
@logan-markewich would you be able to help to get this passing CI? |
possibly blocked by aio-libs/aiobotocore#1315 |
Hmm, is |
This PR needs to wait until aiobotocore is updated to 2.22.1 and aioboto3 to 14.4.0. Otherwise, even though boto3 and aioboto3 can individually use prompt caching, there will be version conflicts when they coexist. |
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # #17895
GA for Sonnet 3.7 & Haiku 3.5 as of today - https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html
Needs botocore 1.37.25 - boto/botocore@84c9bc4#diff-f8e2002ec5dd2b5567da9fc62aa733ebd26a8a0be2cbe6900d392526138ae5dd
Note: prompt caching for system prompt & tool specs can be enabled by adding the following kwargs to
llm.achat_with_tools()
:system=[{"cachePoint": {"type": "default"}}]
toolConfig={"tools": [{"cachePoint": {"type": "default"}}]}
Version Bump?
Did I bump the version in the
pyproject.toml
file of the package I am updating? (Except for thellama-index-core
package)Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.
Suggested Checklist:
make format; make lint
to appease the lint gods