Commit graph

2170 commits

Author SHA1 Message Date
Danny Avila
17e9de4eaa
fix: setShowStopButton for agents route 2024-09-04 00:34:05 -04:00
Danny Avila
89eeb71373
refactor: improve typing of Text part 2024-09-04 00:33:01 -04:00
Danny Avila
a1cd9983e8
refactor: don't make instructions required 2024-09-04 00:29:38 -04:00
Danny Avila
b71d773f01
fix: role initialization 2024-09-04 00:15:36 -04:00
Danny Avila
350d709763
fix: handle text parts with tool_call_ids and empty text 2024-09-03 23:15:29 -04:00
Danny Avila
0c04018bb3
fix(Anthropic): messages.X.content.Y.tool_use.input: Input should be a valid dictionary 2024-09-03 22:52:08 -04:00
Danny Avila
9ff43bf958
chore: update @librechat/agents dependency to version 1.4.7 for tool_call_ids edge case 2024-09-03 22:16:47 -04:00
Danny Avila
2931d1d9cb
feat: add agent roles/permissions 2024-09-03 22:03:59 -04:00
Danny Avila
e54352e4c7
refactor: explicit typing for SharePrompt 2024-09-03 18:56:46 -04:00
Danny Avila
0a328e643d
refactor: update SharePrompt dialog theme styles 2024-09-03 18:52:52 -04:00
Danny Avila
3f36bc89bb
fix: share prompt a11y issue 2024-09-03 18:51:07 -04:00
Danny Avila
43b280fb5d
fix: getResponseModel 2024-09-03 18:50:11 -04:00
Danny Avila
dd90907a18
fix: agents query 2024-09-03 18:49:15 -04:00
Danny Avila
3f694f2e25
feat: agent share global methods/controllers 2024-09-03 18:17:44 -04:00
Danny Avila
72dfcb9dc9
refactor: use Constants value for GLOBAL_PROJECT_NAME (enum) 2024-09-03 18:00:39 -04:00
Danny Avila
7d303b3581
refactor: update DynamicSlider component styles 2024-09-03 16:40:21 -04:00
Danny Avila
3d50a4f6f8
refactor: update Slider component to allow custom track class name 2024-09-03 15:29:20 -04:00
Danny Avila
52fd59de0e
refactor: dynamic settings touch-ups 2024-09-03 15:24:32 -04:00
Danny Avila
d325fb7cad
fix: use of new dynamic tags causing application crash 2024-09-03 14:44:57 -04:00
Danny Avila
22a1bdbd7a
fix: agent actions 2024-09-03 12:59:22 -04:00
Danny Avila
9a9f993f32
fix: agent icons/labels for messages 2024-09-03 12:57:44 -04:00
Danny Avila
2150c4815d
refactor: dynamic form elements using react-hook-form Controllers 2024-09-03 11:38:55 -04:00
Danny Avila
fac2acd4cf
fix(bedrock/agents): message regeneration 2024-09-03 08:05:06 -04:00
Danny Avila
b41e39e6e5
refactor: remove unnecessary assignment of parentMessageId (agent request handler) 2024-09-03 08:04:19 -04:00
Danny Avila
b615c4c7ec
refactor: Remove unnecessary assignment of parentMessageId in AskController 2024-09-03 07:46:38 -04:00
Danny Avila
345748a6ab
refactor: Update Agents.ToolCallDelta type 2024-09-03 07:02:17 -04:00
Danny Avila
e478e10c96
fix: types for step handler 2024-09-03 07:00:18 -04:00
Danny Avila
fbead7de40
fix: use endpointOption.model_parameters not endpointOption.modelOptions 2024-09-03 06:59:59 -04:00
Danny Avila
edcc66685a
fix: Bedrock response sender 2024-09-02 21:40:38 -04:00
Danny Avila
d66a35887d
refactor: non-assistant message content, parts 2024-09-02 21:20:34 -04:00
Danny Avila
2c2dd57af5
refactor(useGenerationsByLatest): make agents and bedrock editable 2024-09-02 20:51:20 -04:00
Danny Avila
9cda192c1b
chore: Update EditIcon props type 2024-09-02 20:45:02 -04:00
Danny Avila
16106e0969
WIP: agent provider schema parsing 2024-09-02 16:10:00 -04:00
Danny Avila
11eb215922
feat: AWS Bedrock icons 2024-09-02 15:11:06 -04:00
Danny Avila
7d54f7147f
feat: abort agent requests 2024-09-02 14:06:39 -04:00
Danny Avila
757f544a9b
feat: backend content aggregation for agents/bedrock 2024-09-02 13:02:47 -04:00
Danny Avila
16ba3ed243
chore: Update @librechat/agents dependency to version 1.4.5 2024-09-02 13:01:31 -04:00
Danny Avila
6d30726113
fix: declare endpoint in initialization step 2024-09-02 10:07:24 -04:00
Danny Avila
60ee12d3e8
feat: first pass, bedrock chat. note: AgentClient is returning agents as conversation.endpoint 2024-09-02 10:07:23 -04:00
Danny Avila
120a6a55fb
feat: EModelEndpoint.bedrock 2024-09-02 10:07:23 -04:00
Danny Avila
f08a4226e8
feat: Add BedrockIcon component to SVG library 2024-09-02 10:07:22 -04:00
Danny Avila
9ec665dd2c
🪟 fix: Windows Build (npm) (#3889)
* chore: package-lock.json

* chore: remove shadcn files (temp)

* refactor: language comparisons script

* fix: resolve package-lock file for windows compatibility

* chore: Enable Windows unit tests for frontend

* refactor: move shadcn components to data-provider
2024-09-02 10:01:09 -04:00
Danny Avila
136599081c
🧩 fix: plugins build options, prevent undefined tools error (#3876) 2024-09-01 08:35:05 -04:00
Danny Avila
a0291ed155
🚧 chore: merge latest dev build to main repo (#3844)
* agents - phase 1 (#30)

* chore: copy assistant files

* feat: frontend and data-provider

* feat: backend get endpoint test

* fix(MessageEndpointIcon): switched to AgentName and AgentAvatar

* fix: small fixes

* fix: agent endpoint config

* fix: show Agent Builder

* chore: install agentus

* chore: initial scaffolding for agents

* fix: updated Assistant logic to Agent Logic for some Agent components

* WIP first pass, demo of agent package

* WIP: initial backend infra for agents

* fix: agent list error

* wip: agents routing

* chore: Refactor useSSE hook to handle different data events

* wip: correctly emit events

* chore: Update @librechat/agentus npm dependency to version 1.0.9

* remove comment

* first pass: streaming agent text

* chore: Remove @librechat/agentus root-level workspace npm dependency

* feat: Agent Schema and Model

* fix: content handling fixes

* fix: content message save

* WIP: new content data

* fix: run step issue with tool calls

* chore: Update @librechat/agentus npm dependency to version 1.1.5

* feat: update controller and agent routes

* wip: initial backend tool and tool error handling support

* wip: tool chunks

* chore: Update @librechat/agentus npm dependency to version 1.1.7

* chore: update tool_call typing, add test conditions and logs

* fix: create agent

* fix: create agent

* first pass: render completed content parts

* fix: remove logging, fix step handler typing

* chore: Update @librechat/agentus npm dependency to version 1.1.9

* refactor: cleanup maps on unmount

* chore: Update BaseClient.js to safely count tokens for string, number, and boolean values

* fix: support subsequent messages with tool_calls

* chore: export order

* fix: select agent

* fix: tool call types and handling

* chore: switch to anthropic for testing

* fix: AgentSelect

* refactor: experimental: OpenAIClient to use array for intermediateReply

* fix(useSSE): revert old condition for streaming legacy client tokens

* fix: lint

* revert `agent_id` to `id`

* chore: update localization keys for agent-related components

* feat: zod schema handling for actions

* refactor(actions): if no params, no zodSchema

* chore: Update @librechat/agentus npm dependency to version 1.2.1

* feat: first pass, actions

* refactor: empty schema for actions without params

* feat: Update createRun function to accept additional options

* fix: message payload formatting; feat: add more client options

* fix: ToolCall component rendering when action has no args but has output

* refactor(ToolCall): allow non-stringy args

* WIP: first pass, correctly formatted tool_calls between providers

* refactor: Remove duplicate import of 'roles' module

* refactor: Exclude 'vite.config.ts' from TypeScript compilation

* refactor: fix agent related types
> - no need to use endpoint/model fields for identifying agent metadata
> - add `provider` distinction for agent-configured 'endpoint'
- no need for agent-endpoint map
- reduce complexity of tools as functions into tools as string[]
- fix types related to above changes
- reduce unnecessary variables for queries/mutations and corresponding react-query keys

* refactor: Add tools and tool_kwargs fields to agent schema

* refactor: Remove unused code and update dependencies

* refactor: Update updateAgentHandler to use req.body directly

* refactor: Update AgentSelect component to use localized hooks

* refactor: Update agent schema to include tools and provider fields

* refactor(AgentPanel): add scrollbar gutter, add provider field to form, fix agent schema required values

* refactor: Update AgentSwitcher component to use selectedAgentId instead of selectedAgent

* refactor: Update AgentPanel component to include alternateName import and defaultAgentFormValues

* refactor(SelectDropDown): allow setting value as option while still supporting legacy usage (string values only)

* refactor: SelectDropdown changes - Only necessary when the available values are objects with label/value fields and the selected value is expected to be a string.

* refactor: TypeError issues and handle provider as option

* feat: Add placeholder for provider selection in AgentPanel component

* refactor: Update agent schema to include author and provider fields

* fix: show expected 'create agent' placeholder when creating agent

* chore: fix localization strings, hide capabilities form for now

* chore: typing

* refactor: import order and use compact agents schema for now

* chore: typing

* refactor: Update AgentForm type to use AgentCapabilities

* fix agent form agent selection issues

* feat: responsive agent selection

* fix: Handle cancelled fetch in useSelectAgent hook

* fix: reset agent form on accordion close/open

* feat: Add agent_id to default conversation for agents endpoint

* feat: agents endpoint request handling

* refactor: reset conversation model on agent select

* refactor: add `additional_instructions` to conversation schema, organize other fields

* chore: casing

* chore: types

* refactor(loadAgentTools): explicitly pass agent_id, do not pass `model` to loadAgentTools for now, load action sets by agent_id

* WIP: initial draft of real agent client initialization

* WIP: first pass, anthropic agent requests

* feat: remember last selected agent

* feat: openai and azure connected

* fix: prioritize agent model for runs unless an explicit override model is passed from client

* feat: Agent Actions

* fix: save agent id to convo

* feat: model panel (#29)

* feat: model panel

* bring back comments

* fix: method still null

* fix: AgentPanel FormContext

* feat: add more parameters

* fix: style issues; refactor: Agent Controller

* fix: cherry-pick

* fix: Update AgentAvatar component to use AssistantIcon instead of BrainCircuit

* feat: OGDialog for delete agent; feat(assistant): update Agent types, introduced `model_parameters`

* feat: icon and general `model_parameters` update

* feat: use react-hook-form better

* fix: agent builder form reset issue when switching panels

* refactor: modularize agent builder form

---------

Co-authored-by: Danny Avila <danny@librechat.ai>

* fix: AgentPanel and ModelPanel type issues and use `useFormContext` and `watch` instead of `methods` directly and `useWatch`.

* fix: tool call issues due to invalid input (anthropic) of empty string

* fix: handle empty text in Part component

---------

Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>

* refactor: remove form ModelPanel and fixed nested ternary expressions in AgentConfig

* fix: Model Parameters not saved correctly

* refactor: remove console log

* feat: avatar upload and get for Agents (#36)

Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>

* chore: update to public package

* fix: typing, optional chaining

* fix: cursor not showing for content parts

* chore: conditionally enable agents

* ci: fix azure test

* ci: fix frontend tests, fix eslint api

* refactor: Remove unused errorContentPart variable

* continue of the agent message PR (#40)

* last fixes

* fix: agentMap

* pr merge test  (#41)

* fix: model icon not fetching correctly

* remove console logs

* feat: agent name

* refactor: pass documentsMap as a prop to allow re-render of assistant form

* refactor: pass documentsMap as a prop to allow re-render of assistant form

* chore: Bump version to 0.7.419

* fix: TypeError: Cannot read properties of undefined (reading 'id')

* refactor: update AgentSwitcher component to use ControlCombobox instead of Combobox

---------

Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
2024-08-31 16:33:51 -04:00
Max Sanna
618be4bf2b
⚖️ feat: Terms and Conditions Dialog (#3712)
* Added UI for Terms and Conditions Modal Dialogue

* Handled the logout on not accepting

* Added logic for terms acceptance

* Add terms and conditions modal

* Fixed bug on terms and conditions modal, clicking out of it won't close it now

* Added acceptance of Terms to Database

* Removed unnecessary api endpoints from index.js

* Added NPM script to reset terms acceptance

* Added translations, markdown terms and samples

* Merged terms and conditions modal feature

* feat/Modal Terms and Conditions Dialog

* Amendments as requested by maintainers

* Reset package-lock (again)
2024-08-31 16:08:04 -04:00
Marco Beretta
79f9cd5a4d
💬 feat: assistant conversation starter (#3699)
* feat: initial UI convoStart

* fix: ConvoStarter UI

* fix: convoStarters bug

* feat: Add input field focus on conversation starters

* style: conversation starter UI update

* feat: apply fixes for starters

* style: update conversationStarters UI and fixed typo

* general UI update

* feat: Add onClick functionality to ConvoStarter component

* fix: quick fix test

* fix(AssistantSelect): remove object check

* fix: updateAssistant `conversation_starters` var

* chore: remove starter autofocus

* fix: no empty conversation starters, always show input, use Constants value for max count

* style: Update defaultTextPropsLabel styles, for a11y placeholder

* refactor: Update ConvoStarter component styles and class names for a11y and theme

* refactor: convostarter, move plus button to within persistent element

* fix: types

* chore: Update landing page assistant description styling with theming

* chore: assistant types

* refactor: documents routes

* refactor: optimize conversation starter mutations/queries

* refactor: Update listAllAssistants return type to Promise<Array<Assistant>>

* feat: edit existing starters

* feat(convo-starters): enhance ConvoStarter component and add animations

    - Update ConvoStarter component styling for better visual appeal
    - Implement fade-in animation for smoother appearance
    - Add hover effect with background color change
    - Improve text overflow handling with line-clamp and text-balance
    - Ensure responsive design for various screen sizes

* feat(assistant): add conversation starters to assistant builder

- Add localization strings for conversation starters
- Update mobile.css with shake animation for max starters reached
- Enhance user experience with tooltips and dynamic input handling

* refactor: select specific fields for assistant documents fetch

* refactor: remove endpoint query key, fetch all assistant docs for now, add conversation_starters to v1 methods

* refactor: add document filters based on endpoint config

* fix: starters not applied during creation

* refactor: update AssistantSelect component to handle undefined lastSelectedModels

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2024-08-31 13:42:20 -04:00
Max Sanna
63b80c3067
🗣️ fix: Azure OpenAI STT (#3731)
* Fix for Azure OpenAI STT

* chore(STTService): imports order

---------

Co-authored-by: Danny Avila <danacordially@gmail.com>
2024-08-30 15:11:15 -04:00
Danny Avila
7536e649d4
🚨 feat: Implement INPUT_LENGTH Error Type (#3866)
* feat: CONTEXT_LENGTH error type

* chore: rename error type

* chore: import order
2024-08-30 15:01:29 -04:00
Danny Avila
6936d0059f
🎨 refactor: Prevent Font Asset Hashing in Vite Config (#3865) 2024-08-30 13:56:49 -04:00
Danny Avila
0a359aa705
👐 a11y: Accessible Conversation Menu Options (#3864)
* fix: type issues

* feat: Fix document title setting in Conversation component

* style: new chat theme

* fix: No keyboard access to chat menus in the chat history #3788

* fix: Menu button in the chat history area does not indicate its state #3823

* refactor: use ariakit for DropdownPopup

* style: update sticky z-index in NewChat component

* style: update ConvoOptions menu button styling
2024-08-30 13:39:30 -04:00