LibreChat/api/models/schema
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
..
action.js 🔧 fix: Remove Unique Index from Actions Model and Initialize Empty Actions for Deletion (#2118) 2024-03-16 18:53:43 -04:00
assistant.js 🔧 feat: Share Assistant Actions between Users (#2116) 2024-03-16 16:49:11 -04:00
balance.js feat: Accurate Token Usage Tracking & Optional Balance (#1018) 2023-10-05 18:34:10 -04:00
categories.js 🗨️ feat: Prompts (#3131) 2024-06-20 20:24:32 -04:00
conversationTagSchema.js 🔖 feat: Conversation Bookmarks (#3344) 2024-07-29 10:45:59 -04:00
convoSchema.js 🧹 chore: pre-release cleanup 2 (#3600) 2024-08-09 15:17:13 -04:00
defaults.js 🔖 feat: Conversation Bookmarks (#3344) 2024-07-29 10:45:59 -04:00
fileSchema.js 📧 feat: email verification (#2344) 2024-06-07 15:06:47 -04:00
key.js feat: Accurate Token Usage Tracking & Optional Balance (#1018) 2023-10-05 18:34:10 -04:00
messageSchema.js 🤲 feat(a11y): Initial a11y improvements, added linters, tests; fix: close sidebars in mobile view (#3536) 2024-08-04 20:39:52 -04:00
pluginAuthSchema.js feat: ChatGPT Plugins/OpenAPI specs for Plugins Endpoint (#620) 2023-07-16 12:19:47 -04:00
presetSchema.js feat: Implement Default Preset Selection for Conversations 📌 (#1275) 2023-12-06 14:00:15 -05:00
projectSchema.js 🗨️ feat: Prompts (#3131) 2024-06-20 20:24:32 -04:00
promptSchema.js 🗨️ feat: Prompt Slash Commands (#3219) 2024-06-27 17:34:48 -04:00
roleSchema.js 🗨️ feat: Prompts (#3131) 2024-06-20 20:24:32 -04:00
shareSchema.js 🚀 feat: Shared Links (#2772) 2024-05-17 18:13:32 -04:00
tokenSchema.js 📧 feat: email verification (#2344) 2024-06-07 15:06:47 -04:00
transaction.js 💾 feat: Anthropic Prompt Caching (#3670) 2024-08-17 03:24:09 -04:00
userSchema.js 👷‍♂️ chore: pass Tavily Response error and revert test commit on userSchema.js (#3496) 2024-07-31 12:06:27 -04:00