-
Notifications
You must be signed in to change notification settings - Fork 126
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
Support for Claude Prompt Caching #927
Comments
I understand your desire to improve Claude's prompt caching feature for large-scale code analysis. Your feedback is valuable and helps address a few usability issues:
Here's a suggested comment to add: Enhancing prompt caching for large-scale code analysis is highly valuable. Your feedback has highlighted important areas for improvement:
Thank you for bringing these issues to our attention. We appreciate your support in improving Claude's capabilities.
|
Prompt caching is implemented: https://microsoft.github.io/genaiscript/reference/scripts/prompt-caching/ I suggest reaching out to Anthropic to change their caching behavior. |
It was updated yesterday! Thank you for adding this feature right away! I updated genaiscript@1.83.4, and I found a small issue:
|
Fixed in next release. For now do |
thank you!👍 |
Sorry, I upgraded to v1.86.4, and this issue still exists. It seems to be because ephemeral is not passed to children. // packages/core/src/promptdom.ts
...
def: async (n) => {
try {
names.add(n.name)
const value = await n.value
n.resolved = value
n.resolved.content = extractRange(n.resolved.content, n)
const rendered = renderDefNode(n)
n.preview = rendered
n.tokens = estimateTokens(rendered, encoder)
+ let defOption = {};
+ if (n.ephemeral) {
+ defOption = { ephemeral: true };
+ }
+ n.children = [createTextNode(rendered, defOption)];
- n.children = [createTextNode(rendered)]
} catch (e) {
n.error = e
}
}, |
I hope to enhance Claude's prompt caching feature, which is very useful for large-scale code analysis.
I want to complain a bit. It's frustrating that any modification to the order or characters of the cached prompts can invalidate the cache. Additionally, it's unclear why cache points need to be marked separately...
https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
https://openrouter.ai/docs/prompt-caching
The text was updated successfully, but these errors were encountered: