This lesson is for members. Join us?
Subscribe now to get instant access to this course, plus a full library of Vue.js courses tailored to the plan you choose.
Prompt Caching with the AI SDK
In this lesson, learn what prompt caching is and how it can save you money and latency. Prompt caching comes in 2 flavors: implicit and explicit and exact results depend on the provider and model used.
Take advantage of implicit caching simply by making multiple requests with the the exact same tokens at the start of the prompt within a tight timeframe. Use explicit caching, by storing a reference to cached token ids and manually passing those to subsequent requests.
Links
