2 ms·
Hello, I am the author of avante.nvim. Thank you for your suggestion, it's very helpful for avante.nvim! I plan to abandon nui.nvim for implementing the UI (ac
by yetone 2y ago
Hello, I am the author of avante.nvim. Thank you for your suggestion, it's very helpful for avante.nvim!
I plan to abandon nui.nvim for implementing the UI (actually, we only use nui's Split now, so it's exceptionally simple to abandon). Regarding the tiktoken_core issue, everything we did was just to make installation easier for users. However, the problem you mentioned is indeed an issue. I plan to revert to our previous approach: only providing installation documentation for tiktoken_core instead of automatically installing it for users.
As for why avante.nvim must depend on tiktoken_core, it's because I've used the powerful prompts caching feature recently introduced by the Anthropic API. This feature can greatly help users save tokens and significantly improve response speed. However, this feature requires relatively accurate token count calculations, as it only takes effect for tokens greater than 1024; otherwise, adding the caching parameter will result in an error.
- gsuuon 2y agoThe docs say that cache_control is just ignored[1] if less than 1024 tokens, maybe it's a bug if it's erroring instead? [1] https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching#cache-limitations https://docs.anthropic.com/en/docs/build-with-claude/prompt-...