mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
🪙 feat: Assistants Token Balance & other improvements (#2114)
* chore: add assistants to supportsBalanceCheck * feat(Transaction): getTransactions and refactor export of model * refactor: use enum: ViolationTypes.TOKEN_BALANCE * feat(assistants): check balance * refactor(assistants): only add promptBuffer if new convo (for title), and remove endpoint definition * refactor(assistants): Count tokens up to the current context window * fix(Switcher): make Select list explicitly controlled * feat(assistants): use assistant's default model when no model is specified instead of the last selected assistant, prevent assistant_id from being recorded in non-assistant endpoints * chore(assistants/chat): import order * chore: bump librechat-data-provider due to changes
This commit is contained in:
parent
f848d752e0
commit
a9d2d3fe40
13 changed files with 128 additions and 22 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "librechat-data-provider",
|
||||
"version": "0.4.8",
|
||||
"version": "0.4.9",
|
||||
"description": "data services for librechat apps",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.es.js",
|
||||
|
|
|
|||
|
|
@ -342,11 +342,12 @@ export const modularEndpoints = new Set<EModelEndpoint | string>([
|
|||
]);
|
||||
|
||||
export const supportsBalanceCheck = {
|
||||
[EModelEndpoint.custom]: true,
|
||||
[EModelEndpoint.openAI]: true,
|
||||
[EModelEndpoint.anthropic]: true,
|
||||
[EModelEndpoint.azureOpenAI]: true,
|
||||
[EModelEndpoint.gptPlugins]: true,
|
||||
[EModelEndpoint.custom]: true,
|
||||
[EModelEndpoint.assistants]: true,
|
||||
[EModelEndpoint.azureOpenAI]: true,
|
||||
};
|
||||
|
||||
export const visionModels = ['gpt-4-vision', 'llava-13b', 'gemini-pro-vision', 'claude-3'];
|
||||
|
|
@ -436,6 +437,10 @@ export enum ViolationTypes {
|
|||
* Illegal Model Request (not available).
|
||||
*/
|
||||
ILLEGAL_MODEL_REQUEST = 'illegal_model_request',
|
||||
/**
|
||||
* Token Limit Violation.
|
||||
*/
|
||||
TOKEN_BALANCE = 'token_balance',
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue