LibreChat/api/server
Danny Avila a45b384bbc
💾 feat: Anthropic Prompt Caching (#3670)
* wip: initial cache control implementation, add typing for transactions handling

* feat: first pass of Anthropic Prompt Caching

* feat: standardize stream usage as pass in when calculating token counts

* feat: Add getCacheMultiplier function to calculate cache multiplier for different valueKeys and cacheTypes

* chore: imports order

* refactor: token usage recording in AnthropicClient, no need to "correct" as we have the correct amount

* feat: more accurate token counting using stream usage data

* feat: Improve token counting accuracy with stream usage data

* refactor: ensure more accurate than not token estimations if custom instructions or files are not being resent with every request

* refactor: cleanup updateUserMessageTokenCount to allow transactions to be as accurate as possible even if we shouldn't update user message token counts

* ci: fix tests
2024-08-17 03:24:09 -04:00
..
controllers 🕸️ refactor: Migrate from crypto to Web Crypto API (#3357) 2024-08-04 23:59:45 -04:00
middleware 💾 feat: Anthropic Prompt Caching (#3670) 2024-08-17 03:24:09 -04:00
routes 🛠️ feat: Azure OpenAI Assistants File Downloads (#3653) 2024-08-15 09:10:12 -04:00
services 💾 feat: Anthropic Prompt Caching (#3670) 2024-08-17 03:24:09 -04:00
utils 🗝️ fix: update webcrypto algorithm name as aes-256-cbc is unrecognized (#3556) 2024-08-05 19:15:32 -04:00
index.js feat: Static File Caching (#3455) 2024-08-04 21:17:59 -04:00
socialLogins.js 🔊 fix(tts): NotAllowedError (mobile/safari), Unsupported MediaSource type (firefox), Hide Audio Element (#2854) 2024-05-24 12:18:11 -04:00