-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Enable gemini context caching #3207
base: 0.2
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3207 +/- ##
===========================================
- Coverage 32.90% 13.82% -19.09%
===========================================
Files 94 97 +3
Lines 10235 10849 +614
Branches 2193 2488 +295
===========================================
- Hits 3368 1500 -1868
- Misses 6580 9313 +2733
+ Partials 287 36 -251
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
It's failing to build due to missing |
@yeounoh In your test case, you can move the "import" line into the existing "try...catch..." clause. |
@yeounoh Is this PR ready to be reviewed? |
Hi @yeounoh - we've rebased and updated this for you. there are a couple of conflicts still. If you think this is ready for review please update to resolve the conflicts and then we will review. |
Why are these changes needed?
Gemini model API introduced a new context caching feature that caches the prompt prefix. This PR implements enabled this new feature in GeminiClient to help reduce the cost of using the latest gemini models. Note that this is a gemini specific feature and used for caching the prompt prefix, not agent's input and output.
Related issue number
Addresses/closes #3038
Checks