-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
google-genai [feature]: Context Caching #7169
base: main
Are you sure you want to change the base?
google-genai [feature]: Context Caching #7169
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
8e039e2
to
b065a2f
Compare
Hi @jacoblee93, we've implemented the foundational structure for context caching with files. Could you take a look and let us know if the code aligns with our intended design? Thank you! |
b065a2f
to
6658acb
Compare
Looks reasonable to me - @afirstenberg can you have a look? It looks similar to some work you've done on Vertex. We will also want to write up some docs! |
model.enableCachedContent(cachedContent); | ||
}, 10 * 60 * 1000); // Set timeout to 10 minutes to upload file | ||
|
||
test("Test Google AI", async () => { |
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.
I think this should be part of the same test? Otherwise it will fail in isolation
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.
Thank you for taking the time to review this. Regarding your comment, could you please clarify how to reproduce the test failure? My understanding is that the beforeAll
hook, which is handling the setup and file uploading, runs before any tests, so I'm not entirely sure what you mean by suggesting that they should be part of the same test.
We will be working on the docs now, but please keep us updated if there's any suggestion on the design or the tests. Thank you both! |
@jacoblee93 @afirstenberg We currently add a wrapper around |
Fixes #5841
Implemented conetxt caching feature for google-genai, we now allow user to caching a file and create gen-ai model base on the cached content