Open amatiytsiv opened 3 months ago
any plans on implementing this possibility into dify core and tools as by other tools I can see a significant profit from using these as money saving
It is a bit of a complicated feature to implement, because cache is not set in model config options - but per prompt.
So we need a way through the UI to specify that a certain prompt should be cached - similar to how you can enable jinja templates with a slider.
I have made a working version that just uses specific tags to trigger caching, but I don't think Dify would be interested in this solution, as it's a poor UX solution
It is a bit of a complicated feature to implement, because cache is not set in model config options - but per prompt.
So we need a way through the UI to specify that a certain prompt should be cached - similar to how you can enable jinja templates with a slider.
I have made a working version that just uses specific tags to trigger caching, but I don't think Dify would be interested in this solution, as it's a poor UX solution
I believe conversational checkbox next to send button is way to go for now. But most importantly it also has to be implemented as configurable variable in workflow and agents, it can serve as quick job done, avoiding or even preparing good RAG
Hi, @amatiytsiv. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.
Issue Summary
Next Steps
Thank you for your understanding and contribution!
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
anthropic announced support for caching it would be nice to have it in model config options: https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
2. Additional context or comments
No response
3. Can you help us with this feature?