-
Notifications
You must be signed in to change notification settings - Fork 47
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
Missing Caching Support #395
Comments
Hi @legraphista, :) |
How to use Gemini's Context Caching (on Google Cloud's Vertex AI, with TypeScript)Here's how you'd use Gemini's Context Caching via TypeScript, Google Cloud (Vertex AI), and 1. Evaluate pricingFirst, make sure the pricing (of Gemini's Context Caching) and other benefits (e.g., lower latency) makes sense for your use case. For instance, if you're only making about 10 requests a day, it might not be worth the effort/price. There's also a minimum size for your cache (32,769 tokens as of Sep 30, 2024). 1 token ≈ 3.6 characters. 2. Create
|
Hey @NimJay , can you provide some guidance on how one could later append to the cached content? My use case is Q&A over an increasing set of audio recordings. Ideally I could incrementally append to the content cache with new audio snippets as the recording gets larger. |
Hi @timconnorz,
(I'll reach out to the relevant teams internally.) |
Describe the solution you'd like
Missing caching support equivalent to the Python SDK or Gemini TS SDK
Describe alternatives you've considered
I can create & manage caches with raw requests to the API endpoint, but I cannot use them as the
cached_content
cannot be passed through the library to the requestThe text was updated successfully, but these errors were encountered: