🪙 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:
Danny Avila 2024-03-15 19:48:42 -04:00 committed by GitHub
parent f848d752e0
commit a9d2d3fe40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 128 additions and 22 deletions

View file

@ -52,7 +52,7 @@ export default function Switcher({ isCollapsed }: SwitcherProps) {
const currentAssistant = assistantMap?.[selectedAssistant ?? ''];
return (
<Select defaultValue={selectedAssistant as string | undefined} onValueChange={onSelect}>
<Select value={selectedAssistant as string | undefined} onValueChange={onSelect}>
<SelectTrigger
className={cn(
'flex items-center gap-2 [&>span]:line-clamp-1 [&>span]:flex [&>span]:w-full [&>span]:items-center [&>span]:gap-1 [&>span]:truncate [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0',