google-gemini / cookbook

Examples and guides for using the Gemini API
https://ai.google.dev/gemini-api/docs
Apache License 2.0
5.48k stars 845 forks source link

Add context caching quickstart #213

Closed markmcd closed 5 months ago

markmcd commented 5 months ago

I used the content from the Apollo 11 example as it is quick to upload & start using (vs a video which needs a wait loop).

This covers cache setup, management & lifecycle, plus demos how to use both chat and generate_content, and shows some token accounting.

review-notebook-app[bot] commented 5 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

random-forests commented 5 months ago

Thank you! This is great. I made minor changes to the prompts (I didn't tell the model it was analyzing a nasa transcript in the SI to make the task more challenging).