spring-projects / spring-ai

An Application Framework for AI Engineering
https://docs.spring.io/spring-ai/reference/1.0-SNAPSHOT/index.html
Apache License 2.0
2.95k stars 735 forks source link

Add suport to anthropic prompt caching #1403

Open Claudio-code opened 4 days ago

Claudio-code commented 4 days ago

Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.

Expected Behavior

Integration uses cache for many contexts, one of which is cost reduction as shown in the documentation

Current Behavior

Context

The cache is in beta but can already be added to the integration

aleksabl commented 4 days ago

Should probalby look at Geminis context caching as well: https://ai.google.dev/gemini-api/docs/caching