LibreChat/api
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
..
app 💾 feat: Anthropic Prompt Caching (#3670) 2024-08-17 03:24:09 -04:00
cache 🛂 feat: Added Security for Conversation Access (#3588) 2024-08-08 12:14:00 -04:00
config 🌿 fix: Message Route Improvements pt. 2 (#3379) 2024-07-18 13:56:19 -04:00
lib 📥 feat: Import Conversations from LibreChat, ChatGPT, Chatbot UI (#2355) 2024-05-02 02:48:26 -04:00
models 💾 feat: Anthropic Prompt Caching (#3670) 2024-08-17 03:24:09 -04:00
server 💾 feat: Anthropic Prompt Caching (#3670) 2024-08-17 03:24:09 -04:00
strategies 🕸️ refactor: Migrate from crypto to Web Crypto API (#3357) 2024-08-04 23:59:45 -04:00
test 📥 feat: Import Conversations from LibreChat, ChatGPT, Chatbot UI (#2355) 2024-05-02 02:48:26 -04:00
utils 🪙 feat: Update Token Values for gpt-4o-2024-08-06 and AWS Models (#3594) 2024-08-08 23:31:07 -04:00
jest.config.js fix: Enhance Test Coverage and Fix Compatibility Issues 👷‍♂️ (#1363) 2023-12-15 13:27:13 -05:00
jsconfig.json feat(api): initial Redis support; fix(SearchBar): proper debounce (#1039) 2023-10-11 17:05:47 -04:00
package.json v0.7.4 (#3603) 2024-08-10 08:32:27 -04:00
typedefs.js 💾 feat: Anthropic Prompt Caching (#3670) 2024-08-17 03:24:09 -04:00