🤖 feat: OpenAI Assistants v2 (initial support) (#2781)
* 🤖 Assistants V2 Support: Part 1
- Separated Azure Assistants to its own endpoint
- File Search / Vector Store integration is incomplete, but can toggle and use storage from playground
- Code Interpreter resource files can be added but not deleted
- GPT-4o is supported
- Many improvements to the Assistants Endpoint overall
data-provider v2 changes
copy existing route as v1
chore: rename new endpoint to reduce comparison operations and add new azure filesource
api: add azureAssistants part 1
force use of version for assistants/assistantsAzure
chore: switch name back to azureAssistants
refactor type version: string | number
Ensure assistants endpoints have version set
fix: isArchived type issue in ConversationListParams
refactor: update assistants mutations/queries with endpoint/version definitions, update Assistants Map structure
chore: FilePreview component ExtendedFile type assertion
feat: isAssistantsEndpoint helper
chore: remove unused useGenerations
chore(buildTree): type issue
chore(Advanced): type issue (unused component, maybe in future)
first pass for multi-assistant endpoint rewrite
fix(listAssistants): pass params correctly
feat: list separate assistants by endpoint
fix(useTextarea): access assistantMap correctly
fix: assistant endpoint switching, resetting ID
fix: broken during rewrite, selecting assistant mention
fix: set/invalidate assistants endpoint query data correctly
feat: Fix issue with assistant ID not being reset correctly
getOpenAIClient helper function
feat: add toast for assistant deletion
fix: assistants delete right after create issue for azure
fix: assistant patching
refactor: actions to use getOpenAIClient
refactor: consolidate logic into helpers file
fix: issue where conversation data was not initially available
v1 chat support
refactor(spendTokens): only early return if completionTokens isNaN
fix(OpenAIClient): ensure spendTokens has all necessary params
refactor: route/controller logic
fix(assistants/initializeClient): use defaultHeaders field
fix: sanitize default operation id
chore: bump openai package
first pass v2 action service
feat: retroactive domain parsing for actions added via v1
feat: delete db records of actions/assistants on openai assistant deletion
chore: remove vision tools from v2 assistants
feat: v2 upload and delete assistant vision images
WIP first pass, thread attachments
fix: show assistant vision files (save local/firebase copy)
v2 image continue
fix: annotations
fix: refine annotations
show analyze as error if is no longer submitting before progress reaches 1 and show file_search as retrieval tool
fix: abort run, undefined endpoint issue
refactor: consolidate capabilities logic and anticipate versioning
frontend version 2 changes
fix: query selection and filter
add endpoint to unknown filepath
add file ids to resource, deleting in progress
enable/disable file search
remove version log
* 🤖 Assistants V2 Support: Part 2
🎹 fix: Autocompletion Chrome Bug on Action API Key Input
chore: remove `useOriginNavigate`
chore: set correct OpenAI Storage Source
fix: azure file deletions, instantiate clients by source for deletion
update code interpret files info
feat: deleteResourceFileId
chore: increase poll interval as azure easily rate limits
fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records
file source icons
update table file filters
chore: file search info and versioning
fix: retrieval update with necessary tool_resources if specified
fix(useMentions): add optional chaining in case listMap value is undefined
fix: force assistant avatar roundedness
fix: azure assistants, check correct flag
chore: bump data-provider
* fix: merge conflict
* ci: fix backend tests due to new updates
* chore: update .env.example
* meilisearch improvements
* localization updates
* chore: update comparisons
* feat: add additional metadata: endpoint, author ID
* chore: azureAssistants ENDPOINTS exclusion warning
2024-05-19 12:56:55 -04:00
|
|
|
import type { AssistantsEndpoint } from './schemas';
|
2025-04-17 03:07:43 +02:00
|
|
|
import * as q from './types/queries';
|
🔧 refactor: Organize Sharing/Agent Components and Improve Type Safety
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids, rename enums to PascalCase
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids
chore: move sharing related components to dedicated "Sharing" directory
chore: remove PublicSharingToggle component and update index exports
chore: move non-sidepanel agent components to `~/components/Agents`
chore: move AgentCategoryDisplay component with tests
chore: remove commented out code
refactor: change PERMISSION_BITS from const to enum for better type safety
refactor: reorganize imports in GenericGrantAccessDialog and update index exports for hooks
refactor: update type definitions to use ACCESS_ROLE_IDS for improved type safety
refactor: remove unused canAccessPromptResource middleware and related code
refactor: remove unused prompt access roles from createAccessRoleMethods
refactor: update resourceType in AclEntry type definition to remove unused 'prompt' value
refactor: introduce ResourceType enum and update resourceType usage across data provider files for improved type safety
refactor: update resourceType usage to ResourceType enum across sharing and permissions components for improved type safety
refactor: standardize resourceType usage to ResourceType enum across agent and prompt models, permissions controller, and middleware for enhanced type safety
refactor: update resourceType references from PROMPT_GROUP to PROMPTGROUP for consistency across models, middleware, and components
refactor: standardize access role IDs and resource type usage across agent, file, and prompt models for improved type safety and consistency
chore: add typedefs for TUpdateResourcePermissionsRequest and TUpdateResourcePermissionsResponse to enhance type definitions
chore: move SearchPicker to PeoplePicker dir
refactor: implement debouncing for query changes in SearchPicker for improved performance
chore: fix typing, import order for agent admin settings
fix: agent admin settings, prevent agent form submission
refactor: rename `ACCESS_ROLE_IDS` to `AccessRoleIds`
refactor: replace PermissionBits with PERMISSION_BITS
refactor: replace PERMISSION_BITS with PermissionBits
2025-07-28 17:52:36 -04:00
|
|
|
import { ResourceType } from './accessPermissions';
|
🤖 feat: OpenAI Assistants v2 (initial support) (#2781)
* 🤖 Assistants V2 Support: Part 1
- Separated Azure Assistants to its own endpoint
- File Search / Vector Store integration is incomplete, but can toggle and use storage from playground
- Code Interpreter resource files can be added but not deleted
- GPT-4o is supported
- Many improvements to the Assistants Endpoint overall
data-provider v2 changes
copy existing route as v1
chore: rename new endpoint to reduce comparison operations and add new azure filesource
api: add azureAssistants part 1
force use of version for assistants/assistantsAzure
chore: switch name back to azureAssistants
refactor type version: string | number
Ensure assistants endpoints have version set
fix: isArchived type issue in ConversationListParams
refactor: update assistants mutations/queries with endpoint/version definitions, update Assistants Map structure
chore: FilePreview component ExtendedFile type assertion
feat: isAssistantsEndpoint helper
chore: remove unused useGenerations
chore(buildTree): type issue
chore(Advanced): type issue (unused component, maybe in future)
first pass for multi-assistant endpoint rewrite
fix(listAssistants): pass params correctly
feat: list separate assistants by endpoint
fix(useTextarea): access assistantMap correctly
fix: assistant endpoint switching, resetting ID
fix: broken during rewrite, selecting assistant mention
fix: set/invalidate assistants endpoint query data correctly
feat: Fix issue with assistant ID not being reset correctly
getOpenAIClient helper function
feat: add toast for assistant deletion
fix: assistants delete right after create issue for azure
fix: assistant patching
refactor: actions to use getOpenAIClient
refactor: consolidate logic into helpers file
fix: issue where conversation data was not initially available
v1 chat support
refactor(spendTokens): only early return if completionTokens isNaN
fix(OpenAIClient): ensure spendTokens has all necessary params
refactor: route/controller logic
fix(assistants/initializeClient): use defaultHeaders field
fix: sanitize default operation id
chore: bump openai package
first pass v2 action service
feat: retroactive domain parsing for actions added via v1
feat: delete db records of actions/assistants on openai assistant deletion
chore: remove vision tools from v2 assistants
feat: v2 upload and delete assistant vision images
WIP first pass, thread attachments
fix: show assistant vision files (save local/firebase copy)
v2 image continue
fix: annotations
fix: refine annotations
show analyze as error if is no longer submitting before progress reaches 1 and show file_search as retrieval tool
fix: abort run, undefined endpoint issue
refactor: consolidate capabilities logic and anticipate versioning
frontend version 2 changes
fix: query selection and filter
add endpoint to unknown filepath
add file ids to resource, deleting in progress
enable/disable file search
remove version log
* 🤖 Assistants V2 Support: Part 2
🎹 fix: Autocompletion Chrome Bug on Action API Key Input
chore: remove `useOriginNavigate`
chore: set correct OpenAI Storage Source
fix: azure file deletions, instantiate clients by source for deletion
update code interpret files info
feat: deleteResourceFileId
chore: increase poll interval as azure easily rate limits
fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records
file source icons
update table file filters
chore: file search info and versioning
fix: retrieval update with necessary tool_resources if specified
fix(useMentions): add optional chaining in case listMap value is undefined
fix: force assistant avatar roundedness
fix: azure assistants, check correct flag
chore: bump data-provider
* fix: merge conflict
* ci: fix backend tests due to new updates
* chore: update .env.example
* meilisearch improvements
* localization updates
* chore: update comparisons
* feat: add additional metadata: endpoint, author ID
* chore: azureAssistants ENDPOINTS exclusion warning
2024-05-19 12:56:55 -04:00
|
|
|
|
2025-04-15 10:04:00 +02:00
|
|
|
// Testing this buildQuery function
|
|
|
|
const buildQuery = (params: Record<string, unknown>): string => {
|
|
|
|
const query = Object.entries(params)
|
|
|
|
.filter(([, value]) => {
|
|
|
|
if (Array.isArray(value)) {
|
|
|
|
return value.length > 0;
|
|
|
|
}
|
|
|
|
return value !== undefined && value !== null && value !== '';
|
|
|
|
})
|
|
|
|
.map(([key, value]) => {
|
|
|
|
if (Array.isArray(value)) {
|
|
|
|
return value.map((v) => `${key}=${encodeURIComponent(v)}`).join('&');
|
|
|
|
}
|
|
|
|
return `${key}=${encodeURIComponent(String(value))}`;
|
|
|
|
})
|
|
|
|
.join('&');
|
|
|
|
return query ? `?${query}` : '';
|
|
|
|
};
|
|
|
|
|
2024-08-09 02:11:56 -04:00
|
|
|
export const health = () => '/health';
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const user = () => '/api/user';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
feat: Accurate Token Usage Tracking & Optional Balance (#1018)
* refactor(Chains/llms): allow passing callbacks
* refactor(BaseClient): accurately count completion tokens as generation only
* refactor(OpenAIClient): remove unused getTokenCountForResponse, pass streaming var and callbacks in initializeLLM
* wip: summary prompt tokens
* refactor(summarizeMessages): new cut-off strategy that generates a better summary by adding context from beginning, truncating the middle, and providing the end
wip: draft out relevant providers and variables for token tracing
* refactor(createLLM): make streaming prop false by default
* chore: remove use of getTokenCountForResponse
* refactor(agents): use BufferMemory as ConversationSummaryBufferMemory token usage not easy to trace
* chore: remove passing of streaming prop, also console log useful vars for tracing
* feat: formatFromLangChain helper function to count tokens for ChatModelStart
* refactor(initializeLLM): add role for LLM tracing
* chore(formatFromLangChain): update JSDoc
* feat(formatMessages): formats langChain messages into OpenAI payload format
* chore: install openai-chat-tokens
* refactor(formatMessage): optimize conditional langChain logic
fix(formatFromLangChain): fix destructuring
* feat: accurate prompt tokens for ChatModelStart before generation
* refactor(handleChatModelStart): move to callbacks dir, use factory function
* refactor(initializeLLM): rename 'role' to 'context'
* feat(Balance/Transaction): new schema/models for tracking token spend
refactor(Key): factor out model export to separate file
* refactor(initializeClient): add req,res objects to client options
* feat: add-balance script to add to an existing users' token balance
refactor(Transaction): use multiplier map/function, return balance update
* refactor(Tx): update enum for tokenType, return 1 for multiplier if no map match
* refactor(Tx): add fair fallback value multiplier incase the config result is undefined
* refactor(Balance): rename 'tokens' to 'tokenCredits'
* feat: balance check, add tx.js for new tx-related methods and tests
* chore(summaryPrompts): update prompt token count
* refactor(callbacks): pass req, res
wip: check balance
* refactor(Tx): make convoId a String type, fix(calculateTokenValue)
* refactor(BaseClient): add conversationId as client prop when assigned
* feat(RunManager): track LLM runs with manager, track token spend from LLM,
refactor(OpenAIClient): use RunManager to create callbacks, pass user prop to langchain api calls
* feat(spendTokens): helper to spend prompt/completion tokens
* feat(checkBalance): add helper to check, log, deny request if balance doesn't have enough funds
refactor(Balance): static check method to return object instead of boolean now
wip(OpenAIClient): implement use of checkBalance
* refactor(initializeLLM): add token buffer to assure summary isn't generated when subsequent payload is too large
refactor(OpenAIClient): add checkBalance
refactor(createStartHandler): add checkBalance
* chore: remove prompt and completion token logging from route handler
* chore(spendTokens): add JSDoc
* feat(logTokenCost): record transactions for basic api calls
* chore(ask/edit): invoke getResponseSender only once per API call
* refactor(ask/edit): pass promptTokens to getIds and include in abort data
* refactor(getIds -> getReqData): rename function
* refactor(Tx): increase value if incomplete message
* feat: record tokenUsage when message is aborted
* refactor: subtract tokens when payload includes function_call
* refactor: add namespace for token_balance
* fix(spendTokens): only execute if corresponding token type amounts are defined
* refactor(checkBalance): throws Error if not enough token credits
* refactor(runTitleChain): pass and use signal, spread object props in create helpers, and use 'call' instead of 'run'
* fix(abortMiddleware): circular dependency, and default to empty string for completionTokens
* fix: properly cancel title requests when there isn't enough tokens to generate
* feat(predictNewSummary): custom chain for summaries to allow signal passing
refactor(summaryBuffer): use new custom chain
* feat(RunManager): add getRunByConversationId method, refactor: remove run and throw llm error on handleLLMError
* refactor(createStartHandler): if summary, add error details to runs
* fix(OpenAIClient): support aborting from summarization & showing error to user
refactor(summarizeMessages): remove unnecessary operations counting summaryPromptTokens and note for alternative, pass signal to summaryBuffer
* refactor(logTokenCost -> recordTokenUsage): rename
* refactor(checkBalance): include promptTokens in errorMessage
* refactor(checkBalance/spendTokens): move to models dir
* fix(createLanguageChain): correctly pass config
* refactor(initializeLLM/title): add tokenBuffer of 150 for balance check
* refactor(openAPIPlugin): pass signal and memory, filter functions by the one being called
* refactor(createStartHandler): add error to run if context is plugins as well
* refactor(RunManager/handleLLMError): throw error immediately if plugins, don't remove run
* refactor(PluginsClient): pass memory and signal to tools, cleanup error handling logic
* chore: use absolute equality for addTitle condition
* refactor(checkBalance): move checkBalance to execute after userMessage and tokenCounts are saved, also make conditional
* style: icon changes to match official
* fix(BaseClient): getTokenCountForResponse -> getTokenCount
* fix(formatLangChainMessages): add kwargs as fallback prop from lc_kwargs, update JSDoc
* refactor(Tx.create): does not update balance if CHECK_BALANCE is not enabled
* fix(e2e/cleanUp): cleanup new collections, import all model methods from index
* fix(config/add-balance): add uncaughtException listener
* fix: circular dependency
* refactor(initializeLLM/checkBalance): append new generations to errorMessage if cost exceeds balance
* fix(handleResponseMessage): only record token usage in this method if not error and completion is not skipped
* fix(createStartHandler): correct condition for generations
* chore: bump postcss due to moderate severity vulnerability
* chore: bump zod due to low severity vulnerability
* chore: bump openai & data-provider version
* feat(types): OpenAI Message types
* chore: update bun lockfile
* refactor(CodeBlock): add error block formatting
* refactor(utils/Plugin): factor out formatJSON and cn to separate files (json.ts and cn.ts), add extractJSON
* chore(logViolation): delete user_id after error is logged
* refactor(getMessageError -> Error): change to React.FC, add token_balance handling, use extractJSON to determine JSON instead of regex
* fix(DALL-E): use latest openai SDK
* chore: reorganize imports, fix type issue
* feat(server): add balance route
* fix(api/models): add auth
* feat(data-provider): /api/balance query
* feat: show balance if checking is enabled, refetch on final message or error
* chore: update docs, .env.example with token_usage info, add balance script command
* fix(Balance): fallback to empty obj for balance query
* style: slight adjustment of balance element
* docs(token_usage): add PR notes
2023-10-05 18:34:10 -04:00
|
|
|
export const balance = () => '/api/balance';
|
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const userPlugins = () => '/api/user/plugins';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
2024-06-06 01:35:12 +02:00
|
|
|
export const deleteUser = () => '/api/user/delete';
|
|
|
|
|
2025-04-17 03:07:43 +02:00
|
|
|
export const messages = (params: q.MessagesListParams) => {
|
|
|
|
const { conversationId, messageId, ...rest } = params;
|
|
|
|
|
|
|
|
if (conversationId && messageId) {
|
|
|
|
return `/api/messages/${conversationId}/${messageId}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (conversationId) {
|
|
|
|
return `/api/messages/${conversationId}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
return `/api/messages${buildQuery(rest)}`;
|
|
|
|
};
|
2023-07-30 10:37:25 -04:00
|
|
|
|
🚀 feat: Shared Links (#2772)
* ✨ feat(types): add necessary types for shared link feature
* ✨ feat: add shared links functions to data service
Added functions for retrieving, creating, updating, and deleting shared links and shared messages.
* ✨ feat: Add useGetSharedMessages hook to fetch shared messages by shareId
Adds a new hook `useGetSharedMessages` which fetches shared messages based on the provided shareId.
* ✨ feat: Add share schema and data access functions to API models
* ✨ feat: Add share endpoint to API
The GET /api/share/${shareId} is exposed to the public, so authentication is not required. Other paths require authentication.
* ♻️ refactor(utils): generalize react-query cache manipulation functions
Introduces generic functions for manipulating react-query cache entries, marking a refinement in how query cache data is managed. It aims to enhance the flexibility and reusability of the cache interaction patterns within our application.
- Replaced specific index names with more generic terms in queries.ts, enhancing consistency across data handling functions.
- Introduced new utility functions in collection.ts for adding, updating, and deleting data entries in an InfiniteData<TCollection>. These utility functions (`addData`, `updateData`, `deleteData`, `findPage`) are designed to be re-usable across different data types and collections.
- Adapted existing conversation utility functions in convos.ts to leverage these new generic utilities.
* ✨ feat(shared-link): add functions to manipulate shared link cache list
implemented new utility functions to handle additions, updates, and deletions in the shared link cache list.
* ✨ feat: Add mutations and queries for shared links
* ✨ feat(shared-link): add `Share` button to conversation list
- Added a share button in each conversation in the conversation list.
- Implemented functionality where clicking the share button triggers a POST request to the API.
- The API checks if a share link was already created for the conversation today; if so, it returns the existing link.
- If no link was created for today, the API will create a new share link and return it.
- Each click on the share button results in a new API request, following the specification similar to ChatGPT's share link feature.
* ♻️ refactor(hooks): generalize useNavScrolling for broader use
- Modified `useNavScrolling` to accept a generic type parameter `TData`, allowing it to be used with different data structures besides `ConversationListResponse`.
- Updated instances in `Nav.tsx` and `ArchivedChatsTable.tsx` to explicitly specify `ConversationListResponse` as the type argument when invoking `useNavScrolling`.
* ✨ feat(settings): add shared links listing table with delete functionality in settings
- Integrated a delete button for each shared link in the table, allowing users to remove links as needed.
* ♻️ refactor(components): separate `EndpointIcon` from `Icon` component for standalone use
* ♻️ refactor: update useGetSharedMessages to return TSharedLink
- Modified the useGetSharedMessages hook to return not only a list of TMessage but also the TSharedLink itself.
- This change was necessary to support displaying the title and date in the Shared Message UI, which requires data from TSharedLink.
* ✨ feat(shared link): add UI for displaying shared conversations without authentication
- Implemented a new UI component to display shared conversations, designed to be accessible without requiring authentication.
- Reused components from the authenticated Messages module where possible. Copied and adapted components that could not be directly reused to fit the non-authenticated context.
* 🔧 chore: Add translations
Translate labels only. Messages remain in English as they are possibly subject to change.
* ♻️ refactor: add icon and tooltip props to EditMenuButton component
* moved icon and popover to arguments so that EditMenuButton can be reused.
* modified so that when a ShareButton is closed, the parent DropdownMenu is also closed.
* ♻️irefactor: added DropdownMenu for Export and Share
* ♻️ refactor: renamed component names more intuitive
* More accurate naming of the dropdown menu.
* When the export button is closed, the parent dropdown menu is also closed.
* 🌍 chore: updated translations
* 🐞 Fix: OpenID Profile Image Download (#2757)
* Add fetch requirement
Fixes - error: [openidStrategy] downloadImage: Error downloading image at URL "https://graph.microsoft.com/v1.0/me/photo/$value": TypeError: response.buffer is not a function
* Update openidStrategy.js
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
* 🚑 fix(export): Issue exporting Conversation with Assistants (#2769)
* 🚑 fix(export): use content as text if content is present in the message
If the endpoint is assistants, the text of the message goes into content, not message.text.
* refactor(ExportModel): TypeScript, remove unused code
---------
Co-authored-by: Yuichi Ohneda <ohneda@gmail.com>
* 📤style: export button icon (#2752)
* refactor(ShareDialog): logic and styling
* refactor(ExportAndShareMenu): imports order and icon update
* chore: imports
* chore: imports/render logic
* feat: message branching
* refactor: add optional config to useGetStartupConfig
* refactor: disable endpoints query
* chore: fix search view styling gradient in light mode
* style: ShareView gradient styling
* refactor(Share): use select queries
* style: shared link table buttons
* localization and dark text styling
* style: fix clipboard button layout shift app-wide and add localization for copy code
* support assistants message content in shared links, add useCopyToClipboard, add copy buttons to Search Messages and Shared Link Messages
* add localizations
* comparisons
---------
Co-authored-by: Yuichi Ohneda <ohneda@gmail.com>
Co-authored-by: bsu3338 <bsu3338@users.noreply.github.com>
Co-authored-by: Fuegovic <32828263+fuegovic@users.noreply.github.com>
2024-05-17 18:13:32 -04:00
|
|
|
const shareRoot = '/api/share';
|
|
|
|
export const shareMessages = (shareId: string) => `${shareRoot}/${shareId}`;
|
2025-01-21 15:31:05 +01:00
|
|
|
export const getSharedLink = (conversationId: string) => `${shareRoot}/link/${conversationId}`;
|
|
|
|
export const getSharedLinks = (
|
|
|
|
pageSize: number,
|
|
|
|
isPublic: boolean,
|
|
|
|
sortBy: 'title' | 'createdAt',
|
|
|
|
sortDirection: 'asc' | 'desc',
|
|
|
|
search?: string,
|
|
|
|
cursor?: string,
|
|
|
|
) =>
|
|
|
|
`${shareRoot}?pageSize=${pageSize}&isPublic=${isPublic}&sortBy=${sortBy}&sortDirection=${sortDirection}${
|
|
|
|
search ? `&search=${search}` : ''
|
|
|
|
}${cursor ? `&cursor=${cursor}` : ''}`;
|
|
|
|
export const createSharedLink = (conversationId: string) => `${shareRoot}/${conversationId}`;
|
|
|
|
export const updateSharedLink = (shareId: string) => `${shareRoot}/${shareId}`;
|
🚀 feat: Shared Links (#2772)
* ✨ feat(types): add necessary types for shared link feature
* ✨ feat: add shared links functions to data service
Added functions for retrieving, creating, updating, and deleting shared links and shared messages.
* ✨ feat: Add useGetSharedMessages hook to fetch shared messages by shareId
Adds a new hook `useGetSharedMessages` which fetches shared messages based on the provided shareId.
* ✨ feat: Add share schema and data access functions to API models
* ✨ feat: Add share endpoint to API
The GET /api/share/${shareId} is exposed to the public, so authentication is not required. Other paths require authentication.
* ♻️ refactor(utils): generalize react-query cache manipulation functions
Introduces generic functions for manipulating react-query cache entries, marking a refinement in how query cache data is managed. It aims to enhance the flexibility and reusability of the cache interaction patterns within our application.
- Replaced specific index names with more generic terms in queries.ts, enhancing consistency across data handling functions.
- Introduced new utility functions in collection.ts for adding, updating, and deleting data entries in an InfiniteData<TCollection>. These utility functions (`addData`, `updateData`, `deleteData`, `findPage`) are designed to be re-usable across different data types and collections.
- Adapted existing conversation utility functions in convos.ts to leverage these new generic utilities.
* ✨ feat(shared-link): add functions to manipulate shared link cache list
implemented new utility functions to handle additions, updates, and deletions in the shared link cache list.
* ✨ feat: Add mutations and queries for shared links
* ✨ feat(shared-link): add `Share` button to conversation list
- Added a share button in each conversation in the conversation list.
- Implemented functionality where clicking the share button triggers a POST request to the API.
- The API checks if a share link was already created for the conversation today; if so, it returns the existing link.
- If no link was created for today, the API will create a new share link and return it.
- Each click on the share button results in a new API request, following the specification similar to ChatGPT's share link feature.
* ♻️ refactor(hooks): generalize useNavScrolling for broader use
- Modified `useNavScrolling` to accept a generic type parameter `TData`, allowing it to be used with different data structures besides `ConversationListResponse`.
- Updated instances in `Nav.tsx` and `ArchivedChatsTable.tsx` to explicitly specify `ConversationListResponse` as the type argument when invoking `useNavScrolling`.
* ✨ feat(settings): add shared links listing table with delete functionality in settings
- Integrated a delete button for each shared link in the table, allowing users to remove links as needed.
* ♻️ refactor(components): separate `EndpointIcon` from `Icon` component for standalone use
* ♻️ refactor: update useGetSharedMessages to return TSharedLink
- Modified the useGetSharedMessages hook to return not only a list of TMessage but also the TSharedLink itself.
- This change was necessary to support displaying the title and date in the Shared Message UI, which requires data from TSharedLink.
* ✨ feat(shared link): add UI for displaying shared conversations without authentication
- Implemented a new UI component to display shared conversations, designed to be accessible without requiring authentication.
- Reused components from the authenticated Messages module where possible. Copied and adapted components that could not be directly reused to fit the non-authenticated context.
* 🔧 chore: Add translations
Translate labels only. Messages remain in English as they are possibly subject to change.
* ♻️ refactor: add icon and tooltip props to EditMenuButton component
* moved icon and popover to arguments so that EditMenuButton can be reused.
* modified so that when a ShareButton is closed, the parent DropdownMenu is also closed.
* ♻️irefactor: added DropdownMenu for Export and Share
* ♻️ refactor: renamed component names more intuitive
* More accurate naming of the dropdown menu.
* When the export button is closed, the parent dropdown menu is also closed.
* 🌍 chore: updated translations
* 🐞 Fix: OpenID Profile Image Download (#2757)
* Add fetch requirement
Fixes - error: [openidStrategy] downloadImage: Error downloading image at URL "https://graph.microsoft.com/v1.0/me/photo/$value": TypeError: response.buffer is not a function
* Update openidStrategy.js
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
* 🚑 fix(export): Issue exporting Conversation with Assistants (#2769)
* 🚑 fix(export): use content as text if content is present in the message
If the endpoint is assistants, the text of the message goes into content, not message.text.
* refactor(ExportModel): TypeScript, remove unused code
---------
Co-authored-by: Yuichi Ohneda <ohneda@gmail.com>
* 📤style: export button icon (#2752)
* refactor(ShareDialog): logic and styling
* refactor(ExportAndShareMenu): imports order and icon update
* chore: imports
* chore: imports/render logic
* feat: message branching
* refactor: add optional config to useGetStartupConfig
* refactor: disable endpoints query
* chore: fix search view styling gradient in light mode
* style: ShareView gradient styling
* refactor(Share): use select queries
* style: shared link table buttons
* localization and dark text styling
* style: fix clipboard button layout shift app-wide and add localization for copy code
* support assistants message content in shared links, add useCopyToClipboard, add copy buttons to Search Messages and Shared Link Messages
* add localizations
* comparisons
---------
Co-authored-by: Yuichi Ohneda <ohneda@gmail.com>
Co-authored-by: bsu3338 <bsu3338@users.noreply.github.com>
Co-authored-by: Fuegovic <32828263+fuegovic@users.noreply.github.com>
2024-05-17 18:13:32 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
const keysEndpoint = '/api/keys';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const keys = () => keysEndpoint;
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const userKeyQuery = (name: string) => `${keysEndpoint}?name=${name}`;
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const revokeUserKey = (name: string) => `${keysEndpoint}/${name}`;
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const revokeAllUserKeys = () => `${keysEndpoint}?all=true`;
|
2023-07-30 10:37:25 -04:00
|
|
|
|
2024-05-02 08:48:26 +02:00
|
|
|
export const conversationsRoot = '/api/convos';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
2025-04-17 03:07:43 +02:00
|
|
|
export const conversations = (params: q.ConversationListParams) => {
|
2025-04-15 10:04:00 +02:00
|
|
|
return `${conversationsRoot}${buildQuery(params)}`;
|
|
|
|
};
|
2023-07-30 10:37:25 -04:00
|
|
|
|
2024-05-02 08:48:26 +02:00
|
|
|
export const conversationById = (id: string) => `${conversationsRoot}/${id}`;
|
♾️ style: Infinite Scroll Nav and Sort Convos by Date/Usage (#1708)
* Style: Infinite Scroll and Group convos by date
* Style: Infinite Scroll and Group convos by date- Redesign NavBar
* Style: Infinite Scroll and Group convos by date- Redesign NavBar - Clean code
* Style: Infinite Scroll and Group convos by date- Redesign NavBar - Redesign NewChat Component
* Style: Infinite Scroll and Group convos by date- Redesign NavBar - Redesign NewChat Component
* Style: Infinite Scroll and Group convos by date- Redesign NavBar - Redesign NewChat Component
* Including OpenRouter and Mistral icon
* refactor(Conversations): cleanup use of utility functions and typing
* refactor(Nav/NewChat): use localStorage `lastConversationSetup` to determine the endpoint to use, as well as icons -> JSX components, remove use of `endpointSelected`
* refactor: remove use of `isFirstToday`
* refactor(Nav): remove use of `endpointSelected`, consolidate scrolling logic to its own hook `useNavScrolling`, remove use of recoil `conversation`
* refactor: Add spinner to bottom of list, throttle fetching, move query hooks to client workspace
* chore: sort by `updatedAt` field
* refactor: optimize conversation infinite query, use optimistic updates, add conversation helpers for managing pagination, remove unnecessary operations
* feat: gen_title route for generating the title for the conversation
* style(Convo): change hover bg-color
* refactor: memoize groupedConversations and return as array of tuples, correctly update convos pre/post message stream, only call genTitle if conversation is new, make `addConversation` dynamically either add/update depending if convo exists in pages already, reorganize type definitions
* style: rename Header NewChat Button -> HeaderNewChat, add NewChatIcon, closely match main Nav New Chat button to ChatGPT
* style(NewChat): add hover bg color
* style: cleanup comments, match ChatGPT nav styling, redesign search bar, make part of new chat sticky header, move Nav under same parent as outlet/mobilenav, remove legacy code, search only if searchQuery is not empty
* feat: add tests for conversation helpers and ensure no duplicate conversations are ever grouped
* style: hover bg-color
* feat: alt-click on convo item to open conversation in new tab
* chore: send error message when `gen_title` fails
---------
Co-authored-by: Walber Cardoso <walbercardoso@gmail.com>
2024-02-03 20:25:35 -05:00
|
|
|
|
2024-05-02 08:48:26 +02:00
|
|
|
export const genTitle = () => `${conversationsRoot}/gen_title`;
|
2023-07-30 10:37:25 -04:00
|
|
|
|
2024-05-02 08:48:26 +02:00
|
|
|
export const updateConversation = () => `${conversationsRoot}/update`;
|
|
|
|
|
2025-04-15 10:04:00 +02:00
|
|
|
export const deleteConversation = () => `${conversationsRoot}`;
|
|
|
|
|
|
|
|
export const deleteAllConversation = () => `${conversationsRoot}/all`;
|
2024-05-02 08:48:26 +02:00
|
|
|
|
|
|
|
export const importConversation = () => `${conversationsRoot}/import`;
|
|
|
|
|
🌿 feat: Fork Messages/Conversations (#2617)
* typedef for ImportBatchBuilder
* feat: first pass, fork conversations
* feat: fork - getMessagesUpToTargetLevel
* fix: additional tests and fix getAllMessagesUpToParent
* chore: arrow function return
* refactor: fork 3 options
* chore: remove unused genbuttons
* chore: remove unused hover buttons code
* feat: fork first pass
* wip: fork remember setting
* style: user icon
* chore: move clear chats to data tab
* WIP: fork UI options
* feat: data-provider fork types/services/vars and use generic MutationOptions
* refactor: use single param for fork option, use enum, fix mongo errors, use Date.now(), add records flag for testing, use endpoint from original convo and messages, pass originalConvo to finishConversation
* feat: add fork mutation hook and consolidate type imports
* refactor: use enum
* feat: first pass, fork mutation
* chore: add enum for target level fork option
* chore: add enum for target level fork option
* show toast when checking remember selection
* feat: splitAtTarget
* feat: split at target option
* feat: navigate to new fork, show toasts, set result query data
* feat: hover info for all fork options
* refactor: add Messages settings tab
* fix(Fork): remember text info
* ci: test for single message and is target edge case
* feat: additional tests for getAllMessagesUpToParent
* ci: additional tests and cycle detection for getMessagesUpToTargetLevel
* feat: circular dependency checks for getAllMessagesUpToParent
* fix: getMessagesUpToTargetLevel circular dep. check
* ci: more tests for getMessagesForConversation
* style: hover text for checkbox fork items
* refactor: add statefulness to conversation import
2024-05-05 11:48:20 -04:00
|
|
|
export const forkConversation = () => `${conversationsRoot}/fork`;
|
|
|
|
|
2024-12-18 11:10:34 -05:00
|
|
|
export const duplicateConversation = () => `${conversationsRoot}/duplicate`;
|
|
|
|
|
2025-04-15 10:04:00 +02:00
|
|
|
export const search = (q: string, cursor?: string | null) =>
|
|
|
|
`/api/search?q=${q}${cursor ? `&cursor=${cursor}` : ''}`;
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const searchEnabled = () => '/api/search/enable';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const presets = () => '/api/presets';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const deletePreset = () => '/api/presets/delete';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const aiEndpoints = () => '/api/endpoints';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
2023-12-06 19:36:57 -05:00
|
|
|
export const endpointsConfigOverride = () => '/api/endpoints/config/override';
|
|
|
|
|
2023-09-18 12:55:51 -04:00
|
|
|
export const models = () => '/api/models';
|
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const tokenizer = () => '/api/tokenizer';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const login = () => '/api/auth/login';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const logout = () => '/api/auth/logout';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const register = () => '/api/auth/register';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const loginFacebook = () => '/api/auth/facebook';
|
2023-07-30 10:37:25 -04:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const loginGoogle = () => '/api/auth/google';
|
|
|
|
|
2024-11-12 16:41:04 -05:00
|
|
|
export const refreshToken = (retry?: boolean) =>
|
|
|
|
`/api/auth/refresh${retry === true ? '?retry=true' : ''}`;
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
|
|
|
|
export const requestPasswordReset = () => '/api/auth/requestPasswordReset';
|
|
|
|
|
|
|
|
export const resetPassword = () => '/api/auth/resetPassword';
|
|
|
|
|
2024-06-07 21:06:47 +02:00
|
|
|
export const verifyEmail = () => '/api/user/verify';
|
|
|
|
|
|
|
|
export const resendVerificationEmail = () => '/api/user/verify/resend';
|
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const plugins = () => '/api/plugins';
|
|
|
|
|
2025-07-21 14:49:19 -07:00
|
|
|
export const mcpReinitialize = (serverName: string) => `/api/mcp/${serverName}/reinitialize`;
|
🔌 feat: MCP Reinitialization and OAuth in UI (#8598)
* ✨ feat: Add connection status endpoint for MCP servers
- Implemented a new endpoint to retrieve the connection status of all MCP servers without disconnecting idle connections.
- Enhanced MCPManager class with a method to get all user-specific connections.
* feat: add silencer arg to loadCustomConfig function to conditionally print config details
- Modified loadCustomConfig to accept a printConfig parameter that allows me to prevent the entire custom config being printed every time it is called
* fix: new status endpoint actually works now, changes to manager.ts to support it
- Updated the connection status endpoint to utilize Maps for app and user connections, rather than incorrectly treating them as objects.
- Introduced a new method + variable in MCPManager to track servers requiring OAuth discovered at startup.
- Stopped OAuth flow from continuing once detected during startup for a new connection
* refactor: Remove hasAuthConfig since we can get that on the frontend without needing to use the endpoint
* feat: Add MCP connection status query and query key for new endpoint
- Introduced a new query hook `useMCPConnectionStatusQuery` to fetch the connection status of MCP servers.
- Added request in data-service
- Defined the API endpoint for retrieving MCP connection status in api-endpoints.ts.
- Defined new types for MCP connection status responses in the types module.
- Added mcpConnectionStatus key
* feat: Enhance MCPSelect component with connection status and server configuration
- Added connection status handling for MCP servers using the new `useMCPConnectionStatusQuery` hook.
- Implemented logic to display appropriate status icons based on connection state and authentication configuration.
- Updated the server selection logic to utilize configured MCP servers from the startup configuration.
- Refactored the rendering of configuration buttons and status indicators for improved user interaction.
* refactor: move MCPConfigDialog to its own MCP subdir in ui and update import
* refactor: silence loadCustomConfig in status endpoint
* feat: Add optional pluginKey parameter to getUserPluginAuthValue
* feat: Add MCP authentication values endpoint and related queries
- Implemented a new endpoint to check authentication value flags for specific MCP servers, returning boolean indicators for each custom user variable.
- Added a corresponding query hook `useMCPAuthValuesQuery` to fetch authentication values from the frontend.
- Defined the API endpoint for retrieving MCP authentication values in api-endpoints.ts.
- Updated data-service to include a method for fetching MCP authentication values.
- Introduced new types for MCP authentication values responses in the types module.
- Added a new query key for MCP authentication values.
* feat: Localize MCPSelect component status labels and aria attributes
- Updated the MCPSelect component to use localized strings for connection status labels and aria attributes, enhancing accessibility and internationalization support.
- Added new translation keys for various connection states in the translation.json file.
* feat: Implement filtered MCP values selection based on connection status in MCPSelect
- Added a new `filteredSetMCPValues` function to ensure only connected servers are selectable in the MCPSelect component.
- Updated the rendering logic to visually indicate the connection status of servers by adjusting opacity.
- Enhanced accessibility by localizing the aria-label for the configuration button.
* feat: Add CustomUserVarsSection component for managing user variables
- Introduced a new `CustomUserVarsSection` component to allow users to configure custom variables for MCP servers.
- Integrated localization for user interface elements and added new translation keys for variable management.
- Added functionality to save and revoke user variables, with visual indicators for set/unset states.
* feat: Enhance MCPSelect and MCPConfigDialog with improved state management and UI updates
- Integrated `useQueryClient` to refetch queries for tools, authentication values, and connection status upon successful plugin updates in MCPSelect.
- Simplified plugin key handling by directly using the formatted plugin key in save and revoke operations.
- Updated MCPConfigDialog to include server status indicators and improved dialog content structure for better user experience.
- Added new translation key for active status in the localization files.
* feat: Enhance MCPConfigDialog with dynamic server status badges and localization updates
- Added a helper function to render status badges based on the connection state of the MCP server, improving user feedback on connection status.
- Updated the localization files to include new translation keys for connection states such as "Connecting" and "Offline".
- Refactored the dialog to utilize the new status rendering function for better code organization and readability.
* feat: Implement OAuth handling and server initialization in MCP reinitialize flow
- Added OAuth handling to the MCP reinitialize endpoint, allowing the server to capture and return OAuth URLs when required.
- Updated the MCPConfigDialog to include a new ServerInitializationSection for managing server initialization and OAuth flow.
- Enhanced the user experience by providing feedback on server status and OAuth requirements through localized messages.
- Introduced new translation keys for OAuth-related messages in the localization files.
- Refactored the MCPSelect component to remove unused authentication configuration props.
* feat: Make OAuth actually work / update after OAuth link authorized
- Improved the handling of OAuth flows in the MCP reinitialize process, allowing for immediate return when OAuth is initiated.
- Updated the UserController to extract server names from plugin keys for better logging and connection management.
- Enhanced the MCPSelect component to reflect authentication status based on OAuth requirements.
- Implemented polling for OAuth completion in the ServerInitializationSection to improve user feedback during the connection process.
- Refactored MCPManager to support new OAuth flow initiation logic and connection handling.
* refactor: Simplify MCPPanel component and enhance server status display
- Removed unused imports and state management related to user plugins and server reinitialization.
- Integrated connection status handling directly into the MCPPanel for improved user feedback.
- Updated the rendering logic to display server connection states with visual indicators.
- Refactored the editing view to utilize new components for server initialization and custom user variables management.
* chore: remove comments
* chore: remove unused translation key for MCP panel
* refactor: Rename returnOnOAuthInitiated to returnOnOAuth for clarity
* refactor: attempt initialize on server click
* feat: add cancel OAuth flow functionality and related UI updates
* refactor: move server status icon logic into its own component
* chore: remove old localization strings (makes more sense for icon labels to just use configure stirng since thats where it leads to)
* fix: fix accessibility issues with MCPSelect
* fix: add missing save/revoke mutation logic to MCPPanel
* styling: add margin to checkmark in MultiSelect
* fix: add back in customUserVars check to hide gear config icon for servers without customUserVars
---------
Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
Co-authored-by: Dustin Healy <54083382+dustinhealy@users.noreply.github.com>
2025-07-22 22:52:45 -04:00
|
|
|
export const mcpConnectionStatus = () => '/api/mcp/connection/status';
|
2025-07-28 09:25:34 -07:00
|
|
|
export const mcpServerConnectionStatus = (serverName: string) =>
|
|
|
|
`/api/mcp/connection/status/${serverName}`;
|
🔌 feat: MCP Reinitialization and OAuth in UI (#8598)
* ✨ feat: Add connection status endpoint for MCP servers
- Implemented a new endpoint to retrieve the connection status of all MCP servers without disconnecting idle connections.
- Enhanced MCPManager class with a method to get all user-specific connections.
* feat: add silencer arg to loadCustomConfig function to conditionally print config details
- Modified loadCustomConfig to accept a printConfig parameter that allows me to prevent the entire custom config being printed every time it is called
* fix: new status endpoint actually works now, changes to manager.ts to support it
- Updated the connection status endpoint to utilize Maps for app and user connections, rather than incorrectly treating them as objects.
- Introduced a new method + variable in MCPManager to track servers requiring OAuth discovered at startup.
- Stopped OAuth flow from continuing once detected during startup for a new connection
* refactor: Remove hasAuthConfig since we can get that on the frontend without needing to use the endpoint
* feat: Add MCP connection status query and query key for new endpoint
- Introduced a new query hook `useMCPConnectionStatusQuery` to fetch the connection status of MCP servers.
- Added request in data-service
- Defined the API endpoint for retrieving MCP connection status in api-endpoints.ts.
- Defined new types for MCP connection status responses in the types module.
- Added mcpConnectionStatus key
* feat: Enhance MCPSelect component with connection status and server configuration
- Added connection status handling for MCP servers using the new `useMCPConnectionStatusQuery` hook.
- Implemented logic to display appropriate status icons based on connection state and authentication configuration.
- Updated the server selection logic to utilize configured MCP servers from the startup configuration.
- Refactored the rendering of configuration buttons and status indicators for improved user interaction.
* refactor: move MCPConfigDialog to its own MCP subdir in ui and update import
* refactor: silence loadCustomConfig in status endpoint
* feat: Add optional pluginKey parameter to getUserPluginAuthValue
* feat: Add MCP authentication values endpoint and related queries
- Implemented a new endpoint to check authentication value flags for specific MCP servers, returning boolean indicators for each custom user variable.
- Added a corresponding query hook `useMCPAuthValuesQuery` to fetch authentication values from the frontend.
- Defined the API endpoint for retrieving MCP authentication values in api-endpoints.ts.
- Updated data-service to include a method for fetching MCP authentication values.
- Introduced new types for MCP authentication values responses in the types module.
- Added a new query key for MCP authentication values.
* feat: Localize MCPSelect component status labels and aria attributes
- Updated the MCPSelect component to use localized strings for connection status labels and aria attributes, enhancing accessibility and internationalization support.
- Added new translation keys for various connection states in the translation.json file.
* feat: Implement filtered MCP values selection based on connection status in MCPSelect
- Added a new `filteredSetMCPValues` function to ensure only connected servers are selectable in the MCPSelect component.
- Updated the rendering logic to visually indicate the connection status of servers by adjusting opacity.
- Enhanced accessibility by localizing the aria-label for the configuration button.
* feat: Add CustomUserVarsSection component for managing user variables
- Introduced a new `CustomUserVarsSection` component to allow users to configure custom variables for MCP servers.
- Integrated localization for user interface elements and added new translation keys for variable management.
- Added functionality to save and revoke user variables, with visual indicators for set/unset states.
* feat: Enhance MCPSelect and MCPConfigDialog with improved state management and UI updates
- Integrated `useQueryClient` to refetch queries for tools, authentication values, and connection status upon successful plugin updates in MCPSelect.
- Simplified plugin key handling by directly using the formatted plugin key in save and revoke operations.
- Updated MCPConfigDialog to include server status indicators and improved dialog content structure for better user experience.
- Added new translation key for active status in the localization files.
* feat: Enhance MCPConfigDialog with dynamic server status badges and localization updates
- Added a helper function to render status badges based on the connection state of the MCP server, improving user feedback on connection status.
- Updated the localization files to include new translation keys for connection states such as "Connecting" and "Offline".
- Refactored the dialog to utilize the new status rendering function for better code organization and readability.
* feat: Implement OAuth handling and server initialization in MCP reinitialize flow
- Added OAuth handling to the MCP reinitialize endpoint, allowing the server to capture and return OAuth URLs when required.
- Updated the MCPConfigDialog to include a new ServerInitializationSection for managing server initialization and OAuth flow.
- Enhanced the user experience by providing feedback on server status and OAuth requirements through localized messages.
- Introduced new translation keys for OAuth-related messages in the localization files.
- Refactored the MCPSelect component to remove unused authentication configuration props.
* feat: Make OAuth actually work / update after OAuth link authorized
- Improved the handling of OAuth flows in the MCP reinitialize process, allowing for immediate return when OAuth is initiated.
- Updated the UserController to extract server names from plugin keys for better logging and connection management.
- Enhanced the MCPSelect component to reflect authentication status based on OAuth requirements.
- Implemented polling for OAuth completion in the ServerInitializationSection to improve user feedback during the connection process.
- Refactored MCPManager to support new OAuth flow initiation logic and connection handling.
* refactor: Simplify MCPPanel component and enhance server status display
- Removed unused imports and state management related to user plugins and server reinitialization.
- Integrated connection status handling directly into the MCPPanel for improved user feedback.
- Updated the rendering logic to display server connection states with visual indicators.
- Refactored the editing view to utilize new components for server initialization and custom user variables management.
* chore: remove comments
* chore: remove unused translation key for MCP panel
* refactor: Rename returnOnOAuthInitiated to returnOnOAuth for clarity
* refactor: attempt initialize on server click
* feat: add cancel OAuth flow functionality and related UI updates
* refactor: move server status icon logic into its own component
* chore: remove old localization strings (makes more sense for icon labels to just use configure stirng since thats where it leads to)
* fix: fix accessibility issues with MCPSelect
* fix: add missing save/revoke mutation logic to MCPPanel
* styling: add margin to checkmark in MultiSelect
* fix: add back in customUserVars check to hide gear config icon for servers without customUserVars
---------
Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
Co-authored-by: Dustin Healy <54083382+dustinhealy@users.noreply.github.com>
2025-07-22 22:52:45 -04:00
|
|
|
export const mcpAuthValues = (serverName: string) => {
|
|
|
|
return `/api/mcp/${serverName}/auth-values`;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const cancelMCPOAuth = (serverName: string) => {
|
|
|
|
return `/api/mcp/oauth/cancel/${serverName}`;
|
|
|
|
};
|
2025-07-21 14:49:19 -07:00
|
|
|
|
refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874)
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
2023-09-06 10:46:27 -04:00
|
|
|
export const config = () => '/api/config';
|
WIP: Update UI to match Official Style; Vision and Assistants 👷🏽 (#1190)
* wip: initial client side code
* wip: initial api code
* refactor: export query keys from own module, export assistant hooks
* refactor(SelectDropDown): more customization via props
* feat: create Assistant and render real Assistants
* refactor: major refactor of UI components to allow multi-chat, working alongside CreationPanel
* refactor: move assistant routes to own directory
* fix(CreationHeader): state issue with assistant select
* refactor: style changes for form, fix setSiblingIdx from useChatHelpers to use latestMessageParentId, fix render issue with ChatView and change location
* feat: parseCompactConvo: begin refactor of slimmer JSON payloads between client/api
* refactor(endpoints): add assistant endpoint, also use EModelEndpoint as much as possible
* refactor(useGetConversationsQuery): use object to access query data easily
* fix(MultiMessage): react warning of bad state set, making use of effect during render (instead of useEffect)
* fix(useNewConvo): use correct atom key (index instead of convoId) for reset latestMessageFamily
* refactor: make routing navigation/conversation change simpler
* chore: add removeNullishValues for smaller payloads, remove unused fields, setup frontend pinging of assistant endpoint
* WIP: initial complete assistant run handling
* fix: CreationPanel form correctly setting internal state
* refactor(api/assistants/chat): revise functions to working run handling strategy
* refactor(UI): initial major refactor of ChatForm and options
* feat: textarea hook
* refactor: useAuthRedirect hook and change directory name
* feat: add ChatRoute (/c/), make optionsBar absolute and change on textarea height, add temp header
* feat: match new toggle Nav open button to ChatGPT's
* feat: add OpenAI custom classnames
* feat: useOriginNavigate
* feat: messages loading view
* fix: conversation navigation and effects
* refactor: make toggle change nav opacity
* WIP: new endpoint menu
* feat: NewEndpointsMenu complete
* fix: ensure set key dialog shows on endpoint change, and new conversation resets messages
* WIP: textarea styling fix, add temp footer, create basic file handling component
* feat: image file handling (UI)
* feat: PopOver and ModelSelect in Header, remove GenButtons
* feat: drop file handling
* refactor: bug fixes
use SSE at route level
add opts to useOriginNavigate
delay render of unfinishedMessage to avoid flickering
pass params (convoId) to chatHelpers to set messages query data based on param when the route is new (fixes can't continue convo on /new/)
style(MessagesView): matches height to official
fix(SSE): pass paramId and invalidate convos
style(Message): make bg uniform
* refactor(useSSE): setStorage within setConversation updates
* feat: conversationKeysAtom, allConversationsSelector, update convos query data on created message (if new), correctly handle convo deletion (individual)
* feat: add popover select dropdowns to allow options in header while allowing horizontal scroll for mobile
* style(pluginsSelect): styling changes
* refactor(NewEndpointsMenu): make UI components modular
* feat: Presets complete
* fix: preset editing, make by index
* fix: conversations not setting on inital navigation, fix getMessages() based on query param
* fix: changing preset no longer resets latestMessage
* feat: useOnClickOutside for OptionsPopover and fix bug that causes selection of preset when deleting
* fix: revert /chat/ switchToConvo, also use NewDeleteButton in Convo
* fix: Popover correctly closes on close Popover button using custom condition for useOnClickOutside
* style: new message and nav styling
* style: hover/sibling buttons and preset menu scrolling
* feat: new convo header button
* style(Textarea): minor style changes to textarea buttons
* feat: stop/continue generating and hide hoverbuttons when submitting
* feat: compact AI Provider schemas to make json payloads and db saves smaller
* style: styling changes for consistency on chat route
* fix: created usePresetIndexOptions to prevent bugs between /c/ and /chat/ routes when editing presets, removed redundant code from the new dialog
* chore: make /chat/ route default for now since we still lack full image support
2023-11-16 10:42:24 -05:00
|
|
|
|
🗨️ feat: Prompts (#3131)
* 🗨️ feat: Prompts (#7)
* WIP: MERGE prompts/frontend (#1)
* added schema for prompt and promptgroup, added model methods for prompts, added routes for prompts
* * updated promptGroup Schema
* updated model methods for prompts (get, add, delete)
* slight fixes in prompt routes
* * Created Files Management components
* Created Vector Stores components
* Added file management route in the routes folder
* Completed UI for Files list, Compeleted UI for vector stores list, Completed UI for upload file modal, Completed UI for preview file, Completed UI for preview vector store
* Fixed style and UI fixes for file dashboard, file list and vector stores list
* added responsiveness classes for vector store page
* fixed responsiveness of file page, dashboard page, and main page
* fixed styling and responsiveness issues on dashboard page, file list page and vector store page
* added queries and mutations for prompts and promptGroups, added relevant endpoints in data-provider, added relevant components prompts, added and updated relevant APIs
* added types on mutation queries data service, updated prompt attributes
* feature: Prompts and prompt groups management, added relevant APIs, added types for data service/queries/mutations, added relevant mutation and queries
* chore: typing clarifications
* added drop down on prompts mgmt dashboard
* Fixes: fixed version switching issue on tags update or labels update, added cross button on create prompt group, fixed list updation on prompt group renaiming, added CSV upload button
* Feature: Added oneliner and category attributes in prompt group, added schema for categories, added schema methods and route for categories
* chore: typing and lint issues
* chore: more type and linter fixes
* chore: linting
* chore: prompt controller and backend typing example; MOVE TO CONTROLLER DIRECTORY
* chore: more type fixes
* style: prompt name changes
* chore: more type changes, and stateful prompt name change without flickering
* fix: Return result of savePrompt in patchPrompt API endpoint
* fix: navigation prompt queries; refactor: name 'prompt-groups' to just 'groups'
* refactor: fetch prompt groups rewrite
* refactor(prompts): query/mutation statefulness
* refactor: remove `isActive` field
* refactor: remove labels, consolidate logic
* style: width, layout shift
* refactor: improve hover toggle behavior and styling
* refactor: add useParams hook to PromptListItem for dynamic rendering and add timeout ref for blur timeout
* chore: hide upload button
* refactor: import Button component from correct location in PromptSidePanel
* style: prompt editor styling
* style: fix more layout shifts
* style: container scroll
* refactor: Rename CreatePrompt component to CreatePromptForm
* refactor: use react-hook-form
* refactor: Add Prompts components and routes to Dashboard
* style: skeletons for loading
* fix: optimize makePromptProduction
* refactor: consolidate variables
* feat: create prompt form validation
* refactor: Consolidate variables and update mutation hooks
* style: minor touchups
* chore: Update lucide-react npm dependency to version 0.394.0 and npm audit fix
* refactor: add a new icon for the Prompts heading.
* style: Update PromptsView heading to use h1 instead of h2 and other minor margin issues
* chore: wording
* refactor: Update PromptsView heading to use h1 instead of h2, consolidate variables, and add new icons
* refactor: Prompts Button for Mobile
* feature: added category field in prompt group, added relevant API and static data on BE to support FE UI for category in prompt group
* chore: template for prompt cards
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* WIP: Prompts/frontend Continued (#2)
* chore: loading style, remove unused component
* feat: Add CategorySelector component for prompt group category selection
* feat: add categories to create prompt
* feat: prompt versions styling
* feat: optimistic updates for prompt production state
* refactor: optimize form state and show if prompt field is dirty with cross icon, also other styling changes
* chore: remove unused code and localizations
* fix: light mode styling
* WIP: SidePanel Prompts
* refactor: move to groups directory
* refactor: rename GroupsSidePanel to GroupSidePanel and update imports
* style: ListCard
* refactor: isProduction changes
* refactor: infinite query with productionPrompt
* refactor: optimize snippets and prompts, and styling
* refactor: Update getSnippet function to accept a length parameter
* chore: localizations
* feat: prompts navigation to chat and vice versa
* fix: create prompt
* feat: remember last selected category for creating prompts
* fix(promptGroups): fix pagination and add usePromptGroupsNav hook
* Prompts/frontend 3 (#3)
* fix: stateful issues with prompt groups
* style: improved layout
* refactor: improve variable naming in Eng.ts
* refactor: theme selector styling improvements
* added prompt cards on chat new page, with dark mode, added API to fetch random prompts, added types for useQuery
Slightly improved usePromptGroupNav logic to fetch updated result for pageSize, updated prompt cards view with darkmode and responsiveness
fixed page size option buttons styling to match the theme
added dark mode on create prompt page and prompt edit/preview page
fixed page size option buttons styling to match the theme
added dark mode on create prompt page and prompt edit/preview page
* WIP: Prompts/frontend (#4)
* fix: optimize and fix paginated query
* fix: remove unique constraint on names
* refactor: button links and styling
* style: menu border light mode
* feat: Add Auto-Send Switch component for prompts groups
* refactor(ChatView): use form context for submission text
* chore: clear convo state on navigation to dashboard routes
* chore: save prompt edit name on tab, remove console log
* feat: basic prompt submission
* refactor: move Auto-Send Switch
* style(ListCard): border styling
* feat: Add function to detect variables in text
* feat: Add OriginalDialog component to UI library
* chore(ui): Update SelectDropDown options list class to use text-xs size
* refactor: submitMessage hook now includes submitPrompt, make compatible to document query selector
* WIP: Variable Dialog
* feat: variable submission working for both auto-send and non-autosend
* feat: dashboard breadcrumbs and prompts/chat navigation
* refactor: dashboard breadcrumb and dashboard link to chat navigation
* refactor: Update VariableDialog and VariableForm styles
* Prompts: Admin features (#5)
* fix: link issue
* fix: usePromptGroupsNav add missing dep.
* style: dashbreadcrumb and sidepanel text color
* temp fix: remove refetch on pageNumber change
* fix: handle multiple variable replacement
* WIP: create project schema and add project groups to fetch
* feat: Add functionality to add prompt group IDs to a project
* feat: Add caching for startup config in config route
* chore: remove prompt landing
* style: Update Skeleton component with additional background styling
* chore: styling and types
* WIP: SharePrompt first draft
* feat(SharePrompt): form validation
* feat: shared global indicators
* refactor: prompt details
* refactor: change NoPromptGroup directory
* feat: preview prompt
* feat: remove/add global prompts, add rbac-related enums
* refactor: manage prompts location
* WIP: first draft admin settings for prompts
* feat: SystemRoles enum
* refactor: update PromptDetails component styling
* style: ellipsis custom class for showing more preview text
* WIP: initial role schema and initialization
* style: improved margins for single unordered lists
* fix: use custom chat form context to prevent re-renders from FormProvider
* feat: Role mutations for Prompt Permissions
* feat: fetch user role
* feat: update AdminSettings form default values from user role values
* refactor: rename PromptPermissions to Permissions for general definitions
* feat: initial role checks
* feat: Add optional `bodyProps` parameter to generateCheckAccess middleware
* refactor: UI access checks
* Prompts: delete (#6)
* Fixed delete prompt version API, fixed types and logic for prompt version deletion, updated prompt delete mutation logic
* chore: Update return type of deletePrompt function in Prompt.js
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* chore: Update package-lock.json version to 0.7.4-rc1 and fast-xml-parser to 4.4.0
* feat: toast for saving admin settings, add timer no-access navigation
* feat: always make prod
* feat: Add localization to category labels in CategorySelector component
* feat: Update category label localization in CategorySelector component
* fix: Enable making prompt production in Prompt API
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* feat: Add helper fn for dark mode detection in ThemeProvider
* style: surface-primary definition
* fix(useHasAccess): utilize user.role and not just USER role
* fix: empty category and role fetch
* refactort: increase max height to options list and use label if no localization is found
* fix: update CategorySelector to handle empty category value and improve localization
* refactor: move prompts to own store/reactquery modules, add in filter WIP
* refactor: Rename AutoSendSwitch to AutoSendPrompt
* style: theming commit
* style: fix slight coloring issue for convos in dark mode
* style: better composition for prompts side panel
* style: remove gray-750 and make it gray-850
* chore: adjust theming
* feat: filter all prompt groups and properly remove prompts from projects
* refactor: optimize delete prompt groups further
* chore: localization
* feat: Add uniqueProperty filtering to normalizeData function
* WIP: filter prompts
* chore: Update FilterPrompts component to include User icon in FilterItem
* feat(FilterPrompts): set categories
* feat: more system filters and show selected category icon
* style: always make prod, flips switch to avoid mis-clicks
* style: ui/ux loading/no prompts
* chore: style FilterPrompts ChatView
* fix: handle missing role edge case
* style: special variables
* feat: special variables
* refactor: improve replaceSpecialVars function in prompts.ts
* feat: simple/advanced editor modes
* chore: bump versions
* feat: localizations and hide production button on simple mode
* fix: error connecting layout shift
* fix: prompts CRUD for admins
* fix: secure single group fetch
* style: sidepanel styling
* style(PromptName): bring edit button closer to name
* style: mobile prompts header
* style: mobile prompts header continued
* style: align send prompts switch right
* feat: description
* Update special variables description in Eng.ts
* feat: update/create/preview oneliner
* fix: allow empty oneliner update
* style: loading improvement and always make selected prompt Production if simple mode
* fix: production index set and remove unused props
* fix(ci): mock initializeRoles
* fix: address #3128
* fix: address #3128
* feat: add deletion confirmation dialog
* fix: mobile UI issues
* style: prompt library UI update
* style: focus, logcal tab order
* style: Refactor SelectDropDown component to improve code readability and maintainability
* chore: bump data-provider
* chore: fix labels
* refactor: confirm delete prompt version
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
2024-06-20 20:24:32 -04:00
|
|
|
export const prompts = () => '/api/prompts';
|
|
|
|
|
2025-07-26 12:28:31 -04:00
|
|
|
export const addPromptToGroup = (groupId: string) => `/api/prompts/groups/${groupId}/prompts`;
|
|
|
|
|
🤖 feat: OpenAI Assistants v2 (initial support) (#2781)
* 🤖 Assistants V2 Support: Part 1
- Separated Azure Assistants to its own endpoint
- File Search / Vector Store integration is incomplete, but can toggle and use storage from playground
- Code Interpreter resource files can be added but not deleted
- GPT-4o is supported
- Many improvements to the Assistants Endpoint overall
data-provider v2 changes
copy existing route as v1
chore: rename new endpoint to reduce comparison operations and add new azure filesource
api: add azureAssistants part 1
force use of version for assistants/assistantsAzure
chore: switch name back to azureAssistants
refactor type version: string | number
Ensure assistants endpoints have version set
fix: isArchived type issue in ConversationListParams
refactor: update assistants mutations/queries with endpoint/version definitions, update Assistants Map structure
chore: FilePreview component ExtendedFile type assertion
feat: isAssistantsEndpoint helper
chore: remove unused useGenerations
chore(buildTree): type issue
chore(Advanced): type issue (unused component, maybe in future)
first pass for multi-assistant endpoint rewrite
fix(listAssistants): pass params correctly
feat: list separate assistants by endpoint
fix(useTextarea): access assistantMap correctly
fix: assistant endpoint switching, resetting ID
fix: broken during rewrite, selecting assistant mention
fix: set/invalidate assistants endpoint query data correctly
feat: Fix issue with assistant ID not being reset correctly
getOpenAIClient helper function
feat: add toast for assistant deletion
fix: assistants delete right after create issue for azure
fix: assistant patching
refactor: actions to use getOpenAIClient
refactor: consolidate logic into helpers file
fix: issue where conversation data was not initially available
v1 chat support
refactor(spendTokens): only early return if completionTokens isNaN
fix(OpenAIClient): ensure spendTokens has all necessary params
refactor: route/controller logic
fix(assistants/initializeClient): use defaultHeaders field
fix: sanitize default operation id
chore: bump openai package
first pass v2 action service
feat: retroactive domain parsing for actions added via v1
feat: delete db records of actions/assistants on openai assistant deletion
chore: remove vision tools from v2 assistants
feat: v2 upload and delete assistant vision images
WIP first pass, thread attachments
fix: show assistant vision files (save local/firebase copy)
v2 image continue
fix: annotations
fix: refine annotations
show analyze as error if is no longer submitting before progress reaches 1 and show file_search as retrieval tool
fix: abort run, undefined endpoint issue
refactor: consolidate capabilities logic and anticipate versioning
frontend version 2 changes
fix: query selection and filter
add endpoint to unknown filepath
add file ids to resource, deleting in progress
enable/disable file search
remove version log
* 🤖 Assistants V2 Support: Part 2
🎹 fix: Autocompletion Chrome Bug on Action API Key Input
chore: remove `useOriginNavigate`
chore: set correct OpenAI Storage Source
fix: azure file deletions, instantiate clients by source for deletion
update code interpret files info
feat: deleteResourceFileId
chore: increase poll interval as azure easily rate limits
fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records
file source icons
update table file filters
chore: file search info and versioning
fix: retrieval update with necessary tool_resources if specified
fix(useMentions): add optional chaining in case listMap value is undefined
fix: force assistant avatar roundedness
fix: azure assistants, check correct flag
chore: bump data-provider
* fix: merge conflict
* ci: fix backend tests due to new updates
* chore: update .env.example
* meilisearch improvements
* localization updates
* chore: update comparisons
* feat: add additional metadata: endpoint, author ID
* chore: azureAssistants ENDPOINTS exclusion warning
2024-05-19 12:56:55 -04:00
|
|
|
export const assistants = ({
|
2024-11-12 16:41:04 -05:00
|
|
|
path = '',
|
🤖 feat: OpenAI Assistants v2 (initial support) (#2781)
* 🤖 Assistants V2 Support: Part 1
- Separated Azure Assistants to its own endpoint
- File Search / Vector Store integration is incomplete, but can toggle and use storage from playground
- Code Interpreter resource files can be added but not deleted
- GPT-4o is supported
- Many improvements to the Assistants Endpoint overall
data-provider v2 changes
copy existing route as v1
chore: rename new endpoint to reduce comparison operations and add new azure filesource
api: add azureAssistants part 1
force use of version for assistants/assistantsAzure
chore: switch name back to azureAssistants
refactor type version: string | number
Ensure assistants endpoints have version set
fix: isArchived type issue in ConversationListParams
refactor: update assistants mutations/queries with endpoint/version definitions, update Assistants Map structure
chore: FilePreview component ExtendedFile type assertion
feat: isAssistantsEndpoint helper
chore: remove unused useGenerations
chore(buildTree): type issue
chore(Advanced): type issue (unused component, maybe in future)
first pass for multi-assistant endpoint rewrite
fix(listAssistants): pass params correctly
feat: list separate assistants by endpoint
fix(useTextarea): access assistantMap correctly
fix: assistant endpoint switching, resetting ID
fix: broken during rewrite, selecting assistant mention
fix: set/invalidate assistants endpoint query data correctly
feat: Fix issue with assistant ID not being reset correctly
getOpenAIClient helper function
feat: add toast for assistant deletion
fix: assistants delete right after create issue for azure
fix: assistant patching
refactor: actions to use getOpenAIClient
refactor: consolidate logic into helpers file
fix: issue where conversation data was not initially available
v1 chat support
refactor(spendTokens): only early return if completionTokens isNaN
fix(OpenAIClient): ensure spendTokens has all necessary params
refactor: route/controller logic
fix(assistants/initializeClient): use defaultHeaders field
fix: sanitize default operation id
chore: bump openai package
first pass v2 action service
feat: retroactive domain parsing for actions added via v1
feat: delete db records of actions/assistants on openai assistant deletion
chore: remove vision tools from v2 assistants
feat: v2 upload and delete assistant vision images
WIP first pass, thread attachments
fix: show assistant vision files (save local/firebase copy)
v2 image continue
fix: annotations
fix: refine annotations
show analyze as error if is no longer submitting before progress reaches 1 and show file_search as retrieval tool
fix: abort run, undefined endpoint issue
refactor: consolidate capabilities logic and anticipate versioning
frontend version 2 changes
fix: query selection and filter
add endpoint to unknown filepath
add file ids to resource, deleting in progress
enable/disable file search
remove version log
* 🤖 Assistants V2 Support: Part 2
🎹 fix: Autocompletion Chrome Bug on Action API Key Input
chore: remove `useOriginNavigate`
chore: set correct OpenAI Storage Source
fix: azure file deletions, instantiate clients by source for deletion
update code interpret files info
feat: deleteResourceFileId
chore: increase poll interval as azure easily rate limits
fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records
file source icons
update table file filters
chore: file search info and versioning
fix: retrieval update with necessary tool_resources if specified
fix(useMentions): add optional chaining in case listMap value is undefined
fix: force assistant avatar roundedness
fix: azure assistants, check correct flag
chore: bump data-provider
* fix: merge conflict
* ci: fix backend tests due to new updates
* chore: update .env.example
* meilisearch improvements
* localization updates
* chore: update comparisons
* feat: add additional metadata: endpoint, author ID
* chore: azureAssistants ENDPOINTS exclusion warning
2024-05-19 12:56:55 -04:00
|
|
|
options,
|
|
|
|
version,
|
|
|
|
endpoint,
|
2024-11-12 16:41:04 -05:00
|
|
|
isAvatar,
|
🤖 feat: OpenAI Assistants v2 (initial support) (#2781)
* 🤖 Assistants V2 Support: Part 1
- Separated Azure Assistants to its own endpoint
- File Search / Vector Store integration is incomplete, but can toggle and use storage from playground
- Code Interpreter resource files can be added but not deleted
- GPT-4o is supported
- Many improvements to the Assistants Endpoint overall
data-provider v2 changes
copy existing route as v1
chore: rename new endpoint to reduce comparison operations and add new azure filesource
api: add azureAssistants part 1
force use of version for assistants/assistantsAzure
chore: switch name back to azureAssistants
refactor type version: string | number
Ensure assistants endpoints have version set
fix: isArchived type issue in ConversationListParams
refactor: update assistants mutations/queries with endpoint/version definitions, update Assistants Map structure
chore: FilePreview component ExtendedFile type assertion
feat: isAssistantsEndpoint helper
chore: remove unused useGenerations
chore(buildTree): type issue
chore(Advanced): type issue (unused component, maybe in future)
first pass for multi-assistant endpoint rewrite
fix(listAssistants): pass params correctly
feat: list separate assistants by endpoint
fix(useTextarea): access assistantMap correctly
fix: assistant endpoint switching, resetting ID
fix: broken during rewrite, selecting assistant mention
fix: set/invalidate assistants endpoint query data correctly
feat: Fix issue with assistant ID not being reset correctly
getOpenAIClient helper function
feat: add toast for assistant deletion
fix: assistants delete right after create issue for azure
fix: assistant patching
refactor: actions to use getOpenAIClient
refactor: consolidate logic into helpers file
fix: issue where conversation data was not initially available
v1 chat support
refactor(spendTokens): only early return if completionTokens isNaN
fix(OpenAIClient): ensure spendTokens has all necessary params
refactor: route/controller logic
fix(assistants/initializeClient): use defaultHeaders field
fix: sanitize default operation id
chore: bump openai package
first pass v2 action service
feat: retroactive domain parsing for actions added via v1
feat: delete db records of actions/assistants on openai assistant deletion
chore: remove vision tools from v2 assistants
feat: v2 upload and delete assistant vision images
WIP first pass, thread attachments
fix: show assistant vision files (save local/firebase copy)
v2 image continue
fix: annotations
fix: refine annotations
show analyze as error if is no longer submitting before progress reaches 1 and show file_search as retrieval tool
fix: abort run, undefined endpoint issue
refactor: consolidate capabilities logic and anticipate versioning
frontend version 2 changes
fix: query selection and filter
add endpoint to unknown filepath
add file ids to resource, deleting in progress
enable/disable file search
remove version log
* 🤖 Assistants V2 Support: Part 2
🎹 fix: Autocompletion Chrome Bug on Action API Key Input
chore: remove `useOriginNavigate`
chore: set correct OpenAI Storage Source
fix: azure file deletions, instantiate clients by source for deletion
update code interpret files info
feat: deleteResourceFileId
chore: increase poll interval as azure easily rate limits
fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records
file source icons
update table file filters
chore: file search info and versioning
fix: retrieval update with necessary tool_resources if specified
fix(useMentions): add optional chaining in case listMap value is undefined
fix: force assistant avatar roundedness
fix: azure assistants, check correct flag
chore: bump data-provider
* fix: merge conflict
* ci: fix backend tests due to new updates
* chore: update .env.example
* meilisearch improvements
* localization updates
* chore: update comparisons
* feat: add additional metadata: endpoint, author ID
* chore: azureAssistants ENDPOINTS exclusion warning
2024-05-19 12:56:55 -04:00
|
|
|
}: {
|
|
|
|
path?: string;
|
|
|
|
options?: object;
|
|
|
|
endpoint?: AssistantsEndpoint;
|
|
|
|
version: number | string;
|
2024-11-12 16:41:04 -05:00
|
|
|
isAvatar?: boolean;
|
🤖 feat: OpenAI Assistants v2 (initial support) (#2781)
* 🤖 Assistants V2 Support: Part 1
- Separated Azure Assistants to its own endpoint
- File Search / Vector Store integration is incomplete, but can toggle and use storage from playground
- Code Interpreter resource files can be added but not deleted
- GPT-4o is supported
- Many improvements to the Assistants Endpoint overall
data-provider v2 changes
copy existing route as v1
chore: rename new endpoint to reduce comparison operations and add new azure filesource
api: add azureAssistants part 1
force use of version for assistants/assistantsAzure
chore: switch name back to azureAssistants
refactor type version: string | number
Ensure assistants endpoints have version set
fix: isArchived type issue in ConversationListParams
refactor: update assistants mutations/queries with endpoint/version definitions, update Assistants Map structure
chore: FilePreview component ExtendedFile type assertion
feat: isAssistantsEndpoint helper
chore: remove unused useGenerations
chore(buildTree): type issue
chore(Advanced): type issue (unused component, maybe in future)
first pass for multi-assistant endpoint rewrite
fix(listAssistants): pass params correctly
feat: list separate assistants by endpoint
fix(useTextarea): access assistantMap correctly
fix: assistant endpoint switching, resetting ID
fix: broken during rewrite, selecting assistant mention
fix: set/invalidate assistants endpoint query data correctly
feat: Fix issue with assistant ID not being reset correctly
getOpenAIClient helper function
feat: add toast for assistant deletion
fix: assistants delete right after create issue for azure
fix: assistant patching
refactor: actions to use getOpenAIClient
refactor: consolidate logic into helpers file
fix: issue where conversation data was not initially available
v1 chat support
refactor(spendTokens): only early return if completionTokens isNaN
fix(OpenAIClient): ensure spendTokens has all necessary params
refactor: route/controller logic
fix(assistants/initializeClient): use defaultHeaders field
fix: sanitize default operation id
chore: bump openai package
first pass v2 action service
feat: retroactive domain parsing for actions added via v1
feat: delete db records of actions/assistants on openai assistant deletion
chore: remove vision tools from v2 assistants
feat: v2 upload and delete assistant vision images
WIP first pass, thread attachments
fix: show assistant vision files (save local/firebase copy)
v2 image continue
fix: annotations
fix: refine annotations
show analyze as error if is no longer submitting before progress reaches 1 and show file_search as retrieval tool
fix: abort run, undefined endpoint issue
refactor: consolidate capabilities logic and anticipate versioning
frontend version 2 changes
fix: query selection and filter
add endpoint to unknown filepath
add file ids to resource, deleting in progress
enable/disable file search
remove version log
* 🤖 Assistants V2 Support: Part 2
🎹 fix: Autocompletion Chrome Bug on Action API Key Input
chore: remove `useOriginNavigate`
chore: set correct OpenAI Storage Source
fix: azure file deletions, instantiate clients by source for deletion
update code interpret files info
feat: deleteResourceFileId
chore: increase poll interval as azure easily rate limits
fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records
file source icons
update table file filters
chore: file search info and versioning
fix: retrieval update with necessary tool_resources if specified
fix(useMentions): add optional chaining in case listMap value is undefined
fix: force assistant avatar roundedness
fix: azure assistants, check correct flag
chore: bump data-provider
* fix: merge conflict
* ci: fix backend tests due to new updates
* chore: update .env.example
* meilisearch improvements
* localization updates
* chore: update comparisons
* feat: add additional metadata: endpoint, author ID
* chore: azureAssistants ENDPOINTS exclusion warning
2024-05-19 12:56:55 -04:00
|
|
|
}) => {
|
2024-11-12 16:41:04 -05:00
|
|
|
let url = isAvatar === true ? `${images()}/assistants` : `/api/assistants/v${version}`;
|
🤖 feat: OpenAI Assistants v2 (initial support) (#2781)
* 🤖 Assistants V2 Support: Part 1
- Separated Azure Assistants to its own endpoint
- File Search / Vector Store integration is incomplete, but can toggle and use storage from playground
- Code Interpreter resource files can be added but not deleted
- GPT-4o is supported
- Many improvements to the Assistants Endpoint overall
data-provider v2 changes
copy existing route as v1
chore: rename new endpoint to reduce comparison operations and add new azure filesource
api: add azureAssistants part 1
force use of version for assistants/assistantsAzure
chore: switch name back to azureAssistants
refactor type version: string | number
Ensure assistants endpoints have version set
fix: isArchived type issue in ConversationListParams
refactor: update assistants mutations/queries with endpoint/version definitions, update Assistants Map structure
chore: FilePreview component ExtendedFile type assertion
feat: isAssistantsEndpoint helper
chore: remove unused useGenerations
chore(buildTree): type issue
chore(Advanced): type issue (unused component, maybe in future)
first pass for multi-assistant endpoint rewrite
fix(listAssistants): pass params correctly
feat: list separate assistants by endpoint
fix(useTextarea): access assistantMap correctly
fix: assistant endpoint switching, resetting ID
fix: broken during rewrite, selecting assistant mention
fix: set/invalidate assistants endpoint query data correctly
feat: Fix issue with assistant ID not being reset correctly
getOpenAIClient helper function
feat: add toast for assistant deletion
fix: assistants delete right after create issue for azure
fix: assistant patching
refactor: actions to use getOpenAIClient
refactor: consolidate logic into helpers file
fix: issue where conversation data was not initially available
v1 chat support
refactor(spendTokens): only early return if completionTokens isNaN
fix(OpenAIClient): ensure spendTokens has all necessary params
refactor: route/controller logic
fix(assistants/initializeClient): use defaultHeaders field
fix: sanitize default operation id
chore: bump openai package
first pass v2 action service
feat: retroactive domain parsing for actions added via v1
feat: delete db records of actions/assistants on openai assistant deletion
chore: remove vision tools from v2 assistants
feat: v2 upload and delete assistant vision images
WIP first pass, thread attachments
fix: show assistant vision files (save local/firebase copy)
v2 image continue
fix: annotations
fix: refine annotations
show analyze as error if is no longer submitting before progress reaches 1 and show file_search as retrieval tool
fix: abort run, undefined endpoint issue
refactor: consolidate capabilities logic and anticipate versioning
frontend version 2 changes
fix: query selection and filter
add endpoint to unknown filepath
add file ids to resource, deleting in progress
enable/disable file search
remove version log
* 🤖 Assistants V2 Support: Part 2
🎹 fix: Autocompletion Chrome Bug on Action API Key Input
chore: remove `useOriginNavigate`
chore: set correct OpenAI Storage Source
fix: azure file deletions, instantiate clients by source for deletion
update code interpret files info
feat: deleteResourceFileId
chore: increase poll interval as azure easily rate limits
fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records
file source icons
update table file filters
chore: file search info and versioning
fix: retrieval update with necessary tool_resources if specified
fix(useMentions): add optional chaining in case listMap value is undefined
fix: force assistant avatar roundedness
fix: azure assistants, check correct flag
chore: bump data-provider
* fix: merge conflict
* ci: fix backend tests due to new updates
* chore: update .env.example
* meilisearch improvements
* localization updates
* chore: update comparisons
* feat: add additional metadata: endpoint, author ID
* chore: azureAssistants ENDPOINTS exclusion warning
2024-05-19 12:56:55 -04:00
|
|
|
|
2024-11-12 16:41:04 -05:00
|
|
|
if (path && path !== '') {
|
🤖 feat: OpenAI Assistants v2 (initial support) (#2781)
* 🤖 Assistants V2 Support: Part 1
- Separated Azure Assistants to its own endpoint
- File Search / Vector Store integration is incomplete, but can toggle and use storage from playground
- Code Interpreter resource files can be added but not deleted
- GPT-4o is supported
- Many improvements to the Assistants Endpoint overall
data-provider v2 changes
copy existing route as v1
chore: rename new endpoint to reduce comparison operations and add new azure filesource
api: add azureAssistants part 1
force use of version for assistants/assistantsAzure
chore: switch name back to azureAssistants
refactor type version: string | number
Ensure assistants endpoints have version set
fix: isArchived type issue in ConversationListParams
refactor: update assistants mutations/queries with endpoint/version definitions, update Assistants Map structure
chore: FilePreview component ExtendedFile type assertion
feat: isAssistantsEndpoint helper
chore: remove unused useGenerations
chore(buildTree): type issue
chore(Advanced): type issue (unused component, maybe in future)
first pass for multi-assistant endpoint rewrite
fix(listAssistants): pass params correctly
feat: list separate assistants by endpoint
fix(useTextarea): access assistantMap correctly
fix: assistant endpoint switching, resetting ID
fix: broken during rewrite, selecting assistant mention
fix: set/invalidate assistants endpoint query data correctly
feat: Fix issue with assistant ID not being reset correctly
getOpenAIClient helper function
feat: add toast for assistant deletion
fix: assistants delete right after create issue for azure
fix: assistant patching
refactor: actions to use getOpenAIClient
refactor: consolidate logic into helpers file
fix: issue where conversation data was not initially available
v1 chat support
refactor(spendTokens): only early return if completionTokens isNaN
fix(OpenAIClient): ensure spendTokens has all necessary params
refactor: route/controller logic
fix(assistants/initializeClient): use defaultHeaders field
fix: sanitize default operation id
chore: bump openai package
first pass v2 action service
feat: retroactive domain parsing for actions added via v1
feat: delete db records of actions/assistants on openai assistant deletion
chore: remove vision tools from v2 assistants
feat: v2 upload and delete assistant vision images
WIP first pass, thread attachments
fix: show assistant vision files (save local/firebase copy)
v2 image continue
fix: annotations
fix: refine annotations
show analyze as error if is no longer submitting before progress reaches 1 and show file_search as retrieval tool
fix: abort run, undefined endpoint issue
refactor: consolidate capabilities logic and anticipate versioning
frontend version 2 changes
fix: query selection and filter
add endpoint to unknown filepath
add file ids to resource, deleting in progress
enable/disable file search
remove version log
* 🤖 Assistants V2 Support: Part 2
🎹 fix: Autocompletion Chrome Bug on Action API Key Input
chore: remove `useOriginNavigate`
chore: set correct OpenAI Storage Source
fix: azure file deletions, instantiate clients by source for deletion
update code interpret files info
feat: deleteResourceFileId
chore: increase poll interval as azure easily rate limits
fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records
file source icons
update table file filters
chore: file search info and versioning
fix: retrieval update with necessary tool_resources if specified
fix(useMentions): add optional chaining in case listMap value is undefined
fix: force assistant avatar roundedness
fix: azure assistants, check correct flag
chore: bump data-provider
* fix: merge conflict
* ci: fix backend tests due to new updates
* chore: update .env.example
* meilisearch improvements
* localization updates
* chore: update comparisons
* feat: add additional metadata: endpoint, author ID
* chore: azureAssistants ENDPOINTS exclusion warning
2024-05-19 12:56:55 -04:00
|
|
|
url += `/${path}`;
|
|
|
|
}
|
2024-03-14 17:21:42 -04:00
|
|
|
|
🤖 feat: OpenAI Assistants v2 (initial support) (#2781)
* 🤖 Assistants V2 Support: Part 1
- Separated Azure Assistants to its own endpoint
- File Search / Vector Store integration is incomplete, but can toggle and use storage from playground
- Code Interpreter resource files can be added but not deleted
- GPT-4o is supported
- Many improvements to the Assistants Endpoint overall
data-provider v2 changes
copy existing route as v1
chore: rename new endpoint to reduce comparison operations and add new azure filesource
api: add azureAssistants part 1
force use of version for assistants/assistantsAzure
chore: switch name back to azureAssistants
refactor type version: string | number
Ensure assistants endpoints have version set
fix: isArchived type issue in ConversationListParams
refactor: update assistants mutations/queries with endpoint/version definitions, update Assistants Map structure
chore: FilePreview component ExtendedFile type assertion
feat: isAssistantsEndpoint helper
chore: remove unused useGenerations
chore(buildTree): type issue
chore(Advanced): type issue (unused component, maybe in future)
first pass for multi-assistant endpoint rewrite
fix(listAssistants): pass params correctly
feat: list separate assistants by endpoint
fix(useTextarea): access assistantMap correctly
fix: assistant endpoint switching, resetting ID
fix: broken during rewrite, selecting assistant mention
fix: set/invalidate assistants endpoint query data correctly
feat: Fix issue with assistant ID not being reset correctly
getOpenAIClient helper function
feat: add toast for assistant deletion
fix: assistants delete right after create issue for azure
fix: assistant patching
refactor: actions to use getOpenAIClient
refactor: consolidate logic into helpers file
fix: issue where conversation data was not initially available
v1 chat support
refactor(spendTokens): only early return if completionTokens isNaN
fix(OpenAIClient): ensure spendTokens has all necessary params
refactor: route/controller logic
fix(assistants/initializeClient): use defaultHeaders field
fix: sanitize default operation id
chore: bump openai package
first pass v2 action service
feat: retroactive domain parsing for actions added via v1
feat: delete db records of actions/assistants on openai assistant deletion
chore: remove vision tools from v2 assistants
feat: v2 upload and delete assistant vision images
WIP first pass, thread attachments
fix: show assistant vision files (save local/firebase copy)
v2 image continue
fix: annotations
fix: refine annotations
show analyze as error if is no longer submitting before progress reaches 1 and show file_search as retrieval tool
fix: abort run, undefined endpoint issue
refactor: consolidate capabilities logic and anticipate versioning
frontend version 2 changes
fix: query selection and filter
add endpoint to unknown filepath
add file ids to resource, deleting in progress
enable/disable file search
remove version log
* 🤖 Assistants V2 Support: Part 2
🎹 fix: Autocompletion Chrome Bug on Action API Key Input
chore: remove `useOriginNavigate`
chore: set correct OpenAI Storage Source
fix: azure file deletions, instantiate clients by source for deletion
update code interpret files info
feat: deleteResourceFileId
chore: increase poll interval as azure easily rate limits
fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records
file source icons
update table file filters
chore: file search info and versioning
fix: retrieval update with necessary tool_resources if specified
fix(useMentions): add optional chaining in case listMap value is undefined
fix: force assistant avatar roundedness
fix: azure assistants, check correct flag
chore: bump data-provider
* fix: merge conflict
* ci: fix backend tests due to new updates
* chore: update .env.example
* meilisearch improvements
* localization updates
* chore: update comparisons
* feat: add additional metadata: endpoint, author ID
* chore: azureAssistants ENDPOINTS exclusion warning
2024-05-19 12:56:55 -04:00
|
|
|
if (endpoint) {
|
|
|
|
options = {
|
|
|
|
...(options ?? {}),
|
|
|
|
endpoint,
|
|
|
|
};
|
2024-03-14 17:21:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (options && Object.keys(options).length > 0) {
|
🤖 feat: OpenAI Assistants v2 (initial support) (#2781)
* 🤖 Assistants V2 Support: Part 1
- Separated Azure Assistants to its own endpoint
- File Search / Vector Store integration is incomplete, but can toggle and use storage from playground
- Code Interpreter resource files can be added but not deleted
- GPT-4o is supported
- Many improvements to the Assistants Endpoint overall
data-provider v2 changes
copy existing route as v1
chore: rename new endpoint to reduce comparison operations and add new azure filesource
api: add azureAssistants part 1
force use of version for assistants/assistantsAzure
chore: switch name back to azureAssistants
refactor type version: string | number
Ensure assistants endpoints have version set
fix: isArchived type issue in ConversationListParams
refactor: update assistants mutations/queries with endpoint/version definitions, update Assistants Map structure
chore: FilePreview component ExtendedFile type assertion
feat: isAssistantsEndpoint helper
chore: remove unused useGenerations
chore(buildTree): type issue
chore(Advanced): type issue (unused component, maybe in future)
first pass for multi-assistant endpoint rewrite
fix(listAssistants): pass params correctly
feat: list separate assistants by endpoint
fix(useTextarea): access assistantMap correctly
fix: assistant endpoint switching, resetting ID
fix: broken during rewrite, selecting assistant mention
fix: set/invalidate assistants endpoint query data correctly
feat: Fix issue with assistant ID not being reset correctly
getOpenAIClient helper function
feat: add toast for assistant deletion
fix: assistants delete right after create issue for azure
fix: assistant patching
refactor: actions to use getOpenAIClient
refactor: consolidate logic into helpers file
fix: issue where conversation data was not initially available
v1 chat support
refactor(spendTokens): only early return if completionTokens isNaN
fix(OpenAIClient): ensure spendTokens has all necessary params
refactor: route/controller logic
fix(assistants/initializeClient): use defaultHeaders field
fix: sanitize default operation id
chore: bump openai package
first pass v2 action service
feat: retroactive domain parsing for actions added via v1
feat: delete db records of actions/assistants on openai assistant deletion
chore: remove vision tools from v2 assistants
feat: v2 upload and delete assistant vision images
WIP first pass, thread attachments
fix: show assistant vision files (save local/firebase copy)
v2 image continue
fix: annotations
fix: refine annotations
show analyze as error if is no longer submitting before progress reaches 1 and show file_search as retrieval tool
fix: abort run, undefined endpoint issue
refactor: consolidate capabilities logic and anticipate versioning
frontend version 2 changes
fix: query selection and filter
add endpoint to unknown filepath
add file ids to resource, deleting in progress
enable/disable file search
remove version log
* 🤖 Assistants V2 Support: Part 2
🎹 fix: Autocompletion Chrome Bug on Action API Key Input
chore: remove `useOriginNavigate`
chore: set correct OpenAI Storage Source
fix: azure file deletions, instantiate clients by source for deletion
update code interpret files info
feat: deleteResourceFileId
chore: increase poll interval as azure easily rate limits
fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records
file source icons
update table file filters
chore: file search info and versioning
fix: retrieval update with necessary tool_resources if specified
fix(useMentions): add optional chaining in case listMap value is undefined
fix: force assistant avatar roundedness
fix: azure assistants, check correct flag
chore: bump data-provider
* fix: merge conflict
* ci: fix backend tests due to new updates
* chore: update .env.example
* meilisearch improvements
* localization updates
* chore: update comparisons
* feat: add additional metadata: endpoint, author ID
* chore: azureAssistants ENDPOINTS exclusion warning
2024-05-19 12:56:55 -04:00
|
|
|
const queryParams = new URLSearchParams(options as Record<string, string>).toString();
|
2024-03-14 17:21:42 -04:00
|
|
|
url += `?${queryParams}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
return url;
|
|
|
|
};
|
feat: Vision Support + New UI (#1203)
* feat: add timer duration to showToast, show toast for preset selection
* refactor: replace old /chat/ route with /c/. e2e tests will fail here
* refactor: move typedefs to root of /api/ and add a few to assistant types in TS
* refactor: reorganize data-provider imports, fix dependency cycle, strategize new plan to separate react dependent packages
* feat: add dataService for uploading images
* feat(data-provider): add mutation keys
* feat: file resizing and upload
* WIP: initial API image handling
* fix: catch JSON.parse of localStorage tools
* chore: experimental: use module-alias for absolute imports
* refactor: change temp_file_id strategy
* fix: updating files state by using Map and defining react query callbacks in a way that keeps them during component unmount, initial delete handling
* feat: properly handle file deletion
* refactor: unexpose complete filepath and resize from server for higher fidelity
* fix: make sure resized height, width is saved, catch bad requests
* refactor: use absolute imports
* fix: prevent setOptions from being called more than once for OpenAIClient, made note to fix for PluginsClient
* refactor: import supportsFiles and models vars from schemas
* fix: correctly replace temp file id
* refactor(BaseClient): use absolute imports, pass message 'opts' to buildMessages method, count tokens for nested objects/arrays
* feat: add validateVisionModel to determine if model has vision capabilities
* chore(checkBalance): update jsdoc
* feat: formatVisionMessage: change message content format dependent on role and image_urls passed
* refactor: add usage to File schema, make create and updateFile, correctly set and remove TTL
* feat: working vision support
TODO: file size, type, amount validations, making sure they are styled right, and making sure you can add images from the clipboard/dragging
* feat: clipboard support for uploading images
* feat: handle files on drop to screen, refactor top level view code to Presentation component so the useDragHelpers hook has ChatContext
* fix(Images): replace uploaded images in place
* feat: add filepath validation to protect sensitive files
* fix: ensure correct file_ids are push and not the Map key values
* fix(ToastContext): type issue
* feat: add basic file validation
* fix(useDragHelpers): correct context issue with `files` dependency
* refactor: consolidate setErrors logic to setError
* feat: add dialog Image overlay on image click
* fix: close endpoints menu on click
* chore: set detail to auto, make note for configuration
* fix: react warning (button desc. of button)
* refactor: optimize filepath handling, pass file_ids to images for easier re-use
* refactor: optimize image file handling, allow re-using files in regen, pass more file metadata in messages
* feat: lazy loading images including use of upload preview
* fix: SetKeyDialog closing, stopPropagation on Dialog content click
* style(EndpointMenuItem): tighten up the style, fix dark theme showing in lightmode, make menu more ux friendly
* style: change maxheight of all settings textareas to 138px from 300px
* style: better styling for textarea and enclosing buttons
* refactor(PresetItems): swap back edit and delete icons
* feat: make textarea placeholder dynamic to endpoint
* style: show user hover buttons only on hover when message is streaming
* fix: ordered list not going past 9, fix css
* feat: add User/AI labels; style: hide loading spinner
* feat: add back custom footer, change original footer text
* feat: dynamic landing icons based on endpoint
* chore: comment out assistants route
* fix: autoScroll to newest on /c/ view
* fix: Export Conversation on new UI
* style: match message style of official more closely
* ci: fix api jest unit tests, comment out e2e tests for now as they will fail until addressed
* feat: more file validation and use blob in preview field, not filepath, to fix temp deletion
* feat: filefilter for multer
* feat: better AI labels based on custom name, model, and endpoint instead of `ChatGPT`
2023-11-21 20:12:48 -05:00
|
|
|
|
2024-11-01 18:36:39 -04:00
|
|
|
export const agents = ({ path = '', options }: { path?: string; options?: object }) => {
|
🚧 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
|
|
|
let url = '/api/agents';
|
|
|
|
|
2024-11-01 18:36:39 -04:00
|
|
|
if (path && path !== '') {
|
🚧 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
|
|
|
url += `/${path}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (options && Object.keys(options).length > 0) {
|
|
|
|
const queryParams = new URLSearchParams(options as Record<string, string>).toString();
|
|
|
|
url += `?${queryParams}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
return url;
|
|
|
|
};
|
|
|
|
|
⌛ feat: Agent Version History and Management (#7455)
* ✨ feat: Enhance agent update functionality to save current state in versions array
- Updated the `updateAgent` function to push the current agent's state into a new `versions` array when an agent is updated.
- Modified the agent schema to include a `versions` field for storing historical states of agents.
* ✨ feat: Add comprehensive CRUD operations for agents in tests
- Introduced a new test suite for CRUD operations on agents, including create, read, update, and delete functionalities.
- Implemented tests for listing agents by author and updating agent projects.
- Enhanced the agent model to support version history tracking during updates.
- Ensured proper environment variable management during tests.
* ✨ feat: Introduce version tracking for agents and enhance UI components
- Added a `version` property to the agent model to track the number of versions.
- Updated the `getAgentHandler` to include the agent's version in the response.
- Introduced a new `VersionButton` component for navigating to the version panel.
- Created a `VersionPanel` component for displaying version-related information.
- Updated the UI to conditionally render the version button and panel based on the active state.
- Added localization for the new version-related UI elements.
* ✨ i18n: Add "version" translation key across multiple languages
- Introduced the "com_ui_agent_version" translation key in various language files to support version tracking for agents.
- Updated Arabic, Czech, German, English, Spanish, Estonian, Persian, Finnish, French, Hebrew, Hungarian, Indonesian, Italian, Japanese, Korean, Dutch, Polish, Portuguese (Brazil and Portugal), Russian, Swedish, Thai, Turkish, Vietnamese, and Chinese (Simplified and Traditional) translations.
* ✨ feat: Update AgentFooter to conditionally render AdminSettings
- Modified the logic for displaying buttons in the AgentFooter component to only show them when the active panel is the builder.
- Ensured that AdminSettings is displayed only when the user has an admin role and the buttons are visible.
* ✨ feat: Enhance AgentPanelSwitch and VersionPanel for improved agent capabilities
- Updated AgentPanelSwitch to include a new VersionPanel for displaying version-related information.
- Enhanced agentsConfig logic to properly handle agent capabilities.
- Modified VersionPanel to improve structure and localization support.
- Integrated createAgent mutation for future agent creation functionality.
* ✨ feat: Enhance VersionPanel to display agent version history and loading states
- Integrated version fetching logic in VersionPanel to retrieve and display agent version history.
- Added loading and error handling states to improve user experience.
- Updated agent schema to use mixed types for versions, allowing for more flexible version data structures.
- Introduced localization support for version-related UI elements.
* ✨ feat: Update VersionPanel and AgentPanelSwitch to enhance agent selection and version display
- Modified AgentPanelSwitch to pass selectedAgentId to VersionPanel for improved agent context.
- Enhanced VersionPanel to handle multiple timestamp formats and display appropriate messages when no agent is selected.
- Improved structure and readability of the VersionPanel component by adding a helper function for timestamp retrieval.
* ✨ feat: Refactor VersionPanel to utilize localization and improve timestamp handling
- Replaced hardcoded text constants with localization support for various UI elements in VersionPanel.
- Enhanced the timestamp retrieval function to handle errors gracefully and utilize localized messages for unknown dates.
- Improved user feedback by displaying localized messages for agent selection, version errors, and empty states.
* ✨ refactor: Clean up VersionPanel by removing unused code and improving timestamp handling
* ✨ feat: Implement agent version reverting functionality
- Added `revertAgentVersion` method in the Agent model to allow reverting to a previous version of an agent.
- Introduced `revertAgentVersionHandler` in the agents controller to handle requests for reverting agent versions.
- Updated API routes to include a new endpoint for reverting agent versions.
- Enhanced the VersionPanel component to support version restoration with user confirmation and feedback.
- Added localization support for success and error messages related to version restoration.
* ✨ i18n: Add localization for agent version restoration messages
* Simplify VersionPanel by removing unused parameters and enhancing agent ID handling
* Refactor Agent model and VersionPanel component to streamline version data handling
* Update version handling in Agent model and VersionPanel
- Enhanced the Agent model to include an `updatedAt` timestamp when pushing new versions.
- Improved the VersionPanel component to sort versions by the `updatedAt` timestamp for better display order.
- Added a new localization entry for indicating the active version of an agent.
* ✨ i18n: Add localization for active agent version across multiple languages
* ✨ feat: Introduce version management components for agent history
- Added `isActiveVersion` utility to determine the active version of an agent based on various criteria.
- Implemented `VersionContent` and `VersionItem` components to display agent version history, including loading and error states.
- Enhanced `VersionPanel` to integrate new components and manage version context effectively.
- Added comprehensive tests for version management functionalities to ensure reliability and correctness.
* Add unit tests for AgentFooter component
* cleanup
* Enhance agent version update handling and add unit tests for update operators
- Updated the `updateAgent` function to properly handle various update operators ($push, $pull, $addToSet) while maintaining version history.
- Modified unit tests to validate the correct behavior of agent updates, including versioning and tool management.
* Enhance version comparison logic and update tests for artifacts handling
- Modified the `isActiveVersion` utility to include artifacts in the version comparison criteria.
- Updated the `VersionPanel` component to support artifacts in the agent state.
- Added new unit tests to validate artifacts matching scenarios and edge cases in the `isActiveVersion` function.
* Implement duplicate version detection in agent updates and enhance error handling
- Added `isDuplicateVersion` function to check for identical versions during agent updates, excluding certain fields.
- Updated `updateAgent` function to throw an error if a duplicate version is detected, with detailed error information.
- Enhanced the `updateAgentHandler` to return appropriate responses for duplicate version errors.
- Modified client-side error handling to display user-friendly messages for duplicate version scenarios.
- Added comprehensive unit tests to validate duplicate version detection and error handling across various update scenarios.
* Update version title localization to include version number across multiple languages
- Modified the `com_ui_agent_version_title` translation key to include a placeholder for the version number in various language files.
- Enhanced the `VersionItem` component to utilize the updated localization for displaying version titles dynamically.
* Enhance agent version handling and add revert functionality
- Updated the `isDuplicateVersion` function to improve version comparison logic, including special handling for `projectIds` and arrays of objects.
- Modified the `updateAgent` function to streamline version updates and removed unnecessary checks for test environments.
- Introduced a new `revertAgentVersion` function to allow reverting agents to specific versions, with detailed documentation.
- Enhanced unit tests to validate duplicate version detection and revert functionality, ensuring robust error handling and version management.
* fix CI issues
* cleanup
* Revert all non-English translations
* clean up tests
2025-05-20 15:03:13 -04:00
|
|
|
export const revertAgentVersion = (agent_id: string) => `${agents({ path: `${agent_id}/revert` })}`;
|
|
|
|
|
feat: Vision Support + New UI (#1203)
* feat: add timer duration to showToast, show toast for preset selection
* refactor: replace old /chat/ route with /c/. e2e tests will fail here
* refactor: move typedefs to root of /api/ and add a few to assistant types in TS
* refactor: reorganize data-provider imports, fix dependency cycle, strategize new plan to separate react dependent packages
* feat: add dataService for uploading images
* feat(data-provider): add mutation keys
* feat: file resizing and upload
* WIP: initial API image handling
* fix: catch JSON.parse of localStorage tools
* chore: experimental: use module-alias for absolute imports
* refactor: change temp_file_id strategy
* fix: updating files state by using Map and defining react query callbacks in a way that keeps them during component unmount, initial delete handling
* feat: properly handle file deletion
* refactor: unexpose complete filepath and resize from server for higher fidelity
* fix: make sure resized height, width is saved, catch bad requests
* refactor: use absolute imports
* fix: prevent setOptions from being called more than once for OpenAIClient, made note to fix for PluginsClient
* refactor: import supportsFiles and models vars from schemas
* fix: correctly replace temp file id
* refactor(BaseClient): use absolute imports, pass message 'opts' to buildMessages method, count tokens for nested objects/arrays
* feat: add validateVisionModel to determine if model has vision capabilities
* chore(checkBalance): update jsdoc
* feat: formatVisionMessage: change message content format dependent on role and image_urls passed
* refactor: add usage to File schema, make create and updateFile, correctly set and remove TTL
* feat: working vision support
TODO: file size, type, amount validations, making sure they are styled right, and making sure you can add images from the clipboard/dragging
* feat: clipboard support for uploading images
* feat: handle files on drop to screen, refactor top level view code to Presentation component so the useDragHelpers hook has ChatContext
* fix(Images): replace uploaded images in place
* feat: add filepath validation to protect sensitive files
* fix: ensure correct file_ids are push and not the Map key values
* fix(ToastContext): type issue
* feat: add basic file validation
* fix(useDragHelpers): correct context issue with `files` dependency
* refactor: consolidate setErrors logic to setError
* feat: add dialog Image overlay on image click
* fix: close endpoints menu on click
* chore: set detail to auto, make note for configuration
* fix: react warning (button desc. of button)
* refactor: optimize filepath handling, pass file_ids to images for easier re-use
* refactor: optimize image file handling, allow re-using files in regen, pass more file metadata in messages
* feat: lazy loading images including use of upload preview
* fix: SetKeyDialog closing, stopPropagation on Dialog content click
* style(EndpointMenuItem): tighten up the style, fix dark theme showing in lightmode, make menu more ux friendly
* style: change maxheight of all settings textareas to 138px from 300px
* style: better styling for textarea and enclosing buttons
* refactor(PresetItems): swap back edit and delete icons
* feat: make textarea placeholder dynamic to endpoint
* style: show user hover buttons only on hover when message is streaming
* fix: ordered list not going past 9, fix css
* feat: add User/AI labels; style: hide loading spinner
* feat: add back custom footer, change original footer text
* feat: dynamic landing icons based on endpoint
* chore: comment out assistants route
* fix: autoScroll to newest on /c/ view
* fix: Export Conversation on new UI
* style: match message style of official more closely
* ci: fix api jest unit tests, comment out e2e tests for now as they will fail until addressed
* feat: more file validation and use blob in preview field, not filepath, to fix temp deletion
* feat: filefilter for multer
* feat: better AI labels based on custom name, model, and endpoint instead of `ChatGPT`
2023-11-21 20:12:48 -05:00
|
|
|
export const files = () => '/api/files';
|
2025-07-12 01:52:46 -04:00
|
|
|
export const fileUpload = () => '/api/files';
|
|
|
|
export const fileDelete = () => '/api/files';
|
|
|
|
export const fileDownload = (userId: string, fileId: string) =>
|
|
|
|
`/api/files/download/${userId}/${fileId}`;
|
|
|
|
export const fileConfig = () => '/api/files/config';
|
|
|
|
export const agentFiles = (agentId: string) => `/api/files/agent/${agentId}`;
|
feat: Vision Support + New UI (#1203)
* feat: add timer duration to showToast, show toast for preset selection
* refactor: replace old /chat/ route with /c/. e2e tests will fail here
* refactor: move typedefs to root of /api/ and add a few to assistant types in TS
* refactor: reorganize data-provider imports, fix dependency cycle, strategize new plan to separate react dependent packages
* feat: add dataService for uploading images
* feat(data-provider): add mutation keys
* feat: file resizing and upload
* WIP: initial API image handling
* fix: catch JSON.parse of localStorage tools
* chore: experimental: use module-alias for absolute imports
* refactor: change temp_file_id strategy
* fix: updating files state by using Map and defining react query callbacks in a way that keeps them during component unmount, initial delete handling
* feat: properly handle file deletion
* refactor: unexpose complete filepath and resize from server for higher fidelity
* fix: make sure resized height, width is saved, catch bad requests
* refactor: use absolute imports
* fix: prevent setOptions from being called more than once for OpenAIClient, made note to fix for PluginsClient
* refactor: import supportsFiles and models vars from schemas
* fix: correctly replace temp file id
* refactor(BaseClient): use absolute imports, pass message 'opts' to buildMessages method, count tokens for nested objects/arrays
* feat: add validateVisionModel to determine if model has vision capabilities
* chore(checkBalance): update jsdoc
* feat: formatVisionMessage: change message content format dependent on role and image_urls passed
* refactor: add usage to File schema, make create and updateFile, correctly set and remove TTL
* feat: working vision support
TODO: file size, type, amount validations, making sure they are styled right, and making sure you can add images from the clipboard/dragging
* feat: clipboard support for uploading images
* feat: handle files on drop to screen, refactor top level view code to Presentation component so the useDragHelpers hook has ChatContext
* fix(Images): replace uploaded images in place
* feat: add filepath validation to protect sensitive files
* fix: ensure correct file_ids are push and not the Map key values
* fix(ToastContext): type issue
* feat: add basic file validation
* fix(useDragHelpers): correct context issue with `files` dependency
* refactor: consolidate setErrors logic to setError
* feat: add dialog Image overlay on image click
* fix: close endpoints menu on click
* chore: set detail to auto, make note for configuration
* fix: react warning (button desc. of button)
* refactor: optimize filepath handling, pass file_ids to images for easier re-use
* refactor: optimize image file handling, allow re-using files in regen, pass more file metadata in messages
* feat: lazy loading images including use of upload preview
* fix: SetKeyDialog closing, stopPropagation on Dialog content click
* style(EndpointMenuItem): tighten up the style, fix dark theme showing in lightmode, make menu more ux friendly
* style: change maxheight of all settings textareas to 138px from 300px
* style: better styling for textarea and enclosing buttons
* refactor(PresetItems): swap back edit and delete icons
* feat: make textarea placeholder dynamic to endpoint
* style: show user hover buttons only on hover when message is streaming
* fix: ordered list not going past 9, fix css
* feat: add User/AI labels; style: hide loading spinner
* feat: add back custom footer, change original footer text
* feat: dynamic landing icons based on endpoint
* chore: comment out assistants route
* fix: autoScroll to newest on /c/ view
* fix: Export Conversation on new UI
* style: match message style of official more closely
* ci: fix api jest unit tests, comment out e2e tests for now as they will fail until addressed
* feat: more file validation and use blob in preview field, not filepath, to fix temp deletion
* feat: filefilter for multer
* feat: better AI labels based on custom name, model, and endpoint instead of `ChatGPT`
2023-11-21 20:12:48 -05:00
|
|
|
|
|
|
|
export const images = () => `${files()}/images`;
|
🔥🚀 feat: CDN (Firebase) & feat: account section (#1438)
* localization + api-endpoint
* docs: added firebase documentation
* chore: icons
* chore: SettingsTabs
* feat: account pannel; fix: gear icons
* docs: position update
* feat: firebase
* feat: plugin support
* route
* fixed bugs with firebase and moved a lot of files
* chore(DALLE3): using UUID v4
* feat: support for social strategies; moved '/images' path
* fix: data ignored
* gitignore update
* docs: update firebase guide
* refactor: Firebase
- use singleton pattern for firebase initialization, initially on server start
- reorganize imports, move firebase specific files to own service under Files
- rename modules to remove 'avatar' redundancy
- fix imports based on changes
* ci(DALLE/DALLE3): fix tests to use logger and new expected outputs, add firebase tests
* refactor(loadToolWithAuth): pass userId to tool as field
* feat(images/parse): feat: Add URL Image Basename Extraction
Implement a new module to extract the basename of an image from a given URL. This addition includes the function, which parses the URL and retrieves the basename using the Node.js 'url' and 'path' modules. The function is documented with JSDoc comments for better maintainability and understanding. This feature enhances the application's ability to handle and process image URLs efficiently.
* refactor(addImages): function to use a more specific regular expression for observedImagePath based on the generated image markdown standard across the app
* refactor(DALLE/DALLE3): utilize `getImageBasename` and `this.userId`; fix: pass correct image path to firebase url helper
* fix(addImages): make more general to match any image markdown descriptor
* fix(parse/getImageBasename): test result of this function for an actual image basename
* ci(DALLE3): mock getImageBasename
* refactor(AuthContext): use Recoil atom state for user
* feat: useUploadAvatarMutation, react-query hook for avatar upload
* fix(Toast): stack z-order of Toast over all components (1000)
* refactor(showToast): add optional status field to avoid importing NotificationSeverity on each use of the function
* refactor(routes/avatar): remove unnecessary get route, get userId from req.user.id, require auth on POST request
* chore(uploadAvatar): TODO: remove direct use of Model, `User`
* fix(client): fix Spinner imports
* refactor(Avatar): use react-query hook, Toast, remove unnecessary states, add optimistic UI to upload
* fix(avatar/localStrategy): correctly save local profile picture and cache bust for immediate rendering; fix: firebase init info message (only show once)
* fix: use `includes` instead of `endsWith` for checking manual query of avatar image path in case more queries are appended (as is done in avatar/localStrategy)
---------
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
2023-12-30 03:42:19 +01:00
|
|
|
|
|
|
|
export const avatar = () => `${images()}/avatar`;
|
🔉 feat: Speech-to-text / Text-to-speech (initial support) (#2836)
* Update TextChat.jsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update SubmitButton.jsx
* Create ListeningIcon.tsx
* Update index.ts
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update ListeningIcon.tsx
* Update ListeningIcon.tsx
* Create SpeechRecognition.tsx
* Update TextChat.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Create SpeechSynthesis.tsx
* Update index.jsx
* Update SpeechSynthesis.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Squashed commit of the following:
commit 28230d9305e696f0200f1d3e4da3160dbf877374
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe0ac5bd72ebc1124a0d1d235f0a5685
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5aa8ae43576aa07cacf18697f6a3cc59
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d30500d9f027aed686d42cc229a618f9210
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675bef408fdb918250b151d6ad572a8067
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823585b1f4244e8c250ad184e4d136323
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d469cfabf272b96699902803bb827cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046362bfef9c2ee5fa1c5bf3f051d62a7
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487f462f16f23d75e839e3e3ca6ddc656
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161cfc8e413c6cf7355d49a11314f53eb
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082c6ada2cbaaf5c9521c53b6033afdf2
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a206771c15e3a2de65d8acca582d302e
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704fa59f99e3a770bf7302a977fe447a27
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546764fcf0852a54a4c72cf5aeb54247e
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e6c68bf22d060a014ec74285b160ef9
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f3814806031bd960ddd329283020469d20
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18640525bec17051e38dc408a1c9283e
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe4115698f426325741763ce612dfc302f3e72
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca97eb1e0f0d264b941dc8ad4f3e1c47
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1f9648458e93ebc7acdeefed59f9602
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a5690203129a15b544b1b935552277430b0090d5
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d46838f3a9868b44f88af6c1fd4aab72f77
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex pattern for username validation to allow special characters @#$%&*()
fix(validators.js): update regex pattern for username validation to allow special characters @#$%&*()
* fix(Registration.spec.tsx): fix validation error message for username length requirement
commit d38e463d34c720db1295a4a2aa95e58d7986556c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 13:44:40 2023 -0400
fix(bingAI): markdown and error formatting for final stream response (#829)
* fix(bingAI): markdown formatting for final stream response due to new strict payload validation on the frontend
* fix: add missing prop to bing Error response
commit 7dc27b10f19bcd32bffcbf2858756facfd752c8c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 22 18:44:59 2023 -0400
feat: Edit AI Messages, Edit Messages in Place (#825)
* refactor: replace lodash import with specific function import
fix(api): esm imports to cjs
* refactor(Messages.tsx): convert to TS, out-source scrollToDiv logic to a custom hook
fix(ScreenshotContext.tsx): change Ref to RefObject in ScreenshotContextType
feat(useScrollToRef.ts): add useScrollToRef hook for scrolling to a ref with throttle
fix(Chat.tsx): update import path for Messages component
fix(Search.tsx): update import path for Messages component
* chore(types.ts): add TAskProps and TOptions types
refactor(useMessageHandler.ts): use TAskFunction type for ask function signature
* refactor(Message/Content): convert to TS, move Plugin component to Content dir
* feat(MessageContent.tsx): add MessageContent component for displaying and editing message content
feat(index.ts): export MessageContent component from Messages/Content directory
* wip(Message.jsx): conversion and use of new component in progress
* refactor: convert Message.jsx to TS and fix typing/imports based on changes
* refactor: add typed props and refactor MultiMessage to TS, fix typing issues resulting from the conversion
* edit message in progress
* feat: complete edit AI message logic, refactor continue logic
* feat(middleware): add validateMessageReq middleware
feat(routes): add validation for message requests using validateMessageReq middleware
feat(routes): add create, read, update, and delete routes for messages
* feat: complete frontend logic for editing messages in place
feat(messages.js): update route for updating a specific message
- Change the route for updating a message to include the messageId in the URL
- Update the request handler to use the messageId from the request parameters and the text from the request body
- Call the updateMessage function with the updated parameters
feat(MessageContent.tsx): add functionality to update a message
- Import the useUpdateMessageMutation hook from the data provider
- Destructure the conversationId, parentMessageId, and messageId from the message object
- Create a mutation function using the useUpdateMessageMutation hook
- Implement the updateMessage function to call the mutation function with the updated message parameters
- Update the messages state to reflect the updated message text
feat(api-endpoints.ts): update messages endpoint to include messageId
- Update the messages endpoint to include the messageId as an optional parameter
feat(data-service.ts): add updateMessage function
- Implement the updateMessage function to make a PUT request to
* fix(messages.js): make updateMessage function asynchronous and await its execution
* style(EditIcon): make icon active for AI message
* feat(gptPlugins/anthropic): add edit support
* fix(validateMessageReq.js): handle case when conversationId is 'new' and return empty array
feat(Message.tsx): pass message prop to SiblingSwitch component
refactor(SiblingSwitch.tsx): convert to TS
* fix(useMessageHandler.ts): remove message from currentMessages if isContinued is true
feat(useMessageHandler.ts): add support for submission messages in setMessages
fix(useServerStream.ts): remove unnecessary conditional in setMessages
fix(useServerStream.ts): remove isContinued variable from submission
* fix(continue): switch to continued message generation when continuing an earlier branch in conversation
* fix(abortMiddleware.js): fix condition to check partialText length
chore(abortMiddleware.js): add error logging when abortMessage fails
* refactor(MessageHeader.tsx): convert to TS
fix(Plugin.tsx): add default value for className prop in Plugin component
* refactor(MultiMessage.tsx): remove commented out code
docs(MultiMessage.tsx): update comment to clarify when siblingIdx is reset
* fix(GenerationButtons): optimistic state for continue button
* fix(MessageContent.tsx): add data-testid attribute to message text editor
fix(messages.spec.ts): update waitForServerStream function to include edit endpoint check
feat(messages.spec.ts): add test case for editing messages
* fix(HoverButtons & Message & useGenerations): Refactor edit functionality and related conditions
- Update enterEdit function signature and prop
- Create and utilize hideEditButton variable
- Enhance conditions for edit button visibility and active state
- Update button event handlers
- Introduce isEditableEndpoint in useGenerations and refine continueSupported condition.
* fix(useGenerations.ts): fix condition for hideEditButton to include error and searchResult
chore(data-provider): bump version to 0.1.6
fix(types.ts): add status property to TError type
* chore: bump @dqbd/tiktoken to 1.0.7
* fix(abortMiddleware.js): add required isCreatedByUser property to the error response object
* refactor(Message.tsx): remove unnecessary props from SiblingSwitch component, as setLatestMessage is firing on every switch already
refactor(SiblingSwitch.tsx): remove unused imports and code
* chore(BaseClient.js): move console.debug statements back inside if block
commit db77163f5d1e98a13dc8d05ee1907001840030c6
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 22 14:15:14 2023 +0200
docs: update chimeragpt (#826)
* Update free_ai_apis.md
* Update free_ai_apis.md
commit 4a4e803df3118effc2fb73b3d71766ac565c1e97
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 21 20:15:18 2023 +0200
style(Dialog): Improved Close Button ("X") position (#824)
commit 909b00c7521277e49e4cf7319cd237c27250bd28
Author: Daniel Avila <messagedaniel@protonmail.com>
Date: Sun Aug 20 21:04:36 2023 -0400
fix(HoverButtons): light/dark styling to match official site
commit 61dcb4d3073a74bc45020d4888d2120173b4eb22
Author: Naosuke Yokoe <ankerasoy@gmail.com>
Date: Sat Aug 19 20:11:31 2023 +0900
feat: Azure Cognitive Search Plugin (#815)
* feat(AzureCognitiveSearchPlugin)
* feat(tools/AzureCognitiveSearch.js): Add a new plugin (not structured
version)
* feat(tools/structured/AzureCognitiveSearch.js): Add a new plugin (structured version)
* feat(tools/manifest.json, tools/index.js, tools/util/handleTools.js):
Add configurations for the plugin
* feat(api/package.json, package-lock.json): Installed a new package for the
plugin (@azure/search-documents)
* feat(.env.example): Add new environment variables for the plugin
Here is the link to the corresponding discussion page:
https://github.com/danny-avila/LibreChat/discussions/567
* docs(AzureCognitiveSearchPlugin)
* docs(features/plugins/azure_cognitive_search.md): Add a new document
for the plugin
* (fix:.env.example)
* reverted extra whitespaces removed by the editor
* docs(mkdocs.yml)
* Add the Azure Cognitive Search Plugin's documentation item to
mkdocs.yml.
commit 3c7f67fa7674549ff877105f4bd5b532f17fef06
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:40:33 2023 -0400
fix(abortMiddleware): handle early abort error where userMessage.conversationId is undefined. In this case, the userId will be used as the abortKey
commit c74c68a135064b9cb79d9666e535a1b862a8de4f
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:10:30 2023 -0400
refactor(MessageHandler -> useServerStream): convert all relating files to TS and correct typings based on this change: properly refactor MessageHandler to a custom hook, where it's passed a submission object to instantiate the stream. This is the bare minimum groundwork for potentially having multiple streams running, which would be a big project to modularize a lot of the global state into maps/multiple streams, particular useful for having multiple views in place
commit 8b4d3c2c2170e91258176a2cdedc977b690395a5
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:04:29 2023 -0400
refactor(routes): convert to TS
commit d612cfcb45f74da51ed4342264e35d42b77b7e8e
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:02:39 2023 -0400
chore(Auth): reorder exports in Auth component
fix(PluginAuthForm): handle case when pluginKey is null or undefined
fix(PluginStoreDialog): handle case when getAvailablePluginFromKey is null or undefined
fix(AuthContext): make authConfig optional in AuthContextProvider
feat(hooks): add useServerStream hook
fix(conversation): setSubmission to null instead of empty object
fix(preset): specify type for presets atom
fix(search): specify type for isSearchEnabled atom
fix(submission): specify type for submission atom
commit c40b95f424ad7110aef13b10725a3e2a900cf42e
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 18 16:11:00 2023 +0200
feat: Disable Registration with social login (#813)
* Google, Github and Discord
* update .env.example with ALLOW_SOCIAL_REGISTRATION
* fix some conflict
* refactor strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit 46ed5aaccd26d657e16c0e318d54c55821ec0016
Author: Patrick <psarnowski@gmail.com>
Date: Fri Aug 18 09:38:24 2023 -0400
Show the response scores from Bing. (#814)
commit 1dacfa49f06e2ca00e3765ede5c7db050fa34353
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 17 20:32:31 2023 +0200
update profile picture (#792)
commit afd43afb60b230a00ce5a5effab900130252f5cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 17 12:50:05 2023 -0400
feat(GPT/Anthropic): Continue Regenerating & Generation Buttons (#808)
* feat(useMessageHandler.js/ts): Refactor and add features to handle user messages, support multiple endpoints/models, generate placeholder responses, regeneration, and stopGeneration function
fix(conversation.ts, buildTree.ts): Import TMessage type, handle null parentMessageId
feat(schemas.ts): Update and add schemas for various AI services, add default values, optional fields, and endpoint-to-schema mapping, create parseConvo function
chore(useMessageHandler.js, schemas.ts): Remove unused imports, variables, and chatGPT enum
* wip: add generation buttons
* refactor(cleanupPreset.ts): simplify cleanupPreset function
refactor(getDefaultConversation.js): remove unused code and simplify getDefaultConversation function
feat(utils): add getDefaultConversation function
This commit adds a new utility function called `getDefaultConversation` to the `client/src/utils/getDefaultConversation.ts` file. This function is responsible for generating a default conversation object based on the provided parameters.
The `getDefaultConversation` function takes in an object with the following properties:
- `conversation`: The conversation object to be used as a base.
- `endpointsConfig`: The configuration object containing information about the available endpoints.
- `preset`: An optional preset object that can be used to override the default behavior.
The function first tries to determine the target endpoint based on the preset object. If a valid endpoint is found, it is used as the target endpoint. If not, the function tries to retrieve the last conversation setup from the local storage and uses its endpoint if it is valid. If neither the preset nor the local storage contains a valid endpoint, the function falls back to a default endpoint.
Once the target endpoint is determined,
* fix(utils): remove console.error statement in buildDefaultConversation function
fix(schemas): add default values for catch blocks in openAISchema, googleSchema, bingAISchema, anthropicSchema, chatGPTBrowserSchema, and gptPluginsSchema
* fix: endpoint not changing on change of preset from other endpoint, wip: refactor
* refactor: preset items to TSX
* refactor: convert resetConvo to TS
* refactor(getDefaultConversation.ts): move defaultEndpoints array to the top of the file for better readability
refactor(getDefaultConversation.ts): extract getDefaultEndpoint function for better code organization and reusability
* feat(svg): add ContinueIcon component
feat(svg): add RegenerateIcon component
feat(svg): add ContinueIcon and RegenerateIcon components to index.ts
* feat(Button.tsx): add onClick and className props to Button component
feat(GenerationButtons.tsx): add logic to display Regenerate or StopGenerating button based on isSubmitting and messages
feat(Regenerate.tsx): create Regenerate component with RegenerateIcon and handleRegenerate function
feat(StopGenerating.tsx): create StopGenerating component with StopGeneratingIcon and handleStopGenerating function
* fix(TextChat.jsx): reorder imports and variables for better readability
fix(TextChat.jsx): fix typo in condition for isNotAppendable variable
fix(TextChat.jsx): remove unused handleStopGenerating function
fix(ContinueIcon.tsx): remove unnecessary closing tags for polygon elements
fix(useMessageHandler.ts): add missing type annotations for handleStopGenerating and handleRegenerate functions
fix(useMessageHandler.ts): remove unused variables in return statement
* fix(getDefaultConversation.ts): refactor code to use getLocalStorageItems function
feat(getLocalStorageItems.ts): add utility function to retrieve items from local storage
* fix(OpenAIClient.js): add support for streaming result in sendCompletion method
feat(OpenAIClient.js): add finish_reason metadata to opts in sendCompletion method
feat(Message.js): add finish_reason field to Message model
feat(messageSchema.js): add finish_reason field to messageSchema
feat(openAI.js): parse chatGptLabel and promptPrefix from req.body and pass rest of the modelOptions to endpointOption
feat(openAI.js): add addMetadata function to store metadata in ask function
feat(openAI.js): add metadata to response if available
feat(schemas.ts): add finish_reason field to tMessageSchema
* feat(types.ts): add TOnClick and TGenButtonProps types for button components
feat(Continue.tsx): create Continue component for generating button
feat(GenerationButtons.tsx): update GenerationButtons component to use Continue component
feat(Regenerate.tsx): create Regenerate component for regenerating button
feat(Stop.tsx): create Stop component for stop generating button
* feat(MessageHandler.jsx): add MessageHandler component to handle messages and conversations
fix(Root.jsx): fix import paths for Nav and MessageHandler components
* feat(useMessageHandler.ts): add support for generation parameter in ask function
feat(useMessageHandler.ts): add support for isEdited parameter in ask function
feat(useMessageHandler.ts): add support for continueGeneration function
fix(createPayload.ts): replace endpoint URL when isEdited parameter is true
* chore(client): set skipLibCheck to true in tsconfig.json
* fix(useMessageHandler.ts): remove unused clientId variable
fix(schemas.ts): make clientId field in tMessageSchema nullable and optional
* wip: edit route for continue generation
* refactor(api): move handlers to root of routes dir
* fix(useMessageHandler.ts): initialize currentMessages to an empty array if messages is null
fix(useMessageHandler.ts): update initialResponse text to use responseText variable
fix(useMessageHandler.ts): update setMessages logic for isRegenerate case
fix(MessageHandler.jsx): update setMessages logic for cancelHandler, createdHandler, and finalHandler
* fix(schemas.ts): make createdAt and updatedAt fields optional and set default values using new Date().toISOString()
fix(schemas.ts): change type annotation of TMessage from infer to input
* refactor(useMessageHandler.ts): rename AskProps type to TAskProps
refactor(useMessageHandler.ts): remove generation property from ask function arguments
refactor(useMessageHandler.ts): use nullish coalescing operator (??) instead of logical OR (||)
refactor(useMessageHandler.ts): pass the responseMessageId to message prop of submission
* fix(BaseClient.js): use nullish coalescing operator (??) instead of logical OR (||) for default values
* fix(BaseClient.js): fix responseMessageId assignment in handleStartMethods method
feat(BaseClient.js): add support for isEdited flag in sendMessage method
feat(BaseClient.js): add generation to responseMessage text in sendMessage method
* fix(openAI.js): remove unused imports and commented out code
feat(openAI.js): add support for generation parameter in request body
fix(openAI.js): remove console.log statement
fix(openAI.js): remove unused variables and parameters
fix(openAI.js): update response text in case of error
fix(openAI.js): handle error and abort message in case of error
fix(handlers.js): add generation parameter to createOnProgress function
fix(useMessageHandler.ts): update responseText variable to use generation parameter
* refactor(api/middleware): move inside server dir
* refactor: add endpoint specific, modular functions to build options and initialize clients, create server/utils, move middleware, separate utils into api general utils and server specific utils
* fix(abortMiddleware.js): import getConvo and getConvoTitle functions from models
feat(abortMiddleware.js): add abortAsk function to abortController to handle aborting of requests
fix(openAI.js): import buildOptions and initializeClient functions from endpoints/openAI
refactor(openAI.js): use getAbortData function to get data for abortAsk function
* refactor: move endpoint specific logic to an endpoints dir
* refactor(PluginService.js): fix import path for encrypt and decrypt functions in PluginService.js
* feat(openAI): add new endpoint for adding a title to a conversation
- Added a new file `addTitle.js` in the `api/server/routes/endpoints/openAI` directory.
- The `addTitle.js` file exports a function `addTitle` that takes in request parameters and performs the following actions:
- If the `parentMessageId` is `'00000000-0000-0000-0000-000000000000'` and `newConvo` is true, it proceeds with the following steps:
- Calls the `titleConvo` function from the `titleConvo` module, passing in the necessary parameters.
- Calls the `saveConvo` function from the `saveConvo` module, passing in the user ID and conversation details.
- Updated the `index.js` file in the `api/server/routes/endpoints/openAI` directory to export the `addTitle` function.
- This change adds
* fix(abortMiddleware.js): remove console.log statement
refactor(gptPlugins.js): update imports and function parameters
feat(gptPlugins.js): add support for abortController and getAbortData
refactor(openAI.js): update imports and function parameters
feat(openAI.js): add support for abortController and getAbortData
fix(openAI.js): refactor code to use modularized functions and middleware
fix(buildOptions.js): refactor code to use destructuring and update variable names
* refactor(askChatGPTBrowser.js, bingAI.js, google.js): remove duplicate code for setting response headers
feat(askChatGPTBrowser.js, bingAI.js, google.js): add setHeaders middleware to set response headers
* feat(middleware): validateEndpoint, refactor buildOption to only be concerned of endpointOption
* fix(abortMiddleware.js): add 'finish_reason' property with value 'incomplete' to responseMessage object
fix(abortMessage.js): remove console.log statement for aborted message
fix(handlers.js): modify tokens assignment to handle empty generation string and trailing space
* fix(BaseClient.js): import addSpaceIfNeeded function from server/utils
fix(BaseClient.js): add space before generation in text property
fix(index.js): remove getCitations and citeText exports
feat(buildEndpointOption.js): add buildEndpointOption middleware
fix(index.js): import buildEndpointOption middleware
fix(anthropic.js): remove buildOptions function and use endpointOption from req.body
fix(gptPlugins.js): remove buildOptions function and use endpointOption from req.body
fix(openAI.js): remove buildOptions function and use endpointOption from req.body
feat(utils): add citations.js and handleText.js modules
fix(utils): fix import statements in index.js module
* refactor(gptPlugins.js): use getResponseSender function from librechat-data-provider
* feat(gptPlugins): complete 'continue generating'
* wip: anthropic continue regen
* feat(middleware): add validateRegistration middleware
A new middleware function called `validateRegistration` has been added to the list of exported middleware functions in `index.js`. This middleware is responsible for validating registration data before allowing the registration process to proceed.
* feat(Anthropic): complete continue regen
* chore: add librechat-data-provider to api/package.json
* fix(ci): backend-review will mock meilisearch, also installs data-provider as now needed
* chore(ci): remove unneeded SEARCH env var
* style(GenerationButtons): make text shorter for sake of space economy, even though this diverges from chat.openai.com
* style(GenerationButtons/ScrollToBottom): adjust visibility/position based on screen size
* chore(client): 'Editting' typo
* feat(GenerationButtons.tsx): add support for endpoint prop in GenerationButtons component
feat(OptionsBar.tsx): pass endpoint prop to GenerationButtons component
feat(useGenerations.ts): create useGenerations hook to handle generation logic
fix(schemas.ts): add searchResult field to tMessageSchema
* refactor(HoverButtons): convert to TSX and utilize new useGenerations hook
* fix(abortMiddleware): handle error with res headers set, or abortController not found, to ensure proper API error is sent to the client, chore(BaseClient): remove console log for onStart message meant for debugging
* refactor(api): remove librechat-data-provider dep for now as it complicates deployed docker build stage, re-use code in CJS, located in server/endpoints/schemas
* chore: remove console.logs from test files
* ci: add backend tests for AnthropicClient, focusing on new buildMessages logic
* refactor(FakeClient): use actual BaseClient sendMessage method for testing
* test(BaseClient.test.js): add test for loading chat history
test(BaseClient.test.js): add test for sendMessage logic with isEdited flag
* fix(buildEndpointOption.js): add support for azureOpenAI in buildFunction object
wip(endpoints.js): fetch Azure models from Azure OpenAI API if opts.azure is true
* fix(Button.tsx): add data-testid attribute to button component
fix(SelectDropDown.tsx): add data-testid attribute to Listbox.Button component
fix(messages.spec.ts): add waitForServerStream function to consolidate logic for awaiting the server response
feat(messages.spec.ts): add test for stopping and continuing message and improve browser/page context order and closing
* refactor(onProgress): speed up time to save initial message for editable routes
* chore: disable AI message editing (for now), was accidentally allowed
* refactor: ensure continue is only supported for latest message style: improve styling in dark mode and across all hover buttons/icons, including making edit icon for AI invisible (for now)
* fix: add test id to generation buttons so they never resolve to 2+ items
* chore(package.json): add 'packages/' to the list of ignored directories
chore(data-provider/package.json): bump version to 0.1.5
commit ae5b7d3d53a39764c301ad24bf1b7bad216ab97b
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 15 18:27:54 2023 -0400
fix(PluginsClient.js): fix ChatOpenAI Azure Config Issue (#812)
* fix(PluginsClient.js): fix issue with creating LLM when using Azure
* chore(PluginsClient.js): omit azure logging
* refactor(PluginsClient.js): simplify assignment of azure variable
The code was simplified by directly assigning the value of `this.azure` to the `azure` variable using object destructuring. This makes the code cleaner and more concise.
commit b85f3bf91ec3951400029f58fa92ad1a762d19b0
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 15 18:42:24 2023 +0200
update from lang to localize (#810)
commit 80aab73bf6313bede6afa2fcae111930ddd673da
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:19:04 2023 -0400
chore: rebuilt package-lock file
commit bbe4931a9738eca84f8f91d5c753e74f93742671
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:13:24 2023 -0400
refactor(ScreenshotContext): use html-to-image for lighter bundle, faster processing
commit 74802dd720a49c3bc0dff32f5622d5610c6cf0c4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 14 17:51:03 2023 +0200
chore: Translation Fixes, Lint Error Corrections, and Additional Translations (#788)
* fix translation and small lint error
* changed from localize to useLocalize hook
* changed to useLocalize
commit b64cc71d8809a6e8c9e26ce8d4d0531ccff54803
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:23:00 2023 -0400
chore(docker-compose.yml): comment out meilisearch ports in docker-compose.yml (#807)
commit 89f260bc7895713f32cf1361b4912f3f893ecbe4
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:12:00 2023 -0400
fix(CodeBlock.tsx): fix copy-to-clipboard functionality. The code has been updated to use the copy function from the copy-to-clipboard library instead of the (#806)
avigator.clipboard.writeText method. This should fix the issue with browser incompatibility with navigator SDK and allow users to copy code from the CodeBlock component successfully.
commit d00c7354cd464ce17b0d47362621232cb6f88481
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 09:45:44 2023 -0400
fix: Corrected Registration Validation, Case-Insensitive Variable Handling, Playwright workflow (#805)
* feat(auth.js): add validation for registration endpoint using validateRegistration middleware
feat(validateRegistration.js): add middleware to validate registration based on ALLOW_REGISTRATION environment variable
* fix(config.js): fix registrationEnabled and socialLoginEnabled variables to handle case-insensitive environment variable values
* refactor(validateRegistration.js): remove console.log statement
* chore(playwright.yml): skip browser download during yarn install
chore(playwright.yml): place Playwright binaries to node_modules/@playwright/test
chore(playwright.yml): install Playwright dependencies using npx playwright install-deps
chore(playwright.yml): install Playwright chromium browser using npx playwright install chromium
chore(playwright.yml): install @playwright/test@latest using npm install -D @playwright/test@latest
chore(playwright.yml): run Playwright tests using npm run e2e:ci
* chore(playwright.yml): change npm install order and update comment
The order of the npm install commands in the "Install Playwright Browsers" step has been changed to first install @playwright/test@latest and then install chromium. Additionally, the comment explaining the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD variable has been updated to mention npm install instead of yarn install.
* chore(playwright.yml): remove commented out code for caching and add separate steps for installing Playwright dependencies and browsers
commit 1aa4b34dc6c914c2992bb50d39c9b7363f144cf4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 11 19:02:52 2023 +0200
added the dot (.) username rules (#787)
* Create VolumeMuteIcon.tsx
* Create VolumeIcon.tsx
* Update index.ts
* Update SubmitButton.jsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update HoverButtons.tsx
* Update useServerStream.ts
* Update useServerStream.ts
* Update HoverButtons.tsx
* Update useServerStream.ts
* Update useServerStream.ts
* Update HoverButtons.tsx
* Update VolumeIcon.tsx
* Update VolumeMuteIcon.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update HoverButtons.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update SpeechSynthesis.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update package.json
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Squashed commit of the following:
commit 101952963435e2ff32b8298cc5d6f0121fab69f5
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:12:14 2023 -0500
Update SpeechRecognition.tsx
commit 67f111ccd0d72c1fc82398866086a75a11ed7919
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:08:48 2023 -0500
Update SpeechRecognition.tsx
commit 0b35dbe1960bb45445f0813ffd7dc4b38e44d772
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:04:50 2023 -0500
Update SpeechRecognition.tsx
commit 6686126dc0d30322fa2536a83f0b0f903f28b822
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:49:08 2023 -0500
Update SpeechRecognition.tsx
commit 5b80ddfba74ad417dcaabf89ed12e7ec8ddb50c8
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:45:02 2023 -0500
Update package.json
commit 39e84efa81d778b2241dac6210899c5bb7a4da7e
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:35:48 2023 -0500
Update SpeechSynthesis.tsx
commit 4c6d067cb9866e187c147d5517ef5f98c8f54879
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:24:29 2023 -0500
Update HoverButtons.tsx
commit c5ce576fb85973f20bffeb8d7eab3f3e3f626b9f
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:13:20 2023 -0500
Update SpeechSynthesis.tsx
commit d95fa195397d9ee261c3b8cf238aa983e338edd7
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:11:38 2023 -0500
Update SpeechSynthesis.tsx
commit c794f076787e1e7c957c6052b4e542473df8db48
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:03:34 2023 -0500
Update HoverButtons.tsx
commit 7ae0e7e97cdf0969f5e6d13c73a1533e5dc93a8f
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:59:45 2023 -0500
Update HoverButtons.tsx
commit e9882dedad397895384f9735c3be00c2eb77f9c6
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:58:07 2023 -0500
Update SpeechSynthesis.tsx
commit 95cf3007826144d64e48e2c61769c1e0e3a81cda
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:44:49 2023 -0500
Update HoverButtons.tsx
commit 37c828d7fb7ac031df9ca1733736cbfbf8a13131
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:30:34 2023 -0500
Update VolumeMuteIcon.tsx
commit 61335317377da07a095a6a821dcdffe31552c976
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:29:54 2023 -0500
Update VolumeIcon.tsx
commit 4b4afcdd3767d438c9932f926566f4bc55d864a5
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:20:14 2023 -0500
Update HoverButtons.tsx
commit 609d1dfefb06e3cdfca8f400265c4d47e2d8d5cc
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:49:52 2023 -0500
Update useServerStream.ts
commit 875ce4b77e9e3121c7f98ee4a0bfbee35f726923
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:48:26 2023 -0500
Update useServerStream.ts
commit 8ed04e496bc9a9d462a6a043db083665dc238472
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:37:59 2023 -0500
Update HoverButtons.tsx
commit 4b30c132dfb5d297b737448a49bf79a1512c2d26
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:14:01 2023 -0500
Update useServerStream.ts
commit c041c329cf0e71b8d32fada053363de4a6c0b91c
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:07:14 2023 -0500
Update useServerStream.ts
commit 3e36c168171e53f3329936899dbe125f5149c4cd
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:36:21 2023 -0500
Update HoverButtons.tsx
commit c7eea967597e2f552cf44f38dd2c92d5cc9ec068
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:28:03 2023 -0500
Update TextChat.jsx
commit 5542f8e85dfa16faaf8be9535cb36a4614d17aa1
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:21:50 2023 -0500
Update SpeechRecognition.tsx
commit 9a27e56f8b40766136c491ae0ed4abfdd17e4c11
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:16:01 2023 -0500
Update TextChat.jsx
commit 7f101bd1229961fed81eaf8ef2e7ed08050da208
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:09:51 2023 -0500
Update SpeechRecognition.tsx
commit d405454bf5d3f00e1421c37086d60a6353cadbfb
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:03:34 2023 -0500
Update SpeechRecognition.tsx
commit 6033eb3ed123a485278a3c86d042c6892595d23d
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:01:06 2023 -0500
Update TextChat.jsx
commit 9a3e67fcd2ac9695e35258ea4e5922c8d514486d
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 18:53:19 2023 -0500
Update TextChat.jsx
commit 6583877cb32c96f6746eaa213f8db0924faad89e
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:53:18 2023 -0500
Update SubmitButton.jsx
commit 8d5114bfae355d6e78dcca1cf0c22bacd21c93d6
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:39:20 2023 -0500
Update SubmitButton.jsx
commit 29a5b558838704b5cf9d564a1e0b64538ab84ae6
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:28:03 2023 -0500
Update index.ts
commit b03001d01df0fb6caa756534a48466a96932c6f4
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:25:43 2023 -0500
Create VolumeIcon.tsx
commit 863af2c9594f0b25425b2382e727e62d25caff79
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:21:43 2023 -0500
Create VolumeMuteIcon.tsx
commit ad3c78f86703e0e4930151ac3ba45bb3450dd763
Merge: ed4b25b2 28230d93
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 16:49:56 2023 -0500
Merge branch 'danny-avila:main' into Speech-September
commit ed4b25b2c17ce76fba17a92d7e03a296b371d148
Author: bsu3338 <bsu3338@yahoo.com>
Date: Sun Sep 3 16:49:03 2023 -0500
Squashed commit of the following:
commit 28230d9305e696f0200f1d3e4da3160dbf877374
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe0ac5bd72ebc1124a0d1d235f0a5685
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5aa8ae43576aa07cacf18697f6a3cc59
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d30500d9f027aed686d42cc229a618f9210
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675bef408fdb918250b151d6ad572a8067
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823585b1f4244e8c250ad184e4d136323
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d469cfabf272b96699902803bb827cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046362bfef9c2ee5fa1c5bf3f051d62a7
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487f462f16f23d75e839e3e3ca6ddc656
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161cfc8e413c6cf7355d49a11314f53eb
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082c6ada2cbaaf5c9521c53b6033afdf2
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a206771c15e3a2de65d8acca582d302e
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704fa59f99e3a770bf7302a977fe447a27
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546764fcf0852a54a4c72cf5aeb54247e
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e6c68bf22d060a014ec74285b160ef9
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f3814806031bd960ddd329283020469d20
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18640525bec17051e38dc408a1c9283e
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe4115698f426325741763ce612dfc302f3e72
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca97eb1e0f0d264b941dc8ad4f3e1c47
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1f9648458e93ebc7acdeefed59f9602
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a5690203129a15b544b1b935552277430b0090d5
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d46838f3a9868b44f88af6c1fd4aab72f77
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex pattern for username validation to allow special characters @#$%&*()
fix(validators.js): update regex pattern for username validation to allow special characters @#$%&*()
* fix(Registration.spec.tsx): fix validation error message for username length requirement
commit d38e463d34c720db1295a4a2aa95e58d7986556c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 13:44:40 2023 -0400
fix(bingAI): markdown and error formatting for final stream response (#829)
* fix(bingAI): markdown formatting for final stream response due to new strict payload validation on the frontend
* fix: add missing prop to bing Error response
commit 7dc27b10f19bcd32bffcbf2858756facfd752c8c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 22 18:44:59 2023 -0400
feat: Edit AI Messages, Edit Messages in Place (#825)
* refactor: replace lodash import with specific function import
fix(api): esm imports to cjs
* refactor(Messages.tsx): convert to TS, out-source scrollToDiv logic to a custom hook
fix(ScreenshotContext.tsx): change Ref to RefObject in ScreenshotContextType
feat(useScrollToRef.ts): add useScrollToRef hook for scrolling to a ref with throttle
fix(Chat.tsx): update import path for Messages component
fix(Search.tsx): update import path for Messages component
* chore(types.ts): add TAskProps and TOptions types
refactor(useMessageHandler.ts): use TAskFunction type for ask function signature
* refactor(Message/Content): convert to TS, move Plugin component to Content dir
* feat(MessageContent.tsx): add MessageContent component for displaying and editing message content
feat(index.ts): export MessageContent component from Messages/Content directory
* wip(Message.jsx): conversion and use of new component in progress
* refactor: convert Message.jsx to TS and fix typing/imports based on changes
* refactor: add typed props and refactor MultiMessage to TS, fix typing issues resulting from the conversion
* edit message in progress
* feat: complete edit AI message logic, refactor continue logic
* feat(middleware): add validateMessageReq middleware
feat(routes): add validation for message requests using validateMessageReq middleware
feat(routes): add create, read, update, and delete routes for messages
* feat: complete frontend logic for editing messages in place
feat(messages.js): update route for updating a specific message
- Change the route for updating a message to include the messageId in the URL
- Update the request handler to use the messageId from the request parameters and the text from the request body
- Call the updateMessage function with the updated parameters
feat(MessageContent.tsx): add functionality to update a message
- Import the useUpdateMessageMutation hook from the data provider
- Destructure the conversationId, parentMessageId, and messageId from the message object
- Create a mutation function using the useUpdateMessageMutation hook
- Implement the updateMessage function to call the mutation function with the updated message parameters
- Update the messages state to reflect the updated message text
feat(api-endpoints.ts): update messages endpoint to include messageId
- Update the messages endpoint to include the messageId as an optional parameter
feat(data-service.ts): add updateMessage function
- Implement the updateMessage function to make a PUT request to
* fix(messages.js): make updateMessage function asynchronous and await its execution
* style(EditIcon): make icon active for AI message
* feat(gptPlugins/anthropic): add edit support
* fix(validateMessageReq.js): handle case when conversationId is 'new' and return empty array
feat(Message.tsx): pass message prop to SiblingSwitch component
refactor(SiblingSwitch.tsx): convert to TS
* fix(useMessageHandler.ts): remove message from currentMessages if isContinued is true
feat(useMessageHandler.ts): add support for submission messages in setMessages
fix(useServerStream.ts): remove unnecessary conditional in setMessages
fix(useServerStream.ts): remove isContinued variable from submission
* fix(continue): switch to continued message generation when continuing an earlier branch in conversation
* fix(abortMiddleware.js): fix condition to check partialText length
chore(abortMiddleware.js): add error logging when abortMessage fails
* refactor(MessageHeader.tsx): convert to TS
fix(Plugin.tsx): add default value for className prop in Plugin component
* refactor(MultiMessage.tsx): remove commented out code
docs(MultiMessage.tsx): update comment to clarify when siblingIdx is reset
* fix(GenerationButtons): optimistic state for continue button
* fix(MessageContent.tsx): add data-testid attribute to message text editor
fix(messages.spec.ts): update waitForServerStream function to include edit endpoint check
feat(messages.spec.ts): add test case for editing messages
* fix(HoverButtons & Message & useGenerations): Refactor edit functionality and related conditions
- Update enterEdit function signature and prop
- Create and utilize hideEditButton variable
- Enhance conditions for edit button visibility and active state
- Update button event handlers
- Introduce isEditableEndpoint in useGenerations and refine continueSupported condition.
* fix(useGenerations.ts): fix condition for hideEditButton to include error and searchResult
chore(data-provider): bump version to 0.1.6
fix(types.ts): add status property to TError type
* chore: bump @dqbd/tiktoken to 1.0.7
* fix(abortMiddleware.js): add required isCreatedByUser property to the error response object
* refactor(Message.tsx): remove unnecessary props from SiblingSwitch component, as setLatestMessage is firing on every switch already
refactor(SiblingSwitch.tsx): remove unused imports and code
* chore(BaseClient.js): move console.debug statements back inside if block
commit db77163f5d1e98a13dc8d05ee1907001840030c6
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 22 14:15:14 2023 +0200
docs: update chimeragpt (#826)
* Update free_ai_apis.md
* Update free_ai_apis.md
commit 4a4e803df3118effc2fb73b3d71766ac565c1e97
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 21 20:15:18 2023 +0200
style(Dialog): Improved Close Button ("X") position (#824)
commit 909b00c7521277e49e4cf7319cd237c27250bd28
Author: Daniel Avila <messagedaniel@protonmail.com>
Date: Sun Aug 20 21:04:36 2023 -0400
fix(HoverButtons): light/dark styling to match official site
commit 61dcb4d3073a74bc45020d4888d2120173b4eb22
Author: Naosuke Yokoe <ankerasoy@gmail.com>
Date: Sat Aug 19 20:11:31 2023 +0900
feat: Azure Cognitive Search Plugin (#815)
* feat(AzureCognitiveSearchPlugin)
* feat(tools/AzureCognitiveSearch.js): Add a new plugin (not structured
version)
* feat(tools/structured/AzureCognitiveSearch.js): Add a new plugin (structured version)
* feat(tools/manifest.json, tools/index.js, tools/util/handleTools.js):
Add configurations for the plugin
* feat(api/package.json, package-lock.json): Installed a new package for the
plugin (@azure/search-documents)
* feat(.env.example): Add new environment variables for the plugin
Here is the link to the corresponding discussion page:
https://github.com/danny-avila/LibreChat/discussions/567
* docs(AzureCognitiveSearchPlugin)
* docs(features/plugins/azure_cognitive_search.md): Add a new document
for the plugin
* (fix:.env.example)
* reverted extra whitespaces removed by the editor
* docs(mkdocs.yml)
* Add the Azure Cognitive Search Plugin's documentation item to
mkdocs.yml.
commit 3c7f67fa7674549ff877105f4bd5b532f17fef06
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:40:33 2023 -0400
fix(abortMiddleware): handle early abort error where userMessage.conversationId is undefined. In this case, the userId will be used as the abortKey
commit c74c68a135064b9cb79d9666e535a1b862a8de4f
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:10:30 2023 -0400
refactor(MessageHandler -> useServerStream): convert all relating files to TS and correct typings based on this change: properly refactor MessageHandler to a custom hook, where it's passed a submission object to instantiate the stream. This is the bare minimum groundwork for potentially having multiple streams running, which would be a big project to modularize a lot of the global state into maps/multiple streams, particular useful for having multiple views in place
commit 8b4d3c2c2170e91258176a2cdedc977b690395a5
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:04:29 2023 -0400
refactor(routes): convert to TS
commit d612cfcb45f74da51ed4342264e35d42b77b7e8e
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:02:39 2023 -0400
chore(Auth): reorder exports in Auth component
fix(PluginAuthForm): handle case when pluginKey is null or undefined
fix(PluginStoreDialog): handle case when getAvailablePluginFromKey is null or undefined
fix(AuthContext): make authConfig optional in AuthContextProvider
feat(hooks): add useServerStream hook
fix(conversation): setSubmission to null instead of empty object
fix(preset): specify type for presets atom
fix(search): specify type for isSearchEnabled atom
fix(submission): specify type for submission atom
commit c40b95f424ad7110aef13b10725a3e2a900cf42e
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 18 16:11:00 2023 +0200
feat: Disable Registration with social login (#813)
* Google, Github and Discord
* update .env.example with ALLOW_SOCIAL_REGISTRATION
* fix some conflict
* refactor strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit 46ed5aaccd26d657e16c0e318d54c55821ec0016
Author: Patrick <psarnowski@gmail.com>
Date: Fri Aug 18 09:38:24 2023 -0400
Show the response scores from Bing. (#814)
commit 1dacfa49f06e2ca00e3765ede5c7db050fa34353
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 17 20:32:31 2023 +0200
update profile picture (#792)
commit afd43afb60b230a00ce5a5effab900130252f5cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 17 12:50:05 2023 -0400
feat(GPT/Anthropic): Continue Regenerating & Generation Buttons (#808)
* feat(useMessageHandler.js/ts): Refactor and add features to handle user messages, support multiple endpoints/models, generate placeholder responses, regeneration, and stopGeneration function
fix(conversation.ts, buildTree.ts): Import TMessage type, handle null parentMessageId
feat(schemas.ts): Update and add schemas for various AI services, add default values, optional fields, and endpoint-to-schema mapping, create parseConvo function
chore(useMessageHandler.js, schemas.ts): Remove unused imports, variables, and chatGPT enum
* wip: add generation buttons
* refactor(cleanupPreset.ts): simplify cleanupPreset function
refactor(getDefaultConversation.js): remove unused code and simplify getDefaultConversation function
feat(utils): add getDefaultConversation function
This commit adds a new utility function called `getDefaultConversation` to the `client/src/utils/getDefaultConversation.ts` file. This function is responsible for generating a default conversation object based on the provided parameters.
The `getDefaultConversation` function takes in an object with the following properties:
- `conversation`: The conversation object to be used as a base.
- `endpointsConfig`: The configuration object containing information about the available endpoints.
- `preset`: An optional preset object that can be used to override the default behavior.
The function first tries to determine the target endpoint based on the preset object. If a valid endpoint is found, it is used as the target endpoint. If not, the function tries to retrieve the last conversation setup from the local storage and uses its endpoint if it is valid. If neither the preset nor the local storage contains a valid endpoint, the function falls back to a default endpoint.
Once the target endpoint is determined,
* fix(utils): remove console.error statement in buildDefaultConversation function
fix(schemas): add default values for catch blocks in openAISchema, googleSchema, bingAISchema, anthropicSchema, chatGPTBrowserSchema, and gptPluginsSchema
* fix: endpoint not changing on change of preset from other endpoint, wip: refactor
* refactor: preset items to TSX
* refactor: convert resetConvo to TS
* refactor(getDefaultConversation.ts): move defaultEndpoints array to the top of the file for better readability
refactor(getDefaultConversation.ts): extract getDefaultEndpoint function for better code organization and reusability
* feat(svg): add ContinueIcon component
feat(svg): add RegenerateIcon component
feat(svg): add ContinueIcon and RegenerateIcon components to index.ts
* feat(Button.tsx): add onClick and className props to Button component
feat(GenerationButtons.tsx): add logic to display Regenerate or StopGenerating button based on isSubmitting and messages
feat(Regenerate.tsx): create Regenerate component with RegenerateIcon and handleRegenerate function
feat(StopGenerating.tsx): create StopGenerating component with StopGeneratingIcon and handleStopGenerating function
* fix(TextChat.jsx): reorder imports and variables for better readability
fix(TextChat.jsx): fix typo in condition for isNotAppendable variable
fix(TextChat.jsx): remove unused handleStopGenerating function
fix(ContinueIcon.tsx): remove unnecessary closing tags for polygon elements
fix(useMessageHandler.ts): add missing type annotations for handleStopGenerating and handleRegenerate functions
fix(useMessageHandler.ts): remove unused variables in return statement
* fix(getDefaultConversation.ts): refactor code to use getLocalStorageItems function
feat(getLocalStorageItems.ts): add utility function to retrieve items from local storage
* fix(OpenAIClient.js): add support for streaming result in sendCompletion method
feat(OpenAIClient.js): add finish_reason metadata to opts in sendCompletion method
feat(Message.js): add finish_reason field to Message model
feat(messageSchema.js): add finish_reason field to messageSchema
feat(openAI.js): parse chatGptLabel and promptPrefix from req.body and pass rest of the modelOptions to endpointOption
feat(openAI.js): add addMetadata function to store metadata in ask function
feat(openAI.js): add metadata to response if available
feat(schemas.ts): add finish_reason field to tMessageSchema
* feat(types.ts): add TOnClick and TGenButtonProps types for button components
feat(Continue.tsx): create Continue component for generating button
feat(GenerationButtons.tsx): update GenerationButtons component to use Continue component
feat(Regenerate.tsx): create Regenerate component for regenerating button
feat(Stop.tsx): create Stop component for stop generating button
* feat(MessageHandler.jsx): add MessageHandler component to handle messages and conversations
fix(Root.jsx): fix import paths for Nav and MessageHandler components
* feat(useMessageHandler.ts): add support for generation parameter in ask function
feat(useMessageHandler.ts): add support for isEdited parameter in ask function
feat(useMessageHandler.ts): add support for continueGeneration function
fix(createPayload.ts): replace endpoint URL when isEdited parameter is true
* chore(client): set skipLibCheck to true in tsconfig.json
* fix(useMessageHandler.ts): remove unused clientId variable
fix(schemas.ts): make clientId field in tMessageSchema nullable and optional
* wip: edit route for continue generation
* refactor(api): move handlers to root of routes dir
* fix(useMessageHandler.ts): initialize currentMessages to an empty array if messages is null
fix(useMessageHandler.ts): update initialResponse text to use responseText variable
fix(useMessageHandler.ts): update setMessages logic for isRegenerate case
fix(MessageHandler.jsx): update setMessages logic for cancelHandler, createdHandler, and finalHandler
* fix(schemas.ts): make createdAt and updatedAt fields optional and set default values using new Date().toISOString()
fix(schemas.ts): change type annotation of TMessage from infer to input
* refactor(useMessageHandler.ts): rename AskProps type to TAskProps
refactor(useMessageHandler.ts): remove generation property from ask function arguments
refactor(useMessageHandler.ts): use nullish coalescing operator (??) instead of logical OR (||)
refactor(useMessageHandler.ts): pass the responseMessageId to message prop of submission
* fix(BaseClient.js): use nullish coalescing operator (??) instead of logical OR (||) for default values
* fix(BaseClient.js): fix responseMessageId assignment in handleStartMethods method
feat(BaseClient.js): add support for isEdited flag in sendMessage method
feat(BaseClient.js): add generation to responseMessage text in sendMessage method
* fix(openAI.js): remove unused imports and commented out code
feat(openAI.js): add support for generation parameter in request body
fix(openAI.js): remove console.log statement
fix(openAI.js): remove unused variables and parameters
fix(openAI.js): update response text in case of error
fix(openAI.js): handle error and abort message in case of error
fix(handlers.js): add generation parameter to createOnProgress function
fix(useMessageHandler.ts): update responseText variable to use generation parameter
* refactor(api/middleware): move inside server dir
* refactor: add endpoint specific, modular functions to build options and initialize clients, create server/utils, move middleware, separate utils into api general utils and server specific utils
* fix(abortMiddleware.js): import getConvo and getConvoTitle functions from models
feat(abortMiddleware.js): add abortAsk function to abortController to handle aborting of requests
fix(openAI.js): import buildOptions and initializeClient functions from endpoints/openAI
refactor(openAI.js): use getAbortData function to get data for abortAsk function
* refactor: move endpoint specific logic to an endpoints dir
* refactor(PluginService.js): fix import path for encrypt and decrypt functions in PluginService.js
* feat(openAI): add new endpoint for adding a title to a conversation
- Added a new file `addTitle.js` in the `api/server/routes/endpoints/openAI` directory.
- The `addTitle.js` file exports a function `addTitle` that takes in request parameters and performs the following actions:
- If the `parentMessageId` is `'00000000-0000-0000-0000-000000000000'` and `newConvo` is true, it proceeds with the following steps:
- Calls the `titleConvo` function from the `titleConvo` module, passing in the necessary parameters.
- Calls the `saveConvo` function from the `saveConvo` module, passing in the user ID and conversation details.
- Updated the `index.js` file in the `api/server/routes/endpoints/openAI` directory to export the `addTitle` function.
- This change adds
* fix(abortMiddleware.js): remove console.log statement
refactor(gptPlugins.js): update imports and function parameters
feat(gptPlugins.js): add support for abortController and getAbortData
refactor(openAI.js): update imports and function parameters
feat(openAI.js): add support for abortController and getAbortData
fix(openAI.js): refactor code to use modularized functions and middleware
fix(buildOptions.js): refactor code to use destructuring and update variable names
* refactor(askChatGPTBrowser.js, bingAI.js, google.js): remove duplicate code for setting response headers
feat(askChatGPTBrowser.js, bingAI.js, google.js): add setHeaders middleware to set response headers
* feat(middleware): validateEndpoint, refactor buildOption to only be concerned of endpointOption
* fix(abortMiddleware.js): add 'finish_reason' property with value 'incomplete' to responseMessage object
fix(abortMessage.js): remove console.log statement for aborted message
fix(handlers.js): modify tokens assignment to handle empty generation string and trailing space
* fix(BaseClient.js): import addSpaceIfNeeded function from server/utils
fix(BaseClient.js): add space before generation in text property
fix(index.js): remove getCitations and citeText exports
feat(buildEndpointOption.js): add buildEndpointOption middleware
fix(index.js): import buildEndpointOption middleware
fix(anthropic.js): remove buildOptions function and use endpointOption from req.body
fix(gptPlugins.js): remove buildOptions function and use endpointOption from req.body
fix(openAI.js): remove buildOptions function and use endpointOption from req.body
feat(utils): add citations.js and handleText.js modules
fix(utils): fix import statements in index.js module
* refactor(gptPlugins.js): use getResponseSender function from librechat-data-provider
* feat(gptPlugins): complete 'continue generating'
* wip: anthropic continue regen
* feat(middleware): add validateRegistration middleware
A new middleware function called `validateRegistration` has been added to the list of exported middleware functions in `index.js`. This middleware is responsible for validating registration data before allowing the registration process to proceed.
* feat(Anthropic): complete continue regen
* chore: add librechat-data-provider to api/package.json
* fix(ci): backend-review will mock meilisearch, also installs data-provider as now needed
* chore(ci): remove unneeded SEARCH env var
* style(GenerationButtons): make text shorter for sake of space economy, even though this diverges from chat.openai.com
* style(GenerationButtons/ScrollToBottom): adjust visibility/position based on screen size
* chore(client): 'Editting' typo
* feat(GenerationButtons.tsx): add support for endpoint prop in GenerationButtons component
feat(OptionsBar.tsx): pass endpoint prop to GenerationButtons component
feat(useGenerations.ts): create useGenerations hook to handle generation logic
fix(schemas.ts): add searchResult field to tMessageSchema
* refactor(HoverButtons): convert to TSX and utilize new useGenerations hook
* fix(abortMiddleware): handle error with res headers set, or abortController not found, to ensure proper API error is sent to the client, chore(BaseClient): remove console log for onStart message meant for debugging
* refactor(api): remove librechat-data-provider dep for now as it complicates deployed docker build stage, re-use code in CJS, located in server/endpoints/schemas
* chore: remove console.logs from test files
* ci: add backend tests for AnthropicClient, focusing on new buildMessages logic
* refactor(FakeClient): use actual BaseClient sendMessage method for testing
* test(BaseClient.test.js): add test for loading chat history
test(BaseClient.test.js): add test for sendMessage logic with isEdited flag
* fix(buildEndpointOption.js): add support for azureOpenAI in buildFunction object
wip(endpoints.js): fetch Azure models from Azure OpenAI API if opts.azure is true
* fix(Button.tsx): add data-testid attribute to button component
fix(SelectDropDown.tsx): add data-testid attribute to Listbox.Button component
fix(messages.spec.ts): add waitForServerStream function to consolidate logic for awaiting the server response
feat(messages.spec.ts): add test for stopping and continuing message and improve browser/page context order and closing
* refactor(onProgress): speed up time to save initial message for editable routes
* chore: disable AI message editing (for now), was accidentally allowed
* refactor: ensure continue is only supported for latest message style: improve styling in dark mode and across all hover buttons/icons, including making edit icon for AI invisible (for now)
* fix: add test id to generation buttons so they never resolve to 2+ items
* chore(package.json): add 'packages/' to the list of ignored directories
chore(data-provider/package.json): bump version to 0.1.5
commit ae5b7d3d53a39764c301ad24bf1b7bad216ab97b
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 15 18:27:54 2023 -0400
fix(PluginsClient.js): fix ChatOpenAI Azure Config Issue (#812)
* fix(PluginsClient.js): fix issue with creating LLM when using Azure
* chore(PluginsClient.js): omit azure logging
* refactor(PluginsClient.js): simplify assignment of azure variable
The code was simplified by directly assigning the value of `this.azure` to the `azure` variable using object destructuring. This makes the code cleaner and more concise.
commit b85f3bf91ec3951400029f58fa92ad1a762d19b0
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 15 18:42:24 2023 +0200
update from lang to localize (#810)
commit 80aab73bf6313bede6afa2fcae111930ddd673da
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:19:04 2023 -0400
chore: rebuilt package-lock file
commit bbe4931a9738eca84f8f91d5c753e74f93742671
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:13:24 2023 -0400
refactor(ScreenshotContext): use html-to-image for lighter bundle, faster processing
commit 74802dd720a49c3bc0dff32f5622d5610c6cf0c4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 14 17:51:03 2023 +0200
chore: Translation Fixes, Lint Error Corrections, and Additional Translations (#788)
* fix translation and small lint error
* changed from localize to useLocalize hook
* changed to useLocalize
commit b64cc71d8809a6e8c9e26ce8d4d0531ccff54803
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:23:00 2023 -0400
chore(docker-compose.yml): comment out meilisearch ports in docker-compose.yml (#807)
commit 89f260bc7895713f32cf1361b4912f3f893ecbe4
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:12:00 2023 -0400
fix(CodeBlock.tsx): fix copy-to-clipboard functionality. The code has been updated to use the copy function from the copy-to-clipboard library instead of the (#806)
avigator.clipboard.writeText method. This should fix the issue with browser incompatibility with navigator SDK and allow users to copy code from the CodeBlock component successfully.
commit d00c7354cd464ce17b0d47362621232cb6f88481
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 09:45:44 2023 -0400
fix: Corrected Registration Validation, Case-Insensitive Variable Handling, Playwright workflow (#805)
* feat(auth.js): add validation for registration endpoint using validateRegistration middleware
feat(validateRegistration.js): add middleware to validate registration based on ALLOW_REGISTRATION environment variable
* fix(config.js): fix registrationEnabled and socialLoginEnabled variables to handle case-insensitive environment variable values
* refactor(validateRegistration.js): remove console.log statement
* chore(playwright.yml): skip browser download during yarn install
chore(playwright.yml): place Playwright binaries to node_modules/@playwright/test
chore(playwright.yml): install Playwright dependencies using npx playwright install-deps
chore(playwright.yml): install Playwright chromium browser using npx playwright install chromium
chore(playwright.yml): install @playwright/test@latest using npm install -D @playwright/test@latest
chore(playwright.yml): run Playwright tests using npm run e2e:ci
* chore(playwright.yml): change npm install order and update comment
The order of the npm install commands in the "Install Playwright Browsers" step has been changed to first install @playwright/test@latest and then install chromium. Additionally, the comment explaining the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD variable has been updated to mention npm install instead of yarn install.
* chore(playwright.yml): remove commented out code for caching and add separate steps for installing Playwright dependencies and browsers
commit 1aa4b34dc6c914c2992bb50d39c9b7363f144cf4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 11 19:02:52 2023 +0200
added the dot (.) username rules (#787)
commit 28230d9305e696f0200f1d3e4da3160dbf877374
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe0ac5bd72ebc1124a0d1d235f0a5685
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5aa8ae43576aa07cacf18697f6a3cc59
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d30500d9f027aed686d42cc229a618f9210
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675bef408fdb918250b151d6ad572a8067
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823585b1f4244e8c250ad184e4d136323
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d469cfabf272b96699902803bb827cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046362bfef9c2ee5fa1c5bf3f051d62a7
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487f462f16f23d75e839e3e3ca6ddc656
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161cfc8e413c6cf7355d49a11314f53eb
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082c6ada2cbaaf5c9521c53b6033afdf2
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a206771c15e3a2de65d8acca582d302e
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704fa59f99e3a770bf7302a977fe447a27
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546764fcf0852a54a4c72cf5aeb54247e
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e6c68bf22d060a014ec74285b160ef9
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f3814806031bd960ddd329283020469d20
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18640525bec17051e38dc408a1c9283e
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe4115698f426325741763ce612dfc302f3e72
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca97eb1e0f0d264b941dc8ad4f3e1c47
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1f9648458e93ebc7acdeefed59f9602
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a5690203129a15b544b1b935552277430b0090d5
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d46838f3a9868b44f88af6c1fd4aab72f77
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex …
* Update package-lock.json
* Update SubmitButton.tsx
* Update SpeechRecognition.tsx
* fix: typescript error
* style: moved to new UI
* fix:(SpeechRecognition) lint error
* moved everything to hooks
* feat: support stt external
* fix(useExternalSpeechRecognition): recording the audio
* feat: whisper api support
* refactor(SpeechReecognition); fix(HoverButtons): set isSpeakling correctly
* fix: spelling errors
* fix: renamed files
* BIG FIX
* feat: whisper support
* fixed some ChatForm bugs and added the tts route
* handling more errors
* Fix audio stream initialization and cleanup in useSpeechToTextExternal
* feat: Elevenlabs TTS
* fixed some req issues
* fix: stt not activating on Mac
* fix: send audio blob to frontend
* fix(ChatForm): startupConfig var
* Update text-to-speech and speech-to-text services
* handle more errors correctly
* Remove console.log statements
* feat: added manual trigger with button
* fix: SpeechToText and SpeechToTextExernal + AudioRecorder
* refactor: TTS component
* chore: removed unused variable
* feat: azure stt
* feat: dedicated speech panel
* feat: STT button switch: fix: TextArea pr value adapted
* refactor: textToSpeech function and useTextToSpeechMutation
* fix: typo data-service
* fix: blob backend to frontend
* feat: TTS button for external
* feat: librechat.yaml
* style: spinner when loading TTS
* feat: hold click to download file
* style: disabled when apiKey not provided
* fix: typo startupConfig?.speechToTextExternal
* style: update icons
* fix(useTextToSpeech): set isSpeaking when audio finish
* fix: small issues with local TTS
* style: update settings dark theme
* docs: STT & TTS
* WIP: chat audio automatic; docs(custom_config): update to new .yaml version; chore: updated librechat.yaml version
* fix: send button disabled
* fix: interval update
* localization
* removed unused test code
* revert interval update to 100
* feat: auto-send message
* fix: chat audio automatic, default false
* refactor: moved all logic to hooks
* chore: renamed ChatAudio to conversationMode
* refactor: organized Speech panel
* feat: autoSendText switch
* feat: moved chataudio to conversationMode and improved error handling; docs: update localai model
* refactor: Auto transcribe audio
* test: AutoSendTextSwitch, AutoTranscribeAudioSwitch and ConversationModeSwitch.spec: refactor: removed hark
* fix: various speechTab fixes
* refactor(useSpeechToTextBrowser):: handle more errors
* feat: engine select
* feat: advanced mode
* chore: converted hooks to TS
* feat: cache TTS
* feat: delete cache; fix: cache issues
* refactor(useTextToSpeechExternal): removed unused import
* feat: cache switch; refactor: moved to dir STT/TTS
* tests: CacheTTS, TextToSpeech, SpeechToText
* feat: custom elevenlabs compatibility
* fix(useTextToSpeechExternal): cache switch not working
* feat: animation for STT
* fix: settings var not working
* chore: remove unused var
* feat: voice dropdown; refactor: yaml changes
* fix(textToSpeech): remove undefined properties
* refactor: Remove console logs and unused variable
* fix: TTS; feat: support coqui and piper
* fix: some STT issues
* fix: stt test
* fix: STT backend sending wrong data
* BREAKING: switch to react-speech-recognition, add regenerator-runtime/runtime in main.jsx
* feat: websocket backend
* foundations for websocket
* first pass elevenlabs streaming
* streaming audio
* stream changes
* input streaming implementation
* fix: client build errors
* WIP: streaming rewrite
* audio stream working but not the loop
* WIP: looping audio stream working
* WIP tts routes rewrite
* feat: track SSE runs by runId, which enables us to better track audio streams per message request
* chore: set activeRunId on data.created
* rate limit tts and only allow once
* WIP: streaming audio
* refactor(useSSE): simplify messageId/parentMessageId assignment in message stream
* delete unused component
* streaming working
* first pass but need to investigate forever pending bug
* optimize audio stream handling client and initial request
* fix(StreamAudio): null exception
* refactor(tts): add limiters for db polling and timeout promise by intervals and not elapsed time
* refactor(textToSpeech): reduce polling delay
* feat(StreamAudio): add caching
* refactor: rename global variable, add setIsPlaying, remove mediasource ref
* feat: use custom hook for audioRef to help determine audio end state
* fix: voices mutation -> query
* fix: voices mutation -> query 2/2
* feat: successful TTS for manual playback
* fix: tts voice init
* feat: playback rate
* feat: global audio toggles
* chore: Add renderIcon function for chat message hover buttons, update schemas with notes
* chore: add debug logging instead of console.logs
* fix: edge case undefined user id
* feat: Automatic Playback switch
* feat: add caching bump data-provider
* chore: tts add auth
* use global state for audio run
* feat: assistants support for TTS read aloud
* ci: uncomment tests for now until they are refactored
* stream audio tests are WIP
* refactor: make automatic playback false as default
---------
Co-authored-by: bsu3338 <bsu3338@users.noreply.github.com>
Co-authored-by: bsu3338 <bsu3338@yahoo.com>
Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Co-authored-by: Berry-13 <marco13beretta@gmail.com>
Co-authored-by: Super User <root@Berry>
Co-authored-by: Marco Beretta <marco13beretta@proton.me>
2024-05-22 17:19:55 -04:00
|
|
|
|
2024-07-05 17:13:34 +03:00
|
|
|
export const speech = () => `${files()}/speech`;
|
🔉 feat: Speech-to-text / Text-to-speech (initial support) (#2836)
* Update TextChat.jsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update SubmitButton.jsx
* Create ListeningIcon.tsx
* Update index.ts
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update ListeningIcon.tsx
* Update ListeningIcon.tsx
* Create SpeechRecognition.tsx
* Update TextChat.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Create SpeechSynthesis.tsx
* Update index.jsx
* Update SpeechSynthesis.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Squashed commit of the following:
commit 28230d9305e696f0200f1d3e4da3160dbf877374
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe0ac5bd72ebc1124a0d1d235f0a5685
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5aa8ae43576aa07cacf18697f6a3cc59
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d30500d9f027aed686d42cc229a618f9210
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675bef408fdb918250b151d6ad572a8067
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823585b1f4244e8c250ad184e4d136323
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d469cfabf272b96699902803bb827cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046362bfef9c2ee5fa1c5bf3f051d62a7
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487f462f16f23d75e839e3e3ca6ddc656
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161cfc8e413c6cf7355d49a11314f53eb
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082c6ada2cbaaf5c9521c53b6033afdf2
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a206771c15e3a2de65d8acca582d302e
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704fa59f99e3a770bf7302a977fe447a27
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546764fcf0852a54a4c72cf5aeb54247e
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e6c68bf22d060a014ec74285b160ef9
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f3814806031bd960ddd329283020469d20
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18640525bec17051e38dc408a1c9283e
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe4115698f426325741763ce612dfc302f3e72
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca97eb1e0f0d264b941dc8ad4f3e1c47
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1f9648458e93ebc7acdeefed59f9602
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a5690203129a15b544b1b935552277430b0090d5
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d46838f3a9868b44f88af6c1fd4aab72f77
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex pattern for username validation to allow special characters @#$%&*()
fix(validators.js): update regex pattern for username validation to allow special characters @#$%&*()
* fix(Registration.spec.tsx): fix validation error message for username length requirement
commit d38e463d34c720db1295a4a2aa95e58d7986556c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 13:44:40 2023 -0400
fix(bingAI): markdown and error formatting for final stream response (#829)
* fix(bingAI): markdown formatting for final stream response due to new strict payload validation on the frontend
* fix: add missing prop to bing Error response
commit 7dc27b10f19bcd32bffcbf2858756facfd752c8c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 22 18:44:59 2023 -0400
feat: Edit AI Messages, Edit Messages in Place (#825)
* refactor: replace lodash import with specific function import
fix(api): esm imports to cjs
* refactor(Messages.tsx): convert to TS, out-source scrollToDiv logic to a custom hook
fix(ScreenshotContext.tsx): change Ref to RefObject in ScreenshotContextType
feat(useScrollToRef.ts): add useScrollToRef hook for scrolling to a ref with throttle
fix(Chat.tsx): update import path for Messages component
fix(Search.tsx): update import path for Messages component
* chore(types.ts): add TAskProps and TOptions types
refactor(useMessageHandler.ts): use TAskFunction type for ask function signature
* refactor(Message/Content): convert to TS, move Plugin component to Content dir
* feat(MessageContent.tsx): add MessageContent component for displaying and editing message content
feat(index.ts): export MessageContent component from Messages/Content directory
* wip(Message.jsx): conversion and use of new component in progress
* refactor: convert Message.jsx to TS and fix typing/imports based on changes
* refactor: add typed props and refactor MultiMessage to TS, fix typing issues resulting from the conversion
* edit message in progress
* feat: complete edit AI message logic, refactor continue logic
* feat(middleware): add validateMessageReq middleware
feat(routes): add validation for message requests using validateMessageReq middleware
feat(routes): add create, read, update, and delete routes for messages
* feat: complete frontend logic for editing messages in place
feat(messages.js): update route for updating a specific message
- Change the route for updating a message to include the messageId in the URL
- Update the request handler to use the messageId from the request parameters and the text from the request body
- Call the updateMessage function with the updated parameters
feat(MessageContent.tsx): add functionality to update a message
- Import the useUpdateMessageMutation hook from the data provider
- Destructure the conversationId, parentMessageId, and messageId from the message object
- Create a mutation function using the useUpdateMessageMutation hook
- Implement the updateMessage function to call the mutation function with the updated message parameters
- Update the messages state to reflect the updated message text
feat(api-endpoints.ts): update messages endpoint to include messageId
- Update the messages endpoint to include the messageId as an optional parameter
feat(data-service.ts): add updateMessage function
- Implement the updateMessage function to make a PUT request to
* fix(messages.js): make updateMessage function asynchronous and await its execution
* style(EditIcon): make icon active for AI message
* feat(gptPlugins/anthropic): add edit support
* fix(validateMessageReq.js): handle case when conversationId is 'new' and return empty array
feat(Message.tsx): pass message prop to SiblingSwitch component
refactor(SiblingSwitch.tsx): convert to TS
* fix(useMessageHandler.ts): remove message from currentMessages if isContinued is true
feat(useMessageHandler.ts): add support for submission messages in setMessages
fix(useServerStream.ts): remove unnecessary conditional in setMessages
fix(useServerStream.ts): remove isContinued variable from submission
* fix(continue): switch to continued message generation when continuing an earlier branch in conversation
* fix(abortMiddleware.js): fix condition to check partialText length
chore(abortMiddleware.js): add error logging when abortMessage fails
* refactor(MessageHeader.tsx): convert to TS
fix(Plugin.tsx): add default value for className prop in Plugin component
* refactor(MultiMessage.tsx): remove commented out code
docs(MultiMessage.tsx): update comment to clarify when siblingIdx is reset
* fix(GenerationButtons): optimistic state for continue button
* fix(MessageContent.tsx): add data-testid attribute to message text editor
fix(messages.spec.ts): update waitForServerStream function to include edit endpoint check
feat(messages.spec.ts): add test case for editing messages
* fix(HoverButtons & Message & useGenerations): Refactor edit functionality and related conditions
- Update enterEdit function signature and prop
- Create and utilize hideEditButton variable
- Enhance conditions for edit button visibility and active state
- Update button event handlers
- Introduce isEditableEndpoint in useGenerations and refine continueSupported condition.
* fix(useGenerations.ts): fix condition for hideEditButton to include error and searchResult
chore(data-provider): bump version to 0.1.6
fix(types.ts): add status property to TError type
* chore: bump @dqbd/tiktoken to 1.0.7
* fix(abortMiddleware.js): add required isCreatedByUser property to the error response object
* refactor(Message.tsx): remove unnecessary props from SiblingSwitch component, as setLatestMessage is firing on every switch already
refactor(SiblingSwitch.tsx): remove unused imports and code
* chore(BaseClient.js): move console.debug statements back inside if block
commit db77163f5d1e98a13dc8d05ee1907001840030c6
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 22 14:15:14 2023 +0200
docs: update chimeragpt (#826)
* Update free_ai_apis.md
* Update free_ai_apis.md
commit 4a4e803df3118effc2fb73b3d71766ac565c1e97
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 21 20:15:18 2023 +0200
style(Dialog): Improved Close Button ("X") position (#824)
commit 909b00c7521277e49e4cf7319cd237c27250bd28
Author: Daniel Avila <messagedaniel@protonmail.com>
Date: Sun Aug 20 21:04:36 2023 -0400
fix(HoverButtons): light/dark styling to match official site
commit 61dcb4d3073a74bc45020d4888d2120173b4eb22
Author: Naosuke Yokoe <ankerasoy@gmail.com>
Date: Sat Aug 19 20:11:31 2023 +0900
feat: Azure Cognitive Search Plugin (#815)
* feat(AzureCognitiveSearchPlugin)
* feat(tools/AzureCognitiveSearch.js): Add a new plugin (not structured
version)
* feat(tools/structured/AzureCognitiveSearch.js): Add a new plugin (structured version)
* feat(tools/manifest.json, tools/index.js, tools/util/handleTools.js):
Add configurations for the plugin
* feat(api/package.json, package-lock.json): Installed a new package for the
plugin (@azure/search-documents)
* feat(.env.example): Add new environment variables for the plugin
Here is the link to the corresponding discussion page:
https://github.com/danny-avila/LibreChat/discussions/567
* docs(AzureCognitiveSearchPlugin)
* docs(features/plugins/azure_cognitive_search.md): Add a new document
for the plugin
* (fix:.env.example)
* reverted extra whitespaces removed by the editor
* docs(mkdocs.yml)
* Add the Azure Cognitive Search Plugin's documentation item to
mkdocs.yml.
commit 3c7f67fa7674549ff877105f4bd5b532f17fef06
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:40:33 2023 -0400
fix(abortMiddleware): handle early abort error where userMessage.conversationId is undefined. In this case, the userId will be used as the abortKey
commit c74c68a135064b9cb79d9666e535a1b862a8de4f
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:10:30 2023 -0400
refactor(MessageHandler -> useServerStream): convert all relating files to TS and correct typings based on this change: properly refactor MessageHandler to a custom hook, where it's passed a submission object to instantiate the stream. This is the bare minimum groundwork for potentially having multiple streams running, which would be a big project to modularize a lot of the global state into maps/multiple streams, particular useful for having multiple views in place
commit 8b4d3c2c2170e91258176a2cdedc977b690395a5
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:04:29 2023 -0400
refactor(routes): convert to TS
commit d612cfcb45f74da51ed4342264e35d42b77b7e8e
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:02:39 2023 -0400
chore(Auth): reorder exports in Auth component
fix(PluginAuthForm): handle case when pluginKey is null or undefined
fix(PluginStoreDialog): handle case when getAvailablePluginFromKey is null or undefined
fix(AuthContext): make authConfig optional in AuthContextProvider
feat(hooks): add useServerStream hook
fix(conversation): setSubmission to null instead of empty object
fix(preset): specify type for presets atom
fix(search): specify type for isSearchEnabled atom
fix(submission): specify type for submission atom
commit c40b95f424ad7110aef13b10725a3e2a900cf42e
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 18 16:11:00 2023 +0200
feat: Disable Registration with social login (#813)
* Google, Github and Discord
* update .env.example with ALLOW_SOCIAL_REGISTRATION
* fix some conflict
* refactor strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit 46ed5aaccd26d657e16c0e318d54c55821ec0016
Author: Patrick <psarnowski@gmail.com>
Date: Fri Aug 18 09:38:24 2023 -0400
Show the response scores from Bing. (#814)
commit 1dacfa49f06e2ca00e3765ede5c7db050fa34353
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 17 20:32:31 2023 +0200
update profile picture (#792)
commit afd43afb60b230a00ce5a5effab900130252f5cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 17 12:50:05 2023 -0400
feat(GPT/Anthropic): Continue Regenerating & Generation Buttons (#808)
* feat(useMessageHandler.js/ts): Refactor and add features to handle user messages, support multiple endpoints/models, generate placeholder responses, regeneration, and stopGeneration function
fix(conversation.ts, buildTree.ts): Import TMessage type, handle null parentMessageId
feat(schemas.ts): Update and add schemas for various AI services, add default values, optional fields, and endpoint-to-schema mapping, create parseConvo function
chore(useMessageHandler.js, schemas.ts): Remove unused imports, variables, and chatGPT enum
* wip: add generation buttons
* refactor(cleanupPreset.ts): simplify cleanupPreset function
refactor(getDefaultConversation.js): remove unused code and simplify getDefaultConversation function
feat(utils): add getDefaultConversation function
This commit adds a new utility function called `getDefaultConversation` to the `client/src/utils/getDefaultConversation.ts` file. This function is responsible for generating a default conversation object based on the provided parameters.
The `getDefaultConversation` function takes in an object with the following properties:
- `conversation`: The conversation object to be used as a base.
- `endpointsConfig`: The configuration object containing information about the available endpoints.
- `preset`: An optional preset object that can be used to override the default behavior.
The function first tries to determine the target endpoint based on the preset object. If a valid endpoint is found, it is used as the target endpoint. If not, the function tries to retrieve the last conversation setup from the local storage and uses its endpoint if it is valid. If neither the preset nor the local storage contains a valid endpoint, the function falls back to a default endpoint.
Once the target endpoint is determined,
* fix(utils): remove console.error statement in buildDefaultConversation function
fix(schemas): add default values for catch blocks in openAISchema, googleSchema, bingAISchema, anthropicSchema, chatGPTBrowserSchema, and gptPluginsSchema
* fix: endpoint not changing on change of preset from other endpoint, wip: refactor
* refactor: preset items to TSX
* refactor: convert resetConvo to TS
* refactor(getDefaultConversation.ts): move defaultEndpoints array to the top of the file for better readability
refactor(getDefaultConversation.ts): extract getDefaultEndpoint function for better code organization and reusability
* feat(svg): add ContinueIcon component
feat(svg): add RegenerateIcon component
feat(svg): add ContinueIcon and RegenerateIcon components to index.ts
* feat(Button.tsx): add onClick and className props to Button component
feat(GenerationButtons.tsx): add logic to display Regenerate or StopGenerating button based on isSubmitting and messages
feat(Regenerate.tsx): create Regenerate component with RegenerateIcon and handleRegenerate function
feat(StopGenerating.tsx): create StopGenerating component with StopGeneratingIcon and handleStopGenerating function
* fix(TextChat.jsx): reorder imports and variables for better readability
fix(TextChat.jsx): fix typo in condition for isNotAppendable variable
fix(TextChat.jsx): remove unused handleStopGenerating function
fix(ContinueIcon.tsx): remove unnecessary closing tags for polygon elements
fix(useMessageHandler.ts): add missing type annotations for handleStopGenerating and handleRegenerate functions
fix(useMessageHandler.ts): remove unused variables in return statement
* fix(getDefaultConversation.ts): refactor code to use getLocalStorageItems function
feat(getLocalStorageItems.ts): add utility function to retrieve items from local storage
* fix(OpenAIClient.js): add support for streaming result in sendCompletion method
feat(OpenAIClient.js): add finish_reason metadata to opts in sendCompletion method
feat(Message.js): add finish_reason field to Message model
feat(messageSchema.js): add finish_reason field to messageSchema
feat(openAI.js): parse chatGptLabel and promptPrefix from req.body and pass rest of the modelOptions to endpointOption
feat(openAI.js): add addMetadata function to store metadata in ask function
feat(openAI.js): add metadata to response if available
feat(schemas.ts): add finish_reason field to tMessageSchema
* feat(types.ts): add TOnClick and TGenButtonProps types for button components
feat(Continue.tsx): create Continue component for generating button
feat(GenerationButtons.tsx): update GenerationButtons component to use Continue component
feat(Regenerate.tsx): create Regenerate component for regenerating button
feat(Stop.tsx): create Stop component for stop generating button
* feat(MessageHandler.jsx): add MessageHandler component to handle messages and conversations
fix(Root.jsx): fix import paths for Nav and MessageHandler components
* feat(useMessageHandler.ts): add support for generation parameter in ask function
feat(useMessageHandler.ts): add support for isEdited parameter in ask function
feat(useMessageHandler.ts): add support for continueGeneration function
fix(createPayload.ts): replace endpoint URL when isEdited parameter is true
* chore(client): set skipLibCheck to true in tsconfig.json
* fix(useMessageHandler.ts): remove unused clientId variable
fix(schemas.ts): make clientId field in tMessageSchema nullable and optional
* wip: edit route for continue generation
* refactor(api): move handlers to root of routes dir
* fix(useMessageHandler.ts): initialize currentMessages to an empty array if messages is null
fix(useMessageHandler.ts): update initialResponse text to use responseText variable
fix(useMessageHandler.ts): update setMessages logic for isRegenerate case
fix(MessageHandler.jsx): update setMessages logic for cancelHandler, createdHandler, and finalHandler
* fix(schemas.ts): make createdAt and updatedAt fields optional and set default values using new Date().toISOString()
fix(schemas.ts): change type annotation of TMessage from infer to input
* refactor(useMessageHandler.ts): rename AskProps type to TAskProps
refactor(useMessageHandler.ts): remove generation property from ask function arguments
refactor(useMessageHandler.ts): use nullish coalescing operator (??) instead of logical OR (||)
refactor(useMessageHandler.ts): pass the responseMessageId to message prop of submission
* fix(BaseClient.js): use nullish coalescing operator (??) instead of logical OR (||) for default values
* fix(BaseClient.js): fix responseMessageId assignment in handleStartMethods method
feat(BaseClient.js): add support for isEdited flag in sendMessage method
feat(BaseClient.js): add generation to responseMessage text in sendMessage method
* fix(openAI.js): remove unused imports and commented out code
feat(openAI.js): add support for generation parameter in request body
fix(openAI.js): remove console.log statement
fix(openAI.js): remove unused variables and parameters
fix(openAI.js): update response text in case of error
fix(openAI.js): handle error and abort message in case of error
fix(handlers.js): add generation parameter to createOnProgress function
fix(useMessageHandler.ts): update responseText variable to use generation parameter
* refactor(api/middleware): move inside server dir
* refactor: add endpoint specific, modular functions to build options and initialize clients, create server/utils, move middleware, separate utils into api general utils and server specific utils
* fix(abortMiddleware.js): import getConvo and getConvoTitle functions from models
feat(abortMiddleware.js): add abortAsk function to abortController to handle aborting of requests
fix(openAI.js): import buildOptions and initializeClient functions from endpoints/openAI
refactor(openAI.js): use getAbortData function to get data for abortAsk function
* refactor: move endpoint specific logic to an endpoints dir
* refactor(PluginService.js): fix import path for encrypt and decrypt functions in PluginService.js
* feat(openAI): add new endpoint for adding a title to a conversation
- Added a new file `addTitle.js` in the `api/server/routes/endpoints/openAI` directory.
- The `addTitle.js` file exports a function `addTitle` that takes in request parameters and performs the following actions:
- If the `parentMessageId` is `'00000000-0000-0000-0000-000000000000'` and `newConvo` is true, it proceeds with the following steps:
- Calls the `titleConvo` function from the `titleConvo` module, passing in the necessary parameters.
- Calls the `saveConvo` function from the `saveConvo` module, passing in the user ID and conversation details.
- Updated the `index.js` file in the `api/server/routes/endpoints/openAI` directory to export the `addTitle` function.
- This change adds
* fix(abortMiddleware.js): remove console.log statement
refactor(gptPlugins.js): update imports and function parameters
feat(gptPlugins.js): add support for abortController and getAbortData
refactor(openAI.js): update imports and function parameters
feat(openAI.js): add support for abortController and getAbortData
fix(openAI.js): refactor code to use modularized functions and middleware
fix(buildOptions.js): refactor code to use destructuring and update variable names
* refactor(askChatGPTBrowser.js, bingAI.js, google.js): remove duplicate code for setting response headers
feat(askChatGPTBrowser.js, bingAI.js, google.js): add setHeaders middleware to set response headers
* feat(middleware): validateEndpoint, refactor buildOption to only be concerned of endpointOption
* fix(abortMiddleware.js): add 'finish_reason' property with value 'incomplete' to responseMessage object
fix(abortMessage.js): remove console.log statement for aborted message
fix(handlers.js): modify tokens assignment to handle empty generation string and trailing space
* fix(BaseClient.js): import addSpaceIfNeeded function from server/utils
fix(BaseClient.js): add space before generation in text property
fix(index.js): remove getCitations and citeText exports
feat(buildEndpointOption.js): add buildEndpointOption middleware
fix(index.js): import buildEndpointOption middleware
fix(anthropic.js): remove buildOptions function and use endpointOption from req.body
fix(gptPlugins.js): remove buildOptions function and use endpointOption from req.body
fix(openAI.js): remove buildOptions function and use endpointOption from req.body
feat(utils): add citations.js and handleText.js modules
fix(utils): fix import statements in index.js module
* refactor(gptPlugins.js): use getResponseSender function from librechat-data-provider
* feat(gptPlugins): complete 'continue generating'
* wip: anthropic continue regen
* feat(middleware): add validateRegistration middleware
A new middleware function called `validateRegistration` has been added to the list of exported middleware functions in `index.js`. This middleware is responsible for validating registration data before allowing the registration process to proceed.
* feat(Anthropic): complete continue regen
* chore: add librechat-data-provider to api/package.json
* fix(ci): backend-review will mock meilisearch, also installs data-provider as now needed
* chore(ci): remove unneeded SEARCH env var
* style(GenerationButtons): make text shorter for sake of space economy, even though this diverges from chat.openai.com
* style(GenerationButtons/ScrollToBottom): adjust visibility/position based on screen size
* chore(client): 'Editting' typo
* feat(GenerationButtons.tsx): add support for endpoint prop in GenerationButtons component
feat(OptionsBar.tsx): pass endpoint prop to GenerationButtons component
feat(useGenerations.ts): create useGenerations hook to handle generation logic
fix(schemas.ts): add searchResult field to tMessageSchema
* refactor(HoverButtons): convert to TSX and utilize new useGenerations hook
* fix(abortMiddleware): handle error with res headers set, or abortController not found, to ensure proper API error is sent to the client, chore(BaseClient): remove console log for onStart message meant for debugging
* refactor(api): remove librechat-data-provider dep for now as it complicates deployed docker build stage, re-use code in CJS, located in server/endpoints/schemas
* chore: remove console.logs from test files
* ci: add backend tests for AnthropicClient, focusing on new buildMessages logic
* refactor(FakeClient): use actual BaseClient sendMessage method for testing
* test(BaseClient.test.js): add test for loading chat history
test(BaseClient.test.js): add test for sendMessage logic with isEdited flag
* fix(buildEndpointOption.js): add support for azureOpenAI in buildFunction object
wip(endpoints.js): fetch Azure models from Azure OpenAI API if opts.azure is true
* fix(Button.tsx): add data-testid attribute to button component
fix(SelectDropDown.tsx): add data-testid attribute to Listbox.Button component
fix(messages.spec.ts): add waitForServerStream function to consolidate logic for awaiting the server response
feat(messages.spec.ts): add test for stopping and continuing message and improve browser/page context order and closing
* refactor(onProgress): speed up time to save initial message for editable routes
* chore: disable AI message editing (for now), was accidentally allowed
* refactor: ensure continue is only supported for latest message style: improve styling in dark mode and across all hover buttons/icons, including making edit icon for AI invisible (for now)
* fix: add test id to generation buttons so they never resolve to 2+ items
* chore(package.json): add 'packages/' to the list of ignored directories
chore(data-provider/package.json): bump version to 0.1.5
commit ae5b7d3d53a39764c301ad24bf1b7bad216ab97b
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 15 18:27:54 2023 -0400
fix(PluginsClient.js): fix ChatOpenAI Azure Config Issue (#812)
* fix(PluginsClient.js): fix issue with creating LLM when using Azure
* chore(PluginsClient.js): omit azure logging
* refactor(PluginsClient.js): simplify assignment of azure variable
The code was simplified by directly assigning the value of `this.azure` to the `azure` variable using object destructuring. This makes the code cleaner and more concise.
commit b85f3bf91ec3951400029f58fa92ad1a762d19b0
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 15 18:42:24 2023 +0200
update from lang to localize (#810)
commit 80aab73bf6313bede6afa2fcae111930ddd673da
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:19:04 2023 -0400
chore: rebuilt package-lock file
commit bbe4931a9738eca84f8f91d5c753e74f93742671
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:13:24 2023 -0400
refactor(ScreenshotContext): use html-to-image for lighter bundle, faster processing
commit 74802dd720a49c3bc0dff32f5622d5610c6cf0c4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 14 17:51:03 2023 +0200
chore: Translation Fixes, Lint Error Corrections, and Additional Translations (#788)
* fix translation and small lint error
* changed from localize to useLocalize hook
* changed to useLocalize
commit b64cc71d8809a6e8c9e26ce8d4d0531ccff54803
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:23:00 2023 -0400
chore(docker-compose.yml): comment out meilisearch ports in docker-compose.yml (#807)
commit 89f260bc7895713f32cf1361b4912f3f893ecbe4
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:12:00 2023 -0400
fix(CodeBlock.tsx): fix copy-to-clipboard functionality. The code has been updated to use the copy function from the copy-to-clipboard library instead of the (#806)
avigator.clipboard.writeText method. This should fix the issue with browser incompatibility with navigator SDK and allow users to copy code from the CodeBlock component successfully.
commit d00c7354cd464ce17b0d47362621232cb6f88481
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 09:45:44 2023 -0400
fix: Corrected Registration Validation, Case-Insensitive Variable Handling, Playwright workflow (#805)
* feat(auth.js): add validation for registration endpoint using validateRegistration middleware
feat(validateRegistration.js): add middleware to validate registration based on ALLOW_REGISTRATION environment variable
* fix(config.js): fix registrationEnabled and socialLoginEnabled variables to handle case-insensitive environment variable values
* refactor(validateRegistration.js): remove console.log statement
* chore(playwright.yml): skip browser download during yarn install
chore(playwright.yml): place Playwright binaries to node_modules/@playwright/test
chore(playwright.yml): install Playwright dependencies using npx playwright install-deps
chore(playwright.yml): install Playwright chromium browser using npx playwright install chromium
chore(playwright.yml): install @playwright/test@latest using npm install -D @playwright/test@latest
chore(playwright.yml): run Playwright tests using npm run e2e:ci
* chore(playwright.yml): change npm install order and update comment
The order of the npm install commands in the "Install Playwright Browsers" step has been changed to first install @playwright/test@latest and then install chromium. Additionally, the comment explaining the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD variable has been updated to mention npm install instead of yarn install.
* chore(playwright.yml): remove commented out code for caching and add separate steps for installing Playwright dependencies and browsers
commit 1aa4b34dc6c914c2992bb50d39c9b7363f144cf4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 11 19:02:52 2023 +0200
added the dot (.) username rules (#787)
* Create VolumeMuteIcon.tsx
* Create VolumeIcon.tsx
* Update index.ts
* Update SubmitButton.jsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update HoverButtons.tsx
* Update useServerStream.ts
* Update useServerStream.ts
* Update HoverButtons.tsx
* Update useServerStream.ts
* Update useServerStream.ts
* Update HoverButtons.tsx
* Update VolumeIcon.tsx
* Update VolumeMuteIcon.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update HoverButtons.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update SpeechSynthesis.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update package.json
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Squashed commit of the following:
commit 101952963435e2ff32b8298cc5d6f0121fab69f5
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:12:14 2023 -0500
Update SpeechRecognition.tsx
commit 67f111ccd0d72c1fc82398866086a75a11ed7919
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:08:48 2023 -0500
Update SpeechRecognition.tsx
commit 0b35dbe1960bb45445f0813ffd7dc4b38e44d772
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:04:50 2023 -0500
Update SpeechRecognition.tsx
commit 6686126dc0d30322fa2536a83f0b0f903f28b822
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:49:08 2023 -0500
Update SpeechRecognition.tsx
commit 5b80ddfba74ad417dcaabf89ed12e7ec8ddb50c8
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:45:02 2023 -0500
Update package.json
commit 39e84efa81d778b2241dac6210899c5bb7a4da7e
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:35:48 2023 -0500
Update SpeechSynthesis.tsx
commit 4c6d067cb9866e187c147d5517ef5f98c8f54879
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:24:29 2023 -0500
Update HoverButtons.tsx
commit c5ce576fb85973f20bffeb8d7eab3f3e3f626b9f
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:13:20 2023 -0500
Update SpeechSynthesis.tsx
commit d95fa195397d9ee261c3b8cf238aa983e338edd7
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:11:38 2023 -0500
Update SpeechSynthesis.tsx
commit c794f076787e1e7c957c6052b4e542473df8db48
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:03:34 2023 -0500
Update HoverButtons.tsx
commit 7ae0e7e97cdf0969f5e6d13c73a1533e5dc93a8f
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:59:45 2023 -0500
Update HoverButtons.tsx
commit e9882dedad397895384f9735c3be00c2eb77f9c6
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:58:07 2023 -0500
Update SpeechSynthesis.tsx
commit 95cf3007826144d64e48e2c61769c1e0e3a81cda
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:44:49 2023 -0500
Update HoverButtons.tsx
commit 37c828d7fb7ac031df9ca1733736cbfbf8a13131
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:30:34 2023 -0500
Update VolumeMuteIcon.tsx
commit 61335317377da07a095a6a821dcdffe31552c976
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:29:54 2023 -0500
Update VolumeIcon.tsx
commit 4b4afcdd3767d438c9932f926566f4bc55d864a5
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:20:14 2023 -0500
Update HoverButtons.tsx
commit 609d1dfefb06e3cdfca8f400265c4d47e2d8d5cc
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:49:52 2023 -0500
Update useServerStream.ts
commit 875ce4b77e9e3121c7f98ee4a0bfbee35f726923
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:48:26 2023 -0500
Update useServerStream.ts
commit 8ed04e496bc9a9d462a6a043db083665dc238472
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:37:59 2023 -0500
Update HoverButtons.tsx
commit 4b30c132dfb5d297b737448a49bf79a1512c2d26
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:14:01 2023 -0500
Update useServerStream.ts
commit c041c329cf0e71b8d32fada053363de4a6c0b91c
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:07:14 2023 -0500
Update useServerStream.ts
commit 3e36c168171e53f3329936899dbe125f5149c4cd
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:36:21 2023 -0500
Update HoverButtons.tsx
commit c7eea967597e2f552cf44f38dd2c92d5cc9ec068
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:28:03 2023 -0500
Update TextChat.jsx
commit 5542f8e85dfa16faaf8be9535cb36a4614d17aa1
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:21:50 2023 -0500
Update SpeechRecognition.tsx
commit 9a27e56f8b40766136c491ae0ed4abfdd17e4c11
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:16:01 2023 -0500
Update TextChat.jsx
commit 7f101bd1229961fed81eaf8ef2e7ed08050da208
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:09:51 2023 -0500
Update SpeechRecognition.tsx
commit d405454bf5d3f00e1421c37086d60a6353cadbfb
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:03:34 2023 -0500
Update SpeechRecognition.tsx
commit 6033eb3ed123a485278a3c86d042c6892595d23d
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:01:06 2023 -0500
Update TextChat.jsx
commit 9a3e67fcd2ac9695e35258ea4e5922c8d514486d
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 18:53:19 2023 -0500
Update TextChat.jsx
commit 6583877cb32c96f6746eaa213f8db0924faad89e
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:53:18 2023 -0500
Update SubmitButton.jsx
commit 8d5114bfae355d6e78dcca1cf0c22bacd21c93d6
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:39:20 2023 -0500
Update SubmitButton.jsx
commit 29a5b558838704b5cf9d564a1e0b64538ab84ae6
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:28:03 2023 -0500
Update index.ts
commit b03001d01df0fb6caa756534a48466a96932c6f4
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:25:43 2023 -0500
Create VolumeIcon.tsx
commit 863af2c9594f0b25425b2382e727e62d25caff79
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:21:43 2023 -0500
Create VolumeMuteIcon.tsx
commit ad3c78f86703e0e4930151ac3ba45bb3450dd763
Merge: ed4b25b2 28230d93
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 16:49:56 2023 -0500
Merge branch 'danny-avila:main' into Speech-September
commit ed4b25b2c17ce76fba17a92d7e03a296b371d148
Author: bsu3338 <bsu3338@yahoo.com>
Date: Sun Sep 3 16:49:03 2023 -0500
Squashed commit of the following:
commit 28230d9305e696f0200f1d3e4da3160dbf877374
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe0ac5bd72ebc1124a0d1d235f0a5685
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5aa8ae43576aa07cacf18697f6a3cc59
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d30500d9f027aed686d42cc229a618f9210
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675bef408fdb918250b151d6ad572a8067
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823585b1f4244e8c250ad184e4d136323
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d469cfabf272b96699902803bb827cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046362bfef9c2ee5fa1c5bf3f051d62a7
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487f462f16f23d75e839e3e3ca6ddc656
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161cfc8e413c6cf7355d49a11314f53eb
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082c6ada2cbaaf5c9521c53b6033afdf2
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a206771c15e3a2de65d8acca582d302e
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704fa59f99e3a770bf7302a977fe447a27
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546764fcf0852a54a4c72cf5aeb54247e
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e6c68bf22d060a014ec74285b160ef9
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f3814806031bd960ddd329283020469d20
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18640525bec17051e38dc408a1c9283e
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe4115698f426325741763ce612dfc302f3e72
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca97eb1e0f0d264b941dc8ad4f3e1c47
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1f9648458e93ebc7acdeefed59f9602
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a5690203129a15b544b1b935552277430b0090d5
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d46838f3a9868b44f88af6c1fd4aab72f77
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex pattern for username validation to allow special characters @#$%&*()
fix(validators.js): update regex pattern for username validation to allow special characters @#$%&*()
* fix(Registration.spec.tsx): fix validation error message for username length requirement
commit d38e463d34c720db1295a4a2aa95e58d7986556c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 13:44:40 2023 -0400
fix(bingAI): markdown and error formatting for final stream response (#829)
* fix(bingAI): markdown formatting for final stream response due to new strict payload validation on the frontend
* fix: add missing prop to bing Error response
commit 7dc27b10f19bcd32bffcbf2858756facfd752c8c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 22 18:44:59 2023 -0400
feat: Edit AI Messages, Edit Messages in Place (#825)
* refactor: replace lodash import with specific function import
fix(api): esm imports to cjs
* refactor(Messages.tsx): convert to TS, out-source scrollToDiv logic to a custom hook
fix(ScreenshotContext.tsx): change Ref to RefObject in ScreenshotContextType
feat(useScrollToRef.ts): add useScrollToRef hook for scrolling to a ref with throttle
fix(Chat.tsx): update import path for Messages component
fix(Search.tsx): update import path for Messages component
* chore(types.ts): add TAskProps and TOptions types
refactor(useMessageHandler.ts): use TAskFunction type for ask function signature
* refactor(Message/Content): convert to TS, move Plugin component to Content dir
* feat(MessageContent.tsx): add MessageContent component for displaying and editing message content
feat(index.ts): export MessageContent component from Messages/Content directory
* wip(Message.jsx): conversion and use of new component in progress
* refactor: convert Message.jsx to TS and fix typing/imports based on changes
* refactor: add typed props and refactor MultiMessage to TS, fix typing issues resulting from the conversion
* edit message in progress
* feat: complete edit AI message logic, refactor continue logic
* feat(middleware): add validateMessageReq middleware
feat(routes): add validation for message requests using validateMessageReq middleware
feat(routes): add create, read, update, and delete routes for messages
* feat: complete frontend logic for editing messages in place
feat(messages.js): update route for updating a specific message
- Change the route for updating a message to include the messageId in the URL
- Update the request handler to use the messageId from the request parameters and the text from the request body
- Call the updateMessage function with the updated parameters
feat(MessageContent.tsx): add functionality to update a message
- Import the useUpdateMessageMutation hook from the data provider
- Destructure the conversationId, parentMessageId, and messageId from the message object
- Create a mutation function using the useUpdateMessageMutation hook
- Implement the updateMessage function to call the mutation function with the updated message parameters
- Update the messages state to reflect the updated message text
feat(api-endpoints.ts): update messages endpoint to include messageId
- Update the messages endpoint to include the messageId as an optional parameter
feat(data-service.ts): add updateMessage function
- Implement the updateMessage function to make a PUT request to
* fix(messages.js): make updateMessage function asynchronous and await its execution
* style(EditIcon): make icon active for AI message
* feat(gptPlugins/anthropic): add edit support
* fix(validateMessageReq.js): handle case when conversationId is 'new' and return empty array
feat(Message.tsx): pass message prop to SiblingSwitch component
refactor(SiblingSwitch.tsx): convert to TS
* fix(useMessageHandler.ts): remove message from currentMessages if isContinued is true
feat(useMessageHandler.ts): add support for submission messages in setMessages
fix(useServerStream.ts): remove unnecessary conditional in setMessages
fix(useServerStream.ts): remove isContinued variable from submission
* fix(continue): switch to continued message generation when continuing an earlier branch in conversation
* fix(abortMiddleware.js): fix condition to check partialText length
chore(abortMiddleware.js): add error logging when abortMessage fails
* refactor(MessageHeader.tsx): convert to TS
fix(Plugin.tsx): add default value for className prop in Plugin component
* refactor(MultiMessage.tsx): remove commented out code
docs(MultiMessage.tsx): update comment to clarify when siblingIdx is reset
* fix(GenerationButtons): optimistic state for continue button
* fix(MessageContent.tsx): add data-testid attribute to message text editor
fix(messages.spec.ts): update waitForServerStream function to include edit endpoint check
feat(messages.spec.ts): add test case for editing messages
* fix(HoverButtons & Message & useGenerations): Refactor edit functionality and related conditions
- Update enterEdit function signature and prop
- Create and utilize hideEditButton variable
- Enhance conditions for edit button visibility and active state
- Update button event handlers
- Introduce isEditableEndpoint in useGenerations and refine continueSupported condition.
* fix(useGenerations.ts): fix condition for hideEditButton to include error and searchResult
chore(data-provider): bump version to 0.1.6
fix(types.ts): add status property to TError type
* chore: bump @dqbd/tiktoken to 1.0.7
* fix(abortMiddleware.js): add required isCreatedByUser property to the error response object
* refactor(Message.tsx): remove unnecessary props from SiblingSwitch component, as setLatestMessage is firing on every switch already
refactor(SiblingSwitch.tsx): remove unused imports and code
* chore(BaseClient.js): move console.debug statements back inside if block
commit db77163f5d1e98a13dc8d05ee1907001840030c6
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 22 14:15:14 2023 +0200
docs: update chimeragpt (#826)
* Update free_ai_apis.md
* Update free_ai_apis.md
commit 4a4e803df3118effc2fb73b3d71766ac565c1e97
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 21 20:15:18 2023 +0200
style(Dialog): Improved Close Button ("X") position (#824)
commit 909b00c7521277e49e4cf7319cd237c27250bd28
Author: Daniel Avila <messagedaniel@protonmail.com>
Date: Sun Aug 20 21:04:36 2023 -0400
fix(HoverButtons): light/dark styling to match official site
commit 61dcb4d3073a74bc45020d4888d2120173b4eb22
Author: Naosuke Yokoe <ankerasoy@gmail.com>
Date: Sat Aug 19 20:11:31 2023 +0900
feat: Azure Cognitive Search Plugin (#815)
* feat(AzureCognitiveSearchPlugin)
* feat(tools/AzureCognitiveSearch.js): Add a new plugin (not structured
version)
* feat(tools/structured/AzureCognitiveSearch.js): Add a new plugin (structured version)
* feat(tools/manifest.json, tools/index.js, tools/util/handleTools.js):
Add configurations for the plugin
* feat(api/package.json, package-lock.json): Installed a new package for the
plugin (@azure/search-documents)
* feat(.env.example): Add new environment variables for the plugin
Here is the link to the corresponding discussion page:
https://github.com/danny-avila/LibreChat/discussions/567
* docs(AzureCognitiveSearchPlugin)
* docs(features/plugins/azure_cognitive_search.md): Add a new document
for the plugin
* (fix:.env.example)
* reverted extra whitespaces removed by the editor
* docs(mkdocs.yml)
* Add the Azure Cognitive Search Plugin's documentation item to
mkdocs.yml.
commit 3c7f67fa7674549ff877105f4bd5b532f17fef06
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:40:33 2023 -0400
fix(abortMiddleware): handle early abort error where userMessage.conversationId is undefined. In this case, the userId will be used as the abortKey
commit c74c68a135064b9cb79d9666e535a1b862a8de4f
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:10:30 2023 -0400
refactor(MessageHandler -> useServerStream): convert all relating files to TS and correct typings based on this change: properly refactor MessageHandler to a custom hook, where it's passed a submission object to instantiate the stream. This is the bare minimum groundwork for potentially having multiple streams running, which would be a big project to modularize a lot of the global state into maps/multiple streams, particular useful for having multiple views in place
commit 8b4d3c2c2170e91258176a2cdedc977b690395a5
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:04:29 2023 -0400
refactor(routes): convert to TS
commit d612cfcb45f74da51ed4342264e35d42b77b7e8e
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:02:39 2023 -0400
chore(Auth): reorder exports in Auth component
fix(PluginAuthForm): handle case when pluginKey is null or undefined
fix(PluginStoreDialog): handle case when getAvailablePluginFromKey is null or undefined
fix(AuthContext): make authConfig optional in AuthContextProvider
feat(hooks): add useServerStream hook
fix(conversation): setSubmission to null instead of empty object
fix(preset): specify type for presets atom
fix(search): specify type for isSearchEnabled atom
fix(submission): specify type for submission atom
commit c40b95f424ad7110aef13b10725a3e2a900cf42e
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 18 16:11:00 2023 +0200
feat: Disable Registration with social login (#813)
* Google, Github and Discord
* update .env.example with ALLOW_SOCIAL_REGISTRATION
* fix some conflict
* refactor strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit 46ed5aaccd26d657e16c0e318d54c55821ec0016
Author: Patrick <psarnowski@gmail.com>
Date: Fri Aug 18 09:38:24 2023 -0400
Show the response scores from Bing. (#814)
commit 1dacfa49f06e2ca00e3765ede5c7db050fa34353
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 17 20:32:31 2023 +0200
update profile picture (#792)
commit afd43afb60b230a00ce5a5effab900130252f5cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 17 12:50:05 2023 -0400
feat(GPT/Anthropic): Continue Regenerating & Generation Buttons (#808)
* feat(useMessageHandler.js/ts): Refactor and add features to handle user messages, support multiple endpoints/models, generate placeholder responses, regeneration, and stopGeneration function
fix(conversation.ts, buildTree.ts): Import TMessage type, handle null parentMessageId
feat(schemas.ts): Update and add schemas for various AI services, add default values, optional fields, and endpoint-to-schema mapping, create parseConvo function
chore(useMessageHandler.js, schemas.ts): Remove unused imports, variables, and chatGPT enum
* wip: add generation buttons
* refactor(cleanupPreset.ts): simplify cleanupPreset function
refactor(getDefaultConversation.js): remove unused code and simplify getDefaultConversation function
feat(utils): add getDefaultConversation function
This commit adds a new utility function called `getDefaultConversation` to the `client/src/utils/getDefaultConversation.ts` file. This function is responsible for generating a default conversation object based on the provided parameters.
The `getDefaultConversation` function takes in an object with the following properties:
- `conversation`: The conversation object to be used as a base.
- `endpointsConfig`: The configuration object containing information about the available endpoints.
- `preset`: An optional preset object that can be used to override the default behavior.
The function first tries to determine the target endpoint based on the preset object. If a valid endpoint is found, it is used as the target endpoint. If not, the function tries to retrieve the last conversation setup from the local storage and uses its endpoint if it is valid. If neither the preset nor the local storage contains a valid endpoint, the function falls back to a default endpoint.
Once the target endpoint is determined,
* fix(utils): remove console.error statement in buildDefaultConversation function
fix(schemas): add default values for catch blocks in openAISchema, googleSchema, bingAISchema, anthropicSchema, chatGPTBrowserSchema, and gptPluginsSchema
* fix: endpoint not changing on change of preset from other endpoint, wip: refactor
* refactor: preset items to TSX
* refactor: convert resetConvo to TS
* refactor(getDefaultConversation.ts): move defaultEndpoints array to the top of the file for better readability
refactor(getDefaultConversation.ts): extract getDefaultEndpoint function for better code organization and reusability
* feat(svg): add ContinueIcon component
feat(svg): add RegenerateIcon component
feat(svg): add ContinueIcon and RegenerateIcon components to index.ts
* feat(Button.tsx): add onClick and className props to Button component
feat(GenerationButtons.tsx): add logic to display Regenerate or StopGenerating button based on isSubmitting and messages
feat(Regenerate.tsx): create Regenerate component with RegenerateIcon and handleRegenerate function
feat(StopGenerating.tsx): create StopGenerating component with StopGeneratingIcon and handleStopGenerating function
* fix(TextChat.jsx): reorder imports and variables for better readability
fix(TextChat.jsx): fix typo in condition for isNotAppendable variable
fix(TextChat.jsx): remove unused handleStopGenerating function
fix(ContinueIcon.tsx): remove unnecessary closing tags for polygon elements
fix(useMessageHandler.ts): add missing type annotations for handleStopGenerating and handleRegenerate functions
fix(useMessageHandler.ts): remove unused variables in return statement
* fix(getDefaultConversation.ts): refactor code to use getLocalStorageItems function
feat(getLocalStorageItems.ts): add utility function to retrieve items from local storage
* fix(OpenAIClient.js): add support for streaming result in sendCompletion method
feat(OpenAIClient.js): add finish_reason metadata to opts in sendCompletion method
feat(Message.js): add finish_reason field to Message model
feat(messageSchema.js): add finish_reason field to messageSchema
feat(openAI.js): parse chatGptLabel and promptPrefix from req.body and pass rest of the modelOptions to endpointOption
feat(openAI.js): add addMetadata function to store metadata in ask function
feat(openAI.js): add metadata to response if available
feat(schemas.ts): add finish_reason field to tMessageSchema
* feat(types.ts): add TOnClick and TGenButtonProps types for button components
feat(Continue.tsx): create Continue component for generating button
feat(GenerationButtons.tsx): update GenerationButtons component to use Continue component
feat(Regenerate.tsx): create Regenerate component for regenerating button
feat(Stop.tsx): create Stop component for stop generating button
* feat(MessageHandler.jsx): add MessageHandler component to handle messages and conversations
fix(Root.jsx): fix import paths for Nav and MessageHandler components
* feat(useMessageHandler.ts): add support for generation parameter in ask function
feat(useMessageHandler.ts): add support for isEdited parameter in ask function
feat(useMessageHandler.ts): add support for continueGeneration function
fix(createPayload.ts): replace endpoint URL when isEdited parameter is true
* chore(client): set skipLibCheck to true in tsconfig.json
* fix(useMessageHandler.ts): remove unused clientId variable
fix(schemas.ts): make clientId field in tMessageSchema nullable and optional
* wip: edit route for continue generation
* refactor(api): move handlers to root of routes dir
* fix(useMessageHandler.ts): initialize currentMessages to an empty array if messages is null
fix(useMessageHandler.ts): update initialResponse text to use responseText variable
fix(useMessageHandler.ts): update setMessages logic for isRegenerate case
fix(MessageHandler.jsx): update setMessages logic for cancelHandler, createdHandler, and finalHandler
* fix(schemas.ts): make createdAt and updatedAt fields optional and set default values using new Date().toISOString()
fix(schemas.ts): change type annotation of TMessage from infer to input
* refactor(useMessageHandler.ts): rename AskProps type to TAskProps
refactor(useMessageHandler.ts): remove generation property from ask function arguments
refactor(useMessageHandler.ts): use nullish coalescing operator (??) instead of logical OR (||)
refactor(useMessageHandler.ts): pass the responseMessageId to message prop of submission
* fix(BaseClient.js): use nullish coalescing operator (??) instead of logical OR (||) for default values
* fix(BaseClient.js): fix responseMessageId assignment in handleStartMethods method
feat(BaseClient.js): add support for isEdited flag in sendMessage method
feat(BaseClient.js): add generation to responseMessage text in sendMessage method
* fix(openAI.js): remove unused imports and commented out code
feat(openAI.js): add support for generation parameter in request body
fix(openAI.js): remove console.log statement
fix(openAI.js): remove unused variables and parameters
fix(openAI.js): update response text in case of error
fix(openAI.js): handle error and abort message in case of error
fix(handlers.js): add generation parameter to createOnProgress function
fix(useMessageHandler.ts): update responseText variable to use generation parameter
* refactor(api/middleware): move inside server dir
* refactor: add endpoint specific, modular functions to build options and initialize clients, create server/utils, move middleware, separate utils into api general utils and server specific utils
* fix(abortMiddleware.js): import getConvo and getConvoTitle functions from models
feat(abortMiddleware.js): add abortAsk function to abortController to handle aborting of requests
fix(openAI.js): import buildOptions and initializeClient functions from endpoints/openAI
refactor(openAI.js): use getAbortData function to get data for abortAsk function
* refactor: move endpoint specific logic to an endpoints dir
* refactor(PluginService.js): fix import path for encrypt and decrypt functions in PluginService.js
* feat(openAI): add new endpoint for adding a title to a conversation
- Added a new file `addTitle.js` in the `api/server/routes/endpoints/openAI` directory.
- The `addTitle.js` file exports a function `addTitle` that takes in request parameters and performs the following actions:
- If the `parentMessageId` is `'00000000-0000-0000-0000-000000000000'` and `newConvo` is true, it proceeds with the following steps:
- Calls the `titleConvo` function from the `titleConvo` module, passing in the necessary parameters.
- Calls the `saveConvo` function from the `saveConvo` module, passing in the user ID and conversation details.
- Updated the `index.js` file in the `api/server/routes/endpoints/openAI` directory to export the `addTitle` function.
- This change adds
* fix(abortMiddleware.js): remove console.log statement
refactor(gptPlugins.js): update imports and function parameters
feat(gptPlugins.js): add support for abortController and getAbortData
refactor(openAI.js): update imports and function parameters
feat(openAI.js): add support for abortController and getAbortData
fix(openAI.js): refactor code to use modularized functions and middleware
fix(buildOptions.js): refactor code to use destructuring and update variable names
* refactor(askChatGPTBrowser.js, bingAI.js, google.js): remove duplicate code for setting response headers
feat(askChatGPTBrowser.js, bingAI.js, google.js): add setHeaders middleware to set response headers
* feat(middleware): validateEndpoint, refactor buildOption to only be concerned of endpointOption
* fix(abortMiddleware.js): add 'finish_reason' property with value 'incomplete' to responseMessage object
fix(abortMessage.js): remove console.log statement for aborted message
fix(handlers.js): modify tokens assignment to handle empty generation string and trailing space
* fix(BaseClient.js): import addSpaceIfNeeded function from server/utils
fix(BaseClient.js): add space before generation in text property
fix(index.js): remove getCitations and citeText exports
feat(buildEndpointOption.js): add buildEndpointOption middleware
fix(index.js): import buildEndpointOption middleware
fix(anthropic.js): remove buildOptions function and use endpointOption from req.body
fix(gptPlugins.js): remove buildOptions function and use endpointOption from req.body
fix(openAI.js): remove buildOptions function and use endpointOption from req.body
feat(utils): add citations.js and handleText.js modules
fix(utils): fix import statements in index.js module
* refactor(gptPlugins.js): use getResponseSender function from librechat-data-provider
* feat(gptPlugins): complete 'continue generating'
* wip: anthropic continue regen
* feat(middleware): add validateRegistration middleware
A new middleware function called `validateRegistration` has been added to the list of exported middleware functions in `index.js`. This middleware is responsible for validating registration data before allowing the registration process to proceed.
* feat(Anthropic): complete continue regen
* chore: add librechat-data-provider to api/package.json
* fix(ci): backend-review will mock meilisearch, also installs data-provider as now needed
* chore(ci): remove unneeded SEARCH env var
* style(GenerationButtons): make text shorter for sake of space economy, even though this diverges from chat.openai.com
* style(GenerationButtons/ScrollToBottom): adjust visibility/position based on screen size
* chore(client): 'Editting' typo
* feat(GenerationButtons.tsx): add support for endpoint prop in GenerationButtons component
feat(OptionsBar.tsx): pass endpoint prop to GenerationButtons component
feat(useGenerations.ts): create useGenerations hook to handle generation logic
fix(schemas.ts): add searchResult field to tMessageSchema
* refactor(HoverButtons): convert to TSX and utilize new useGenerations hook
* fix(abortMiddleware): handle error with res headers set, or abortController not found, to ensure proper API error is sent to the client, chore(BaseClient): remove console log for onStart message meant for debugging
* refactor(api): remove librechat-data-provider dep for now as it complicates deployed docker build stage, re-use code in CJS, located in server/endpoints/schemas
* chore: remove console.logs from test files
* ci: add backend tests for AnthropicClient, focusing on new buildMessages logic
* refactor(FakeClient): use actual BaseClient sendMessage method for testing
* test(BaseClient.test.js): add test for loading chat history
test(BaseClient.test.js): add test for sendMessage logic with isEdited flag
* fix(buildEndpointOption.js): add support for azureOpenAI in buildFunction object
wip(endpoints.js): fetch Azure models from Azure OpenAI API if opts.azure is true
* fix(Button.tsx): add data-testid attribute to button component
fix(SelectDropDown.tsx): add data-testid attribute to Listbox.Button component
fix(messages.spec.ts): add waitForServerStream function to consolidate logic for awaiting the server response
feat(messages.spec.ts): add test for stopping and continuing message and improve browser/page context order and closing
* refactor(onProgress): speed up time to save initial message for editable routes
* chore: disable AI message editing (for now), was accidentally allowed
* refactor: ensure continue is only supported for latest message style: improve styling in dark mode and across all hover buttons/icons, including making edit icon for AI invisible (for now)
* fix: add test id to generation buttons so they never resolve to 2+ items
* chore(package.json): add 'packages/' to the list of ignored directories
chore(data-provider/package.json): bump version to 0.1.5
commit ae5b7d3d53a39764c301ad24bf1b7bad216ab97b
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 15 18:27:54 2023 -0400
fix(PluginsClient.js): fix ChatOpenAI Azure Config Issue (#812)
* fix(PluginsClient.js): fix issue with creating LLM when using Azure
* chore(PluginsClient.js): omit azure logging
* refactor(PluginsClient.js): simplify assignment of azure variable
The code was simplified by directly assigning the value of `this.azure` to the `azure` variable using object destructuring. This makes the code cleaner and more concise.
commit b85f3bf91ec3951400029f58fa92ad1a762d19b0
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 15 18:42:24 2023 +0200
update from lang to localize (#810)
commit 80aab73bf6313bede6afa2fcae111930ddd673da
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:19:04 2023 -0400
chore: rebuilt package-lock file
commit bbe4931a9738eca84f8f91d5c753e74f93742671
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:13:24 2023 -0400
refactor(ScreenshotContext): use html-to-image for lighter bundle, faster processing
commit 74802dd720a49c3bc0dff32f5622d5610c6cf0c4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 14 17:51:03 2023 +0200
chore: Translation Fixes, Lint Error Corrections, and Additional Translations (#788)
* fix translation and small lint error
* changed from localize to useLocalize hook
* changed to useLocalize
commit b64cc71d8809a6e8c9e26ce8d4d0531ccff54803
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:23:00 2023 -0400
chore(docker-compose.yml): comment out meilisearch ports in docker-compose.yml (#807)
commit 89f260bc7895713f32cf1361b4912f3f893ecbe4
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:12:00 2023 -0400
fix(CodeBlock.tsx): fix copy-to-clipboard functionality. The code has been updated to use the copy function from the copy-to-clipboard library instead of the (#806)
avigator.clipboard.writeText method. This should fix the issue with browser incompatibility with navigator SDK and allow users to copy code from the CodeBlock component successfully.
commit d00c7354cd464ce17b0d47362621232cb6f88481
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 09:45:44 2023 -0400
fix: Corrected Registration Validation, Case-Insensitive Variable Handling, Playwright workflow (#805)
* feat(auth.js): add validation for registration endpoint using validateRegistration middleware
feat(validateRegistration.js): add middleware to validate registration based on ALLOW_REGISTRATION environment variable
* fix(config.js): fix registrationEnabled and socialLoginEnabled variables to handle case-insensitive environment variable values
* refactor(validateRegistration.js): remove console.log statement
* chore(playwright.yml): skip browser download during yarn install
chore(playwright.yml): place Playwright binaries to node_modules/@playwright/test
chore(playwright.yml): install Playwright dependencies using npx playwright install-deps
chore(playwright.yml): install Playwright chromium browser using npx playwright install chromium
chore(playwright.yml): install @playwright/test@latest using npm install -D @playwright/test@latest
chore(playwright.yml): run Playwright tests using npm run e2e:ci
* chore(playwright.yml): change npm install order and update comment
The order of the npm install commands in the "Install Playwright Browsers" step has been changed to first install @playwright/test@latest and then install chromium. Additionally, the comment explaining the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD variable has been updated to mention npm install instead of yarn install.
* chore(playwright.yml): remove commented out code for caching and add separate steps for installing Playwright dependencies and browsers
commit 1aa4b34dc6c914c2992bb50d39c9b7363f144cf4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 11 19:02:52 2023 +0200
added the dot (.) username rules (#787)
commit 28230d9305e696f0200f1d3e4da3160dbf877374
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe0ac5bd72ebc1124a0d1d235f0a5685
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5aa8ae43576aa07cacf18697f6a3cc59
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d30500d9f027aed686d42cc229a618f9210
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675bef408fdb918250b151d6ad572a8067
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823585b1f4244e8c250ad184e4d136323
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d469cfabf272b96699902803bb827cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046362bfef9c2ee5fa1c5bf3f051d62a7
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487f462f16f23d75e839e3e3ca6ddc656
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161cfc8e413c6cf7355d49a11314f53eb
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082c6ada2cbaaf5c9521c53b6033afdf2
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a206771c15e3a2de65d8acca582d302e
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704fa59f99e3a770bf7302a977fe447a27
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546764fcf0852a54a4c72cf5aeb54247e
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e6c68bf22d060a014ec74285b160ef9
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f3814806031bd960ddd329283020469d20
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18640525bec17051e38dc408a1c9283e
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe4115698f426325741763ce612dfc302f3e72
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca97eb1e0f0d264b941dc8ad4f3e1c47
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1f9648458e93ebc7acdeefed59f9602
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a5690203129a15b544b1b935552277430b0090d5
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d46838f3a9868b44f88af6c1fd4aab72f77
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex …
* Update package-lock.json
* Update SubmitButton.tsx
* Update SpeechRecognition.tsx
* fix: typescript error
* style: moved to new UI
* fix:(SpeechRecognition) lint error
* moved everything to hooks
* feat: support stt external
* fix(useExternalSpeechRecognition): recording the audio
* feat: whisper api support
* refactor(SpeechReecognition); fix(HoverButtons): set isSpeakling correctly
* fix: spelling errors
* fix: renamed files
* BIG FIX
* feat: whisper support
* fixed some ChatForm bugs and added the tts route
* handling more errors
* Fix audio stream initialization and cleanup in useSpeechToTextExternal
* feat: Elevenlabs TTS
* fixed some req issues
* fix: stt not activating on Mac
* fix: send audio blob to frontend
* fix(ChatForm): startupConfig var
* Update text-to-speech and speech-to-text services
* handle more errors correctly
* Remove console.log statements
* feat: added manual trigger with button
* fix: SpeechToText and SpeechToTextExernal + AudioRecorder
* refactor: TTS component
* chore: removed unused variable
* feat: azure stt
* feat: dedicated speech panel
* feat: STT button switch: fix: TextArea pr value adapted
* refactor: textToSpeech function and useTextToSpeechMutation
* fix: typo data-service
* fix: blob backend to frontend
* feat: TTS button for external
* feat: librechat.yaml
* style: spinner when loading TTS
* feat: hold click to download file
* style: disabled when apiKey not provided
* fix: typo startupConfig?.speechToTextExternal
* style: update icons
* fix(useTextToSpeech): set isSpeaking when audio finish
* fix: small issues with local TTS
* style: update settings dark theme
* docs: STT & TTS
* WIP: chat audio automatic; docs(custom_config): update to new .yaml version; chore: updated librechat.yaml version
* fix: send button disabled
* fix: interval update
* localization
* removed unused test code
* revert interval update to 100
* feat: auto-send message
* fix: chat audio automatic, default false
* refactor: moved all logic to hooks
* chore: renamed ChatAudio to conversationMode
* refactor: organized Speech panel
* feat: autoSendText switch
* feat: moved chataudio to conversationMode and improved error handling; docs: update localai model
* refactor: Auto transcribe audio
* test: AutoSendTextSwitch, AutoTranscribeAudioSwitch and ConversationModeSwitch.spec: refactor: removed hark
* fix: various speechTab fixes
* refactor(useSpeechToTextBrowser):: handle more errors
* feat: engine select
* feat: advanced mode
* chore: converted hooks to TS
* feat: cache TTS
* feat: delete cache; fix: cache issues
* refactor(useTextToSpeechExternal): removed unused import
* feat: cache switch; refactor: moved to dir STT/TTS
* tests: CacheTTS, TextToSpeech, SpeechToText
* feat: custom elevenlabs compatibility
* fix(useTextToSpeechExternal): cache switch not working
* feat: animation for STT
* fix: settings var not working
* chore: remove unused var
* feat: voice dropdown; refactor: yaml changes
* fix(textToSpeech): remove undefined properties
* refactor: Remove console logs and unused variable
* fix: TTS; feat: support coqui and piper
* fix: some STT issues
* fix: stt test
* fix: STT backend sending wrong data
* BREAKING: switch to react-speech-recognition, add regenerator-runtime/runtime in main.jsx
* feat: websocket backend
* foundations for websocket
* first pass elevenlabs streaming
* streaming audio
* stream changes
* input streaming implementation
* fix: client build errors
* WIP: streaming rewrite
* audio stream working but not the loop
* WIP: looping audio stream working
* WIP tts routes rewrite
* feat: track SSE runs by runId, which enables us to better track audio streams per message request
* chore: set activeRunId on data.created
* rate limit tts and only allow once
* WIP: streaming audio
* refactor(useSSE): simplify messageId/parentMessageId assignment in message stream
* delete unused component
* streaming working
* first pass but need to investigate forever pending bug
* optimize audio stream handling client and initial request
* fix(StreamAudio): null exception
* refactor(tts): add limiters for db polling and timeout promise by intervals and not elapsed time
* refactor(textToSpeech): reduce polling delay
* feat(StreamAudio): add caching
* refactor: rename global variable, add setIsPlaying, remove mediasource ref
* feat: use custom hook for audioRef to help determine audio end state
* fix: voices mutation -> query
* fix: voices mutation -> query 2/2
* feat: successful TTS for manual playback
* fix: tts voice init
* feat: playback rate
* feat: global audio toggles
* chore: Add renderIcon function for chat message hover buttons, update schemas with notes
* chore: add debug logging instead of console.logs
* fix: edge case undefined user id
* feat: Automatic Playback switch
* feat: add caching bump data-provider
* chore: tts add auth
* use global state for audio run
* feat: assistants support for TTS read aloud
* ci: uncomment tests for now until they are refactored
* stream audio tests are WIP
* refactor: make automatic playback false as default
---------
Co-authored-by: bsu3338 <bsu3338@users.noreply.github.com>
Co-authored-by: bsu3338 <bsu3338@yahoo.com>
Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Co-authored-by: Berry-13 <marco13beretta@gmail.com>
Co-authored-by: Super User <root@Berry>
Co-authored-by: Marco Beretta <marco13beretta@proton.me>
2024-05-22 17:19:55 -04:00
|
|
|
|
2024-07-05 17:13:34 +03:00
|
|
|
export const speechToText = () => `${speech()}/stt`;
|
|
|
|
|
|
|
|
export const textToSpeech = () => `${speech()}/tts`;
|
🔉 feat: Speech-to-text / Text-to-speech (initial support) (#2836)
* Update TextChat.jsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update SubmitButton.jsx
* Create ListeningIcon.tsx
* Update index.ts
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update ListeningIcon.tsx
* Update ListeningIcon.tsx
* Create SpeechRecognition.tsx
* Update TextChat.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Create SpeechSynthesis.tsx
* Update index.jsx
* Update SpeechSynthesis.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Squashed commit of the following:
commit 28230d9305e696f0200f1d3e4da3160dbf877374
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe0ac5bd72ebc1124a0d1d235f0a5685
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5aa8ae43576aa07cacf18697f6a3cc59
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d30500d9f027aed686d42cc229a618f9210
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675bef408fdb918250b151d6ad572a8067
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823585b1f4244e8c250ad184e4d136323
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d469cfabf272b96699902803bb827cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046362bfef9c2ee5fa1c5bf3f051d62a7
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487f462f16f23d75e839e3e3ca6ddc656
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161cfc8e413c6cf7355d49a11314f53eb
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082c6ada2cbaaf5c9521c53b6033afdf2
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a206771c15e3a2de65d8acca582d302e
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704fa59f99e3a770bf7302a977fe447a27
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546764fcf0852a54a4c72cf5aeb54247e
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e6c68bf22d060a014ec74285b160ef9
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f3814806031bd960ddd329283020469d20
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18640525bec17051e38dc408a1c9283e
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe4115698f426325741763ce612dfc302f3e72
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca97eb1e0f0d264b941dc8ad4f3e1c47
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1f9648458e93ebc7acdeefed59f9602
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a5690203129a15b544b1b935552277430b0090d5
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d46838f3a9868b44f88af6c1fd4aab72f77
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex pattern for username validation to allow special characters @#$%&*()
fix(validators.js): update regex pattern for username validation to allow special characters @#$%&*()
* fix(Registration.spec.tsx): fix validation error message for username length requirement
commit d38e463d34c720db1295a4a2aa95e58d7986556c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 13:44:40 2023 -0400
fix(bingAI): markdown and error formatting for final stream response (#829)
* fix(bingAI): markdown formatting for final stream response due to new strict payload validation on the frontend
* fix: add missing prop to bing Error response
commit 7dc27b10f19bcd32bffcbf2858756facfd752c8c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 22 18:44:59 2023 -0400
feat: Edit AI Messages, Edit Messages in Place (#825)
* refactor: replace lodash import with specific function import
fix(api): esm imports to cjs
* refactor(Messages.tsx): convert to TS, out-source scrollToDiv logic to a custom hook
fix(ScreenshotContext.tsx): change Ref to RefObject in ScreenshotContextType
feat(useScrollToRef.ts): add useScrollToRef hook for scrolling to a ref with throttle
fix(Chat.tsx): update import path for Messages component
fix(Search.tsx): update import path for Messages component
* chore(types.ts): add TAskProps and TOptions types
refactor(useMessageHandler.ts): use TAskFunction type for ask function signature
* refactor(Message/Content): convert to TS, move Plugin component to Content dir
* feat(MessageContent.tsx): add MessageContent component for displaying and editing message content
feat(index.ts): export MessageContent component from Messages/Content directory
* wip(Message.jsx): conversion and use of new component in progress
* refactor: convert Message.jsx to TS and fix typing/imports based on changes
* refactor: add typed props and refactor MultiMessage to TS, fix typing issues resulting from the conversion
* edit message in progress
* feat: complete edit AI message logic, refactor continue logic
* feat(middleware): add validateMessageReq middleware
feat(routes): add validation for message requests using validateMessageReq middleware
feat(routes): add create, read, update, and delete routes for messages
* feat: complete frontend logic for editing messages in place
feat(messages.js): update route for updating a specific message
- Change the route for updating a message to include the messageId in the URL
- Update the request handler to use the messageId from the request parameters and the text from the request body
- Call the updateMessage function with the updated parameters
feat(MessageContent.tsx): add functionality to update a message
- Import the useUpdateMessageMutation hook from the data provider
- Destructure the conversationId, parentMessageId, and messageId from the message object
- Create a mutation function using the useUpdateMessageMutation hook
- Implement the updateMessage function to call the mutation function with the updated message parameters
- Update the messages state to reflect the updated message text
feat(api-endpoints.ts): update messages endpoint to include messageId
- Update the messages endpoint to include the messageId as an optional parameter
feat(data-service.ts): add updateMessage function
- Implement the updateMessage function to make a PUT request to
* fix(messages.js): make updateMessage function asynchronous and await its execution
* style(EditIcon): make icon active for AI message
* feat(gptPlugins/anthropic): add edit support
* fix(validateMessageReq.js): handle case when conversationId is 'new' and return empty array
feat(Message.tsx): pass message prop to SiblingSwitch component
refactor(SiblingSwitch.tsx): convert to TS
* fix(useMessageHandler.ts): remove message from currentMessages if isContinued is true
feat(useMessageHandler.ts): add support for submission messages in setMessages
fix(useServerStream.ts): remove unnecessary conditional in setMessages
fix(useServerStream.ts): remove isContinued variable from submission
* fix(continue): switch to continued message generation when continuing an earlier branch in conversation
* fix(abortMiddleware.js): fix condition to check partialText length
chore(abortMiddleware.js): add error logging when abortMessage fails
* refactor(MessageHeader.tsx): convert to TS
fix(Plugin.tsx): add default value for className prop in Plugin component
* refactor(MultiMessage.tsx): remove commented out code
docs(MultiMessage.tsx): update comment to clarify when siblingIdx is reset
* fix(GenerationButtons): optimistic state for continue button
* fix(MessageContent.tsx): add data-testid attribute to message text editor
fix(messages.spec.ts): update waitForServerStream function to include edit endpoint check
feat(messages.spec.ts): add test case for editing messages
* fix(HoverButtons & Message & useGenerations): Refactor edit functionality and related conditions
- Update enterEdit function signature and prop
- Create and utilize hideEditButton variable
- Enhance conditions for edit button visibility and active state
- Update button event handlers
- Introduce isEditableEndpoint in useGenerations and refine continueSupported condition.
* fix(useGenerations.ts): fix condition for hideEditButton to include error and searchResult
chore(data-provider): bump version to 0.1.6
fix(types.ts): add status property to TError type
* chore: bump @dqbd/tiktoken to 1.0.7
* fix(abortMiddleware.js): add required isCreatedByUser property to the error response object
* refactor(Message.tsx): remove unnecessary props from SiblingSwitch component, as setLatestMessage is firing on every switch already
refactor(SiblingSwitch.tsx): remove unused imports and code
* chore(BaseClient.js): move console.debug statements back inside if block
commit db77163f5d1e98a13dc8d05ee1907001840030c6
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 22 14:15:14 2023 +0200
docs: update chimeragpt (#826)
* Update free_ai_apis.md
* Update free_ai_apis.md
commit 4a4e803df3118effc2fb73b3d71766ac565c1e97
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 21 20:15:18 2023 +0200
style(Dialog): Improved Close Button ("X") position (#824)
commit 909b00c7521277e49e4cf7319cd237c27250bd28
Author: Daniel Avila <messagedaniel@protonmail.com>
Date: Sun Aug 20 21:04:36 2023 -0400
fix(HoverButtons): light/dark styling to match official site
commit 61dcb4d3073a74bc45020d4888d2120173b4eb22
Author: Naosuke Yokoe <ankerasoy@gmail.com>
Date: Sat Aug 19 20:11:31 2023 +0900
feat: Azure Cognitive Search Plugin (#815)
* feat(AzureCognitiveSearchPlugin)
* feat(tools/AzureCognitiveSearch.js): Add a new plugin (not structured
version)
* feat(tools/structured/AzureCognitiveSearch.js): Add a new plugin (structured version)
* feat(tools/manifest.json, tools/index.js, tools/util/handleTools.js):
Add configurations for the plugin
* feat(api/package.json, package-lock.json): Installed a new package for the
plugin (@azure/search-documents)
* feat(.env.example): Add new environment variables for the plugin
Here is the link to the corresponding discussion page:
https://github.com/danny-avila/LibreChat/discussions/567
* docs(AzureCognitiveSearchPlugin)
* docs(features/plugins/azure_cognitive_search.md): Add a new document
for the plugin
* (fix:.env.example)
* reverted extra whitespaces removed by the editor
* docs(mkdocs.yml)
* Add the Azure Cognitive Search Plugin's documentation item to
mkdocs.yml.
commit 3c7f67fa7674549ff877105f4bd5b532f17fef06
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:40:33 2023 -0400
fix(abortMiddleware): handle early abort error where userMessage.conversationId is undefined. In this case, the userId will be used as the abortKey
commit c74c68a135064b9cb79d9666e535a1b862a8de4f
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:10:30 2023 -0400
refactor(MessageHandler -> useServerStream): convert all relating files to TS and correct typings based on this change: properly refactor MessageHandler to a custom hook, where it's passed a submission object to instantiate the stream. This is the bare minimum groundwork for potentially having multiple streams running, which would be a big project to modularize a lot of the global state into maps/multiple streams, particular useful for having multiple views in place
commit 8b4d3c2c2170e91258176a2cdedc977b690395a5
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:04:29 2023 -0400
refactor(routes): convert to TS
commit d612cfcb45f74da51ed4342264e35d42b77b7e8e
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:02:39 2023 -0400
chore(Auth): reorder exports in Auth component
fix(PluginAuthForm): handle case when pluginKey is null or undefined
fix(PluginStoreDialog): handle case when getAvailablePluginFromKey is null or undefined
fix(AuthContext): make authConfig optional in AuthContextProvider
feat(hooks): add useServerStream hook
fix(conversation): setSubmission to null instead of empty object
fix(preset): specify type for presets atom
fix(search): specify type for isSearchEnabled atom
fix(submission): specify type for submission atom
commit c40b95f424ad7110aef13b10725a3e2a900cf42e
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 18 16:11:00 2023 +0200
feat: Disable Registration with social login (#813)
* Google, Github and Discord
* update .env.example with ALLOW_SOCIAL_REGISTRATION
* fix some conflict
* refactor strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit 46ed5aaccd26d657e16c0e318d54c55821ec0016
Author: Patrick <psarnowski@gmail.com>
Date: Fri Aug 18 09:38:24 2023 -0400
Show the response scores from Bing. (#814)
commit 1dacfa49f06e2ca00e3765ede5c7db050fa34353
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 17 20:32:31 2023 +0200
update profile picture (#792)
commit afd43afb60b230a00ce5a5effab900130252f5cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 17 12:50:05 2023 -0400
feat(GPT/Anthropic): Continue Regenerating & Generation Buttons (#808)
* feat(useMessageHandler.js/ts): Refactor and add features to handle user messages, support multiple endpoints/models, generate placeholder responses, regeneration, and stopGeneration function
fix(conversation.ts, buildTree.ts): Import TMessage type, handle null parentMessageId
feat(schemas.ts): Update and add schemas for various AI services, add default values, optional fields, and endpoint-to-schema mapping, create parseConvo function
chore(useMessageHandler.js, schemas.ts): Remove unused imports, variables, and chatGPT enum
* wip: add generation buttons
* refactor(cleanupPreset.ts): simplify cleanupPreset function
refactor(getDefaultConversation.js): remove unused code and simplify getDefaultConversation function
feat(utils): add getDefaultConversation function
This commit adds a new utility function called `getDefaultConversation` to the `client/src/utils/getDefaultConversation.ts` file. This function is responsible for generating a default conversation object based on the provided parameters.
The `getDefaultConversation` function takes in an object with the following properties:
- `conversation`: The conversation object to be used as a base.
- `endpointsConfig`: The configuration object containing information about the available endpoints.
- `preset`: An optional preset object that can be used to override the default behavior.
The function first tries to determine the target endpoint based on the preset object. If a valid endpoint is found, it is used as the target endpoint. If not, the function tries to retrieve the last conversation setup from the local storage and uses its endpoint if it is valid. If neither the preset nor the local storage contains a valid endpoint, the function falls back to a default endpoint.
Once the target endpoint is determined,
* fix(utils): remove console.error statement in buildDefaultConversation function
fix(schemas): add default values for catch blocks in openAISchema, googleSchema, bingAISchema, anthropicSchema, chatGPTBrowserSchema, and gptPluginsSchema
* fix: endpoint not changing on change of preset from other endpoint, wip: refactor
* refactor: preset items to TSX
* refactor: convert resetConvo to TS
* refactor(getDefaultConversation.ts): move defaultEndpoints array to the top of the file for better readability
refactor(getDefaultConversation.ts): extract getDefaultEndpoint function for better code organization and reusability
* feat(svg): add ContinueIcon component
feat(svg): add RegenerateIcon component
feat(svg): add ContinueIcon and RegenerateIcon components to index.ts
* feat(Button.tsx): add onClick and className props to Button component
feat(GenerationButtons.tsx): add logic to display Regenerate or StopGenerating button based on isSubmitting and messages
feat(Regenerate.tsx): create Regenerate component with RegenerateIcon and handleRegenerate function
feat(StopGenerating.tsx): create StopGenerating component with StopGeneratingIcon and handleStopGenerating function
* fix(TextChat.jsx): reorder imports and variables for better readability
fix(TextChat.jsx): fix typo in condition for isNotAppendable variable
fix(TextChat.jsx): remove unused handleStopGenerating function
fix(ContinueIcon.tsx): remove unnecessary closing tags for polygon elements
fix(useMessageHandler.ts): add missing type annotations for handleStopGenerating and handleRegenerate functions
fix(useMessageHandler.ts): remove unused variables in return statement
* fix(getDefaultConversation.ts): refactor code to use getLocalStorageItems function
feat(getLocalStorageItems.ts): add utility function to retrieve items from local storage
* fix(OpenAIClient.js): add support for streaming result in sendCompletion method
feat(OpenAIClient.js): add finish_reason metadata to opts in sendCompletion method
feat(Message.js): add finish_reason field to Message model
feat(messageSchema.js): add finish_reason field to messageSchema
feat(openAI.js): parse chatGptLabel and promptPrefix from req.body and pass rest of the modelOptions to endpointOption
feat(openAI.js): add addMetadata function to store metadata in ask function
feat(openAI.js): add metadata to response if available
feat(schemas.ts): add finish_reason field to tMessageSchema
* feat(types.ts): add TOnClick and TGenButtonProps types for button components
feat(Continue.tsx): create Continue component for generating button
feat(GenerationButtons.tsx): update GenerationButtons component to use Continue component
feat(Regenerate.tsx): create Regenerate component for regenerating button
feat(Stop.tsx): create Stop component for stop generating button
* feat(MessageHandler.jsx): add MessageHandler component to handle messages and conversations
fix(Root.jsx): fix import paths for Nav and MessageHandler components
* feat(useMessageHandler.ts): add support for generation parameter in ask function
feat(useMessageHandler.ts): add support for isEdited parameter in ask function
feat(useMessageHandler.ts): add support for continueGeneration function
fix(createPayload.ts): replace endpoint URL when isEdited parameter is true
* chore(client): set skipLibCheck to true in tsconfig.json
* fix(useMessageHandler.ts): remove unused clientId variable
fix(schemas.ts): make clientId field in tMessageSchema nullable and optional
* wip: edit route for continue generation
* refactor(api): move handlers to root of routes dir
* fix(useMessageHandler.ts): initialize currentMessages to an empty array if messages is null
fix(useMessageHandler.ts): update initialResponse text to use responseText variable
fix(useMessageHandler.ts): update setMessages logic for isRegenerate case
fix(MessageHandler.jsx): update setMessages logic for cancelHandler, createdHandler, and finalHandler
* fix(schemas.ts): make createdAt and updatedAt fields optional and set default values using new Date().toISOString()
fix(schemas.ts): change type annotation of TMessage from infer to input
* refactor(useMessageHandler.ts): rename AskProps type to TAskProps
refactor(useMessageHandler.ts): remove generation property from ask function arguments
refactor(useMessageHandler.ts): use nullish coalescing operator (??) instead of logical OR (||)
refactor(useMessageHandler.ts): pass the responseMessageId to message prop of submission
* fix(BaseClient.js): use nullish coalescing operator (??) instead of logical OR (||) for default values
* fix(BaseClient.js): fix responseMessageId assignment in handleStartMethods method
feat(BaseClient.js): add support for isEdited flag in sendMessage method
feat(BaseClient.js): add generation to responseMessage text in sendMessage method
* fix(openAI.js): remove unused imports and commented out code
feat(openAI.js): add support for generation parameter in request body
fix(openAI.js): remove console.log statement
fix(openAI.js): remove unused variables and parameters
fix(openAI.js): update response text in case of error
fix(openAI.js): handle error and abort message in case of error
fix(handlers.js): add generation parameter to createOnProgress function
fix(useMessageHandler.ts): update responseText variable to use generation parameter
* refactor(api/middleware): move inside server dir
* refactor: add endpoint specific, modular functions to build options and initialize clients, create server/utils, move middleware, separate utils into api general utils and server specific utils
* fix(abortMiddleware.js): import getConvo and getConvoTitle functions from models
feat(abortMiddleware.js): add abortAsk function to abortController to handle aborting of requests
fix(openAI.js): import buildOptions and initializeClient functions from endpoints/openAI
refactor(openAI.js): use getAbortData function to get data for abortAsk function
* refactor: move endpoint specific logic to an endpoints dir
* refactor(PluginService.js): fix import path for encrypt and decrypt functions in PluginService.js
* feat(openAI): add new endpoint for adding a title to a conversation
- Added a new file `addTitle.js` in the `api/server/routes/endpoints/openAI` directory.
- The `addTitle.js` file exports a function `addTitle` that takes in request parameters and performs the following actions:
- If the `parentMessageId` is `'00000000-0000-0000-0000-000000000000'` and `newConvo` is true, it proceeds with the following steps:
- Calls the `titleConvo` function from the `titleConvo` module, passing in the necessary parameters.
- Calls the `saveConvo` function from the `saveConvo` module, passing in the user ID and conversation details.
- Updated the `index.js` file in the `api/server/routes/endpoints/openAI` directory to export the `addTitle` function.
- This change adds
* fix(abortMiddleware.js): remove console.log statement
refactor(gptPlugins.js): update imports and function parameters
feat(gptPlugins.js): add support for abortController and getAbortData
refactor(openAI.js): update imports and function parameters
feat(openAI.js): add support for abortController and getAbortData
fix(openAI.js): refactor code to use modularized functions and middleware
fix(buildOptions.js): refactor code to use destructuring and update variable names
* refactor(askChatGPTBrowser.js, bingAI.js, google.js): remove duplicate code for setting response headers
feat(askChatGPTBrowser.js, bingAI.js, google.js): add setHeaders middleware to set response headers
* feat(middleware): validateEndpoint, refactor buildOption to only be concerned of endpointOption
* fix(abortMiddleware.js): add 'finish_reason' property with value 'incomplete' to responseMessage object
fix(abortMessage.js): remove console.log statement for aborted message
fix(handlers.js): modify tokens assignment to handle empty generation string and trailing space
* fix(BaseClient.js): import addSpaceIfNeeded function from server/utils
fix(BaseClient.js): add space before generation in text property
fix(index.js): remove getCitations and citeText exports
feat(buildEndpointOption.js): add buildEndpointOption middleware
fix(index.js): import buildEndpointOption middleware
fix(anthropic.js): remove buildOptions function and use endpointOption from req.body
fix(gptPlugins.js): remove buildOptions function and use endpointOption from req.body
fix(openAI.js): remove buildOptions function and use endpointOption from req.body
feat(utils): add citations.js and handleText.js modules
fix(utils): fix import statements in index.js module
* refactor(gptPlugins.js): use getResponseSender function from librechat-data-provider
* feat(gptPlugins): complete 'continue generating'
* wip: anthropic continue regen
* feat(middleware): add validateRegistration middleware
A new middleware function called `validateRegistration` has been added to the list of exported middleware functions in `index.js`. This middleware is responsible for validating registration data before allowing the registration process to proceed.
* feat(Anthropic): complete continue regen
* chore: add librechat-data-provider to api/package.json
* fix(ci): backend-review will mock meilisearch, also installs data-provider as now needed
* chore(ci): remove unneeded SEARCH env var
* style(GenerationButtons): make text shorter for sake of space economy, even though this diverges from chat.openai.com
* style(GenerationButtons/ScrollToBottom): adjust visibility/position based on screen size
* chore(client): 'Editting' typo
* feat(GenerationButtons.tsx): add support for endpoint prop in GenerationButtons component
feat(OptionsBar.tsx): pass endpoint prop to GenerationButtons component
feat(useGenerations.ts): create useGenerations hook to handle generation logic
fix(schemas.ts): add searchResult field to tMessageSchema
* refactor(HoverButtons): convert to TSX and utilize new useGenerations hook
* fix(abortMiddleware): handle error with res headers set, or abortController not found, to ensure proper API error is sent to the client, chore(BaseClient): remove console log for onStart message meant for debugging
* refactor(api): remove librechat-data-provider dep for now as it complicates deployed docker build stage, re-use code in CJS, located in server/endpoints/schemas
* chore: remove console.logs from test files
* ci: add backend tests for AnthropicClient, focusing on new buildMessages logic
* refactor(FakeClient): use actual BaseClient sendMessage method for testing
* test(BaseClient.test.js): add test for loading chat history
test(BaseClient.test.js): add test for sendMessage logic with isEdited flag
* fix(buildEndpointOption.js): add support for azureOpenAI in buildFunction object
wip(endpoints.js): fetch Azure models from Azure OpenAI API if opts.azure is true
* fix(Button.tsx): add data-testid attribute to button component
fix(SelectDropDown.tsx): add data-testid attribute to Listbox.Button component
fix(messages.spec.ts): add waitForServerStream function to consolidate logic for awaiting the server response
feat(messages.spec.ts): add test for stopping and continuing message and improve browser/page context order and closing
* refactor(onProgress): speed up time to save initial message for editable routes
* chore: disable AI message editing (for now), was accidentally allowed
* refactor: ensure continue is only supported for latest message style: improve styling in dark mode and across all hover buttons/icons, including making edit icon for AI invisible (for now)
* fix: add test id to generation buttons so they never resolve to 2+ items
* chore(package.json): add 'packages/' to the list of ignored directories
chore(data-provider/package.json): bump version to 0.1.5
commit ae5b7d3d53a39764c301ad24bf1b7bad216ab97b
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 15 18:27:54 2023 -0400
fix(PluginsClient.js): fix ChatOpenAI Azure Config Issue (#812)
* fix(PluginsClient.js): fix issue with creating LLM when using Azure
* chore(PluginsClient.js): omit azure logging
* refactor(PluginsClient.js): simplify assignment of azure variable
The code was simplified by directly assigning the value of `this.azure` to the `azure` variable using object destructuring. This makes the code cleaner and more concise.
commit b85f3bf91ec3951400029f58fa92ad1a762d19b0
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 15 18:42:24 2023 +0200
update from lang to localize (#810)
commit 80aab73bf6313bede6afa2fcae111930ddd673da
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:19:04 2023 -0400
chore: rebuilt package-lock file
commit bbe4931a9738eca84f8f91d5c753e74f93742671
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:13:24 2023 -0400
refactor(ScreenshotContext): use html-to-image for lighter bundle, faster processing
commit 74802dd720a49c3bc0dff32f5622d5610c6cf0c4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 14 17:51:03 2023 +0200
chore: Translation Fixes, Lint Error Corrections, and Additional Translations (#788)
* fix translation and small lint error
* changed from localize to useLocalize hook
* changed to useLocalize
commit b64cc71d8809a6e8c9e26ce8d4d0531ccff54803
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:23:00 2023 -0400
chore(docker-compose.yml): comment out meilisearch ports in docker-compose.yml (#807)
commit 89f260bc7895713f32cf1361b4912f3f893ecbe4
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:12:00 2023 -0400
fix(CodeBlock.tsx): fix copy-to-clipboard functionality. The code has been updated to use the copy function from the copy-to-clipboard library instead of the (#806)
avigator.clipboard.writeText method. This should fix the issue with browser incompatibility with navigator SDK and allow users to copy code from the CodeBlock component successfully.
commit d00c7354cd464ce17b0d47362621232cb6f88481
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 09:45:44 2023 -0400
fix: Corrected Registration Validation, Case-Insensitive Variable Handling, Playwright workflow (#805)
* feat(auth.js): add validation for registration endpoint using validateRegistration middleware
feat(validateRegistration.js): add middleware to validate registration based on ALLOW_REGISTRATION environment variable
* fix(config.js): fix registrationEnabled and socialLoginEnabled variables to handle case-insensitive environment variable values
* refactor(validateRegistration.js): remove console.log statement
* chore(playwright.yml): skip browser download during yarn install
chore(playwright.yml): place Playwright binaries to node_modules/@playwright/test
chore(playwright.yml): install Playwright dependencies using npx playwright install-deps
chore(playwright.yml): install Playwright chromium browser using npx playwright install chromium
chore(playwright.yml): install @playwright/test@latest using npm install -D @playwright/test@latest
chore(playwright.yml): run Playwright tests using npm run e2e:ci
* chore(playwright.yml): change npm install order and update comment
The order of the npm install commands in the "Install Playwright Browsers" step has been changed to first install @playwright/test@latest and then install chromium. Additionally, the comment explaining the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD variable has been updated to mention npm install instead of yarn install.
* chore(playwright.yml): remove commented out code for caching and add separate steps for installing Playwright dependencies and browsers
commit 1aa4b34dc6c914c2992bb50d39c9b7363f144cf4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 11 19:02:52 2023 +0200
added the dot (.) username rules (#787)
* Create VolumeMuteIcon.tsx
* Create VolumeIcon.tsx
* Update index.ts
* Update SubmitButton.jsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update HoverButtons.tsx
* Update useServerStream.ts
* Update useServerStream.ts
* Update HoverButtons.tsx
* Update useServerStream.ts
* Update useServerStream.ts
* Update HoverButtons.tsx
* Update VolumeIcon.tsx
* Update VolumeMuteIcon.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update HoverButtons.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update SpeechSynthesis.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update package.json
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Squashed commit of the following:
commit 101952963435e2ff32b8298cc5d6f0121fab69f5
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:12:14 2023 -0500
Update SpeechRecognition.tsx
commit 67f111ccd0d72c1fc82398866086a75a11ed7919
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:08:48 2023 -0500
Update SpeechRecognition.tsx
commit 0b35dbe1960bb45445f0813ffd7dc4b38e44d772
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:04:50 2023 -0500
Update SpeechRecognition.tsx
commit 6686126dc0d30322fa2536a83f0b0f903f28b822
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:49:08 2023 -0500
Update SpeechRecognition.tsx
commit 5b80ddfba74ad417dcaabf89ed12e7ec8ddb50c8
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:45:02 2023 -0500
Update package.json
commit 39e84efa81d778b2241dac6210899c5bb7a4da7e
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:35:48 2023 -0500
Update SpeechSynthesis.tsx
commit 4c6d067cb9866e187c147d5517ef5f98c8f54879
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:24:29 2023 -0500
Update HoverButtons.tsx
commit c5ce576fb85973f20bffeb8d7eab3f3e3f626b9f
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:13:20 2023 -0500
Update SpeechSynthesis.tsx
commit d95fa195397d9ee261c3b8cf238aa983e338edd7
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:11:38 2023 -0500
Update SpeechSynthesis.tsx
commit c794f076787e1e7c957c6052b4e542473df8db48
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:03:34 2023 -0500
Update HoverButtons.tsx
commit 7ae0e7e97cdf0969f5e6d13c73a1533e5dc93a8f
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:59:45 2023 -0500
Update HoverButtons.tsx
commit e9882dedad397895384f9735c3be00c2eb77f9c6
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:58:07 2023 -0500
Update SpeechSynthesis.tsx
commit 95cf3007826144d64e48e2c61769c1e0e3a81cda
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:44:49 2023 -0500
Update HoverButtons.tsx
commit 37c828d7fb7ac031df9ca1733736cbfbf8a13131
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:30:34 2023 -0500
Update VolumeMuteIcon.tsx
commit 61335317377da07a095a6a821dcdffe31552c976
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:29:54 2023 -0500
Update VolumeIcon.tsx
commit 4b4afcdd3767d438c9932f926566f4bc55d864a5
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:20:14 2023 -0500
Update HoverButtons.tsx
commit 609d1dfefb06e3cdfca8f400265c4d47e2d8d5cc
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:49:52 2023 -0500
Update useServerStream.ts
commit 875ce4b77e9e3121c7f98ee4a0bfbee35f726923
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:48:26 2023 -0500
Update useServerStream.ts
commit 8ed04e496bc9a9d462a6a043db083665dc238472
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:37:59 2023 -0500
Update HoverButtons.tsx
commit 4b30c132dfb5d297b737448a49bf79a1512c2d26
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:14:01 2023 -0500
Update useServerStream.ts
commit c041c329cf0e71b8d32fada053363de4a6c0b91c
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:07:14 2023 -0500
Update useServerStream.ts
commit 3e36c168171e53f3329936899dbe125f5149c4cd
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:36:21 2023 -0500
Update HoverButtons.tsx
commit c7eea967597e2f552cf44f38dd2c92d5cc9ec068
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:28:03 2023 -0500
Update TextChat.jsx
commit 5542f8e85dfa16faaf8be9535cb36a4614d17aa1
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:21:50 2023 -0500
Update SpeechRecognition.tsx
commit 9a27e56f8b40766136c491ae0ed4abfdd17e4c11
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:16:01 2023 -0500
Update TextChat.jsx
commit 7f101bd1229961fed81eaf8ef2e7ed08050da208
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:09:51 2023 -0500
Update SpeechRecognition.tsx
commit d405454bf5d3f00e1421c37086d60a6353cadbfb
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:03:34 2023 -0500
Update SpeechRecognition.tsx
commit 6033eb3ed123a485278a3c86d042c6892595d23d
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:01:06 2023 -0500
Update TextChat.jsx
commit 9a3e67fcd2ac9695e35258ea4e5922c8d514486d
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 18:53:19 2023 -0500
Update TextChat.jsx
commit 6583877cb32c96f6746eaa213f8db0924faad89e
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:53:18 2023 -0500
Update SubmitButton.jsx
commit 8d5114bfae355d6e78dcca1cf0c22bacd21c93d6
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:39:20 2023 -0500
Update SubmitButton.jsx
commit 29a5b558838704b5cf9d564a1e0b64538ab84ae6
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:28:03 2023 -0500
Update index.ts
commit b03001d01df0fb6caa756534a48466a96932c6f4
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:25:43 2023 -0500
Create VolumeIcon.tsx
commit 863af2c9594f0b25425b2382e727e62d25caff79
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:21:43 2023 -0500
Create VolumeMuteIcon.tsx
commit ad3c78f86703e0e4930151ac3ba45bb3450dd763
Merge: ed4b25b2 28230d93
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 16:49:56 2023 -0500
Merge branch 'danny-avila:main' into Speech-September
commit ed4b25b2c17ce76fba17a92d7e03a296b371d148
Author: bsu3338 <bsu3338@yahoo.com>
Date: Sun Sep 3 16:49:03 2023 -0500
Squashed commit of the following:
commit 28230d9305e696f0200f1d3e4da3160dbf877374
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe0ac5bd72ebc1124a0d1d235f0a5685
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5aa8ae43576aa07cacf18697f6a3cc59
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d30500d9f027aed686d42cc229a618f9210
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675bef408fdb918250b151d6ad572a8067
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823585b1f4244e8c250ad184e4d136323
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d469cfabf272b96699902803bb827cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046362bfef9c2ee5fa1c5bf3f051d62a7
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487f462f16f23d75e839e3e3ca6ddc656
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161cfc8e413c6cf7355d49a11314f53eb
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082c6ada2cbaaf5c9521c53b6033afdf2
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a206771c15e3a2de65d8acca582d302e
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704fa59f99e3a770bf7302a977fe447a27
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546764fcf0852a54a4c72cf5aeb54247e
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e6c68bf22d060a014ec74285b160ef9
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f3814806031bd960ddd329283020469d20
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18640525bec17051e38dc408a1c9283e
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe4115698f426325741763ce612dfc302f3e72
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca97eb1e0f0d264b941dc8ad4f3e1c47
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1f9648458e93ebc7acdeefed59f9602
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a5690203129a15b544b1b935552277430b0090d5
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d46838f3a9868b44f88af6c1fd4aab72f77
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex pattern for username validation to allow special characters @#$%&*()
fix(validators.js): update regex pattern for username validation to allow special characters @#$%&*()
* fix(Registration.spec.tsx): fix validation error message for username length requirement
commit d38e463d34c720db1295a4a2aa95e58d7986556c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 13:44:40 2023 -0400
fix(bingAI): markdown and error formatting for final stream response (#829)
* fix(bingAI): markdown formatting for final stream response due to new strict payload validation on the frontend
* fix: add missing prop to bing Error response
commit 7dc27b10f19bcd32bffcbf2858756facfd752c8c
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 22 18:44:59 2023 -0400
feat: Edit AI Messages, Edit Messages in Place (#825)
* refactor: replace lodash import with specific function import
fix(api): esm imports to cjs
* refactor(Messages.tsx): convert to TS, out-source scrollToDiv logic to a custom hook
fix(ScreenshotContext.tsx): change Ref to RefObject in ScreenshotContextType
feat(useScrollToRef.ts): add useScrollToRef hook for scrolling to a ref with throttle
fix(Chat.tsx): update import path for Messages component
fix(Search.tsx): update import path for Messages component
* chore(types.ts): add TAskProps and TOptions types
refactor(useMessageHandler.ts): use TAskFunction type for ask function signature
* refactor(Message/Content): convert to TS, move Plugin component to Content dir
* feat(MessageContent.tsx): add MessageContent component for displaying and editing message content
feat(index.ts): export MessageContent component from Messages/Content directory
* wip(Message.jsx): conversion and use of new component in progress
* refactor: convert Message.jsx to TS and fix typing/imports based on changes
* refactor: add typed props and refactor MultiMessage to TS, fix typing issues resulting from the conversion
* edit message in progress
* feat: complete edit AI message logic, refactor continue logic
* feat(middleware): add validateMessageReq middleware
feat(routes): add validation for message requests using validateMessageReq middleware
feat(routes): add create, read, update, and delete routes for messages
* feat: complete frontend logic for editing messages in place
feat(messages.js): update route for updating a specific message
- Change the route for updating a message to include the messageId in the URL
- Update the request handler to use the messageId from the request parameters and the text from the request body
- Call the updateMessage function with the updated parameters
feat(MessageContent.tsx): add functionality to update a message
- Import the useUpdateMessageMutation hook from the data provider
- Destructure the conversationId, parentMessageId, and messageId from the message object
- Create a mutation function using the useUpdateMessageMutation hook
- Implement the updateMessage function to call the mutation function with the updated message parameters
- Update the messages state to reflect the updated message text
feat(api-endpoints.ts): update messages endpoint to include messageId
- Update the messages endpoint to include the messageId as an optional parameter
feat(data-service.ts): add updateMessage function
- Implement the updateMessage function to make a PUT request to
* fix(messages.js): make updateMessage function asynchronous and await its execution
* style(EditIcon): make icon active for AI message
* feat(gptPlugins/anthropic): add edit support
* fix(validateMessageReq.js): handle case when conversationId is 'new' and return empty array
feat(Message.tsx): pass message prop to SiblingSwitch component
refactor(SiblingSwitch.tsx): convert to TS
* fix(useMessageHandler.ts): remove message from currentMessages if isContinued is true
feat(useMessageHandler.ts): add support for submission messages in setMessages
fix(useServerStream.ts): remove unnecessary conditional in setMessages
fix(useServerStream.ts): remove isContinued variable from submission
* fix(continue): switch to continued message generation when continuing an earlier branch in conversation
* fix(abortMiddleware.js): fix condition to check partialText length
chore(abortMiddleware.js): add error logging when abortMessage fails
* refactor(MessageHeader.tsx): convert to TS
fix(Plugin.tsx): add default value for className prop in Plugin component
* refactor(MultiMessage.tsx): remove commented out code
docs(MultiMessage.tsx): update comment to clarify when siblingIdx is reset
* fix(GenerationButtons): optimistic state for continue button
* fix(MessageContent.tsx): add data-testid attribute to message text editor
fix(messages.spec.ts): update waitForServerStream function to include edit endpoint check
feat(messages.spec.ts): add test case for editing messages
* fix(HoverButtons & Message & useGenerations): Refactor edit functionality and related conditions
- Update enterEdit function signature and prop
- Create and utilize hideEditButton variable
- Enhance conditions for edit button visibility and active state
- Update button event handlers
- Introduce isEditableEndpoint in useGenerations and refine continueSupported condition.
* fix(useGenerations.ts): fix condition for hideEditButton to include error and searchResult
chore(data-provider): bump version to 0.1.6
fix(types.ts): add status property to TError type
* chore: bump @dqbd/tiktoken to 1.0.7
* fix(abortMiddleware.js): add required isCreatedByUser property to the error response object
* refactor(Message.tsx): remove unnecessary props from SiblingSwitch component, as setLatestMessage is firing on every switch already
refactor(SiblingSwitch.tsx): remove unused imports and code
* chore(BaseClient.js): move console.debug statements back inside if block
commit db77163f5d1e98a13dc8d05ee1907001840030c6
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 22 14:15:14 2023 +0200
docs: update chimeragpt (#826)
* Update free_ai_apis.md
* Update free_ai_apis.md
commit 4a4e803df3118effc2fb73b3d71766ac565c1e97
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 21 20:15:18 2023 +0200
style(Dialog): Improved Close Button ("X") position (#824)
commit 909b00c7521277e49e4cf7319cd237c27250bd28
Author: Daniel Avila <messagedaniel@protonmail.com>
Date: Sun Aug 20 21:04:36 2023 -0400
fix(HoverButtons): light/dark styling to match official site
commit 61dcb4d3073a74bc45020d4888d2120173b4eb22
Author: Naosuke Yokoe <ankerasoy@gmail.com>
Date: Sat Aug 19 20:11:31 2023 +0900
feat: Azure Cognitive Search Plugin (#815)
* feat(AzureCognitiveSearchPlugin)
* feat(tools/AzureCognitiveSearch.js): Add a new plugin (not structured
version)
* feat(tools/structured/AzureCognitiveSearch.js): Add a new plugin (structured version)
* feat(tools/manifest.json, tools/index.js, tools/util/handleTools.js):
Add configurations for the plugin
* feat(api/package.json, package-lock.json): Installed a new package for the
plugin (@azure/search-documents)
* feat(.env.example): Add new environment variables for the plugin
Here is the link to the corresponding discussion page:
https://github.com/danny-avila/LibreChat/discussions/567
* docs(AzureCognitiveSearchPlugin)
* docs(features/plugins/azure_cognitive_search.md): Add a new document
for the plugin
* (fix:.env.example)
* reverted extra whitespaces removed by the editor
* docs(mkdocs.yml)
* Add the Azure Cognitive Search Plugin's documentation item to
mkdocs.yml.
commit 3c7f67fa7674549ff877105f4bd5b532f17fef06
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:40:33 2023 -0400
fix(abortMiddleware): handle early abort error where userMessage.conversationId is undefined. In this case, the userId will be used as the abortKey
commit c74c68a135064b9cb79d9666e535a1b862a8de4f
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:10:30 2023 -0400
refactor(MessageHandler -> useServerStream): convert all relating files to TS and correct typings based on this change: properly refactor MessageHandler to a custom hook, where it's passed a submission object to instantiate the stream. This is the bare minimum groundwork for potentially having multiple streams running, which would be a big project to modularize a lot of the global state into maps/multiple streams, particular useful for having multiple views in place
commit 8b4d3c2c2170e91258176a2cdedc977b690395a5
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:04:29 2023 -0400
refactor(routes): convert to TS
commit d612cfcb45f74da51ed4342264e35d42b77b7e8e
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:02:39 2023 -0400
chore(Auth): reorder exports in Auth component
fix(PluginAuthForm): handle case when pluginKey is null or undefined
fix(PluginStoreDialog): handle case when getAvailablePluginFromKey is null or undefined
fix(AuthContext): make authConfig optional in AuthContextProvider
feat(hooks): add useServerStream hook
fix(conversation): setSubmission to null instead of empty object
fix(preset): specify type for presets atom
fix(search): specify type for isSearchEnabled atom
fix(submission): specify type for submission atom
commit c40b95f424ad7110aef13b10725a3e2a900cf42e
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 18 16:11:00 2023 +0200
feat: Disable Registration with social login (#813)
* Google, Github and Discord
* update .env.example with ALLOW_SOCIAL_REGISTRATION
* fix some conflict
* refactor strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit 46ed5aaccd26d657e16c0e318d54c55821ec0016
Author: Patrick <psarnowski@gmail.com>
Date: Fri Aug 18 09:38:24 2023 -0400
Show the response scores from Bing. (#814)
commit 1dacfa49f06e2ca00e3765ede5c7db050fa34353
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 17 20:32:31 2023 +0200
update profile picture (#792)
commit afd43afb60b230a00ce5a5effab900130252f5cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 17 12:50:05 2023 -0400
feat(GPT/Anthropic): Continue Regenerating & Generation Buttons (#808)
* feat(useMessageHandler.js/ts): Refactor and add features to handle user messages, support multiple endpoints/models, generate placeholder responses, regeneration, and stopGeneration function
fix(conversation.ts, buildTree.ts): Import TMessage type, handle null parentMessageId
feat(schemas.ts): Update and add schemas for various AI services, add default values, optional fields, and endpoint-to-schema mapping, create parseConvo function
chore(useMessageHandler.js, schemas.ts): Remove unused imports, variables, and chatGPT enum
* wip: add generation buttons
* refactor(cleanupPreset.ts): simplify cleanupPreset function
refactor(getDefaultConversation.js): remove unused code and simplify getDefaultConversation function
feat(utils): add getDefaultConversation function
This commit adds a new utility function called `getDefaultConversation` to the `client/src/utils/getDefaultConversation.ts` file. This function is responsible for generating a default conversation object based on the provided parameters.
The `getDefaultConversation` function takes in an object with the following properties:
- `conversation`: The conversation object to be used as a base.
- `endpointsConfig`: The configuration object containing information about the available endpoints.
- `preset`: An optional preset object that can be used to override the default behavior.
The function first tries to determine the target endpoint based on the preset object. If a valid endpoint is found, it is used as the target endpoint. If not, the function tries to retrieve the last conversation setup from the local storage and uses its endpoint if it is valid. If neither the preset nor the local storage contains a valid endpoint, the function falls back to a default endpoint.
Once the target endpoint is determined,
* fix(utils): remove console.error statement in buildDefaultConversation function
fix(schemas): add default values for catch blocks in openAISchema, googleSchema, bingAISchema, anthropicSchema, chatGPTBrowserSchema, and gptPluginsSchema
* fix: endpoint not changing on change of preset from other endpoint, wip: refactor
* refactor: preset items to TSX
* refactor: convert resetConvo to TS
* refactor(getDefaultConversation.ts): move defaultEndpoints array to the top of the file for better readability
refactor(getDefaultConversation.ts): extract getDefaultEndpoint function for better code organization and reusability
* feat(svg): add ContinueIcon component
feat(svg): add RegenerateIcon component
feat(svg): add ContinueIcon and RegenerateIcon components to index.ts
* feat(Button.tsx): add onClick and className props to Button component
feat(GenerationButtons.tsx): add logic to display Regenerate or StopGenerating button based on isSubmitting and messages
feat(Regenerate.tsx): create Regenerate component with RegenerateIcon and handleRegenerate function
feat(StopGenerating.tsx): create StopGenerating component with StopGeneratingIcon and handleStopGenerating function
* fix(TextChat.jsx): reorder imports and variables for better readability
fix(TextChat.jsx): fix typo in condition for isNotAppendable variable
fix(TextChat.jsx): remove unused handleStopGenerating function
fix(ContinueIcon.tsx): remove unnecessary closing tags for polygon elements
fix(useMessageHandler.ts): add missing type annotations for handleStopGenerating and handleRegenerate functions
fix(useMessageHandler.ts): remove unused variables in return statement
* fix(getDefaultConversation.ts): refactor code to use getLocalStorageItems function
feat(getLocalStorageItems.ts): add utility function to retrieve items from local storage
* fix(OpenAIClient.js): add support for streaming result in sendCompletion method
feat(OpenAIClient.js): add finish_reason metadata to opts in sendCompletion method
feat(Message.js): add finish_reason field to Message model
feat(messageSchema.js): add finish_reason field to messageSchema
feat(openAI.js): parse chatGptLabel and promptPrefix from req.body and pass rest of the modelOptions to endpointOption
feat(openAI.js): add addMetadata function to store metadata in ask function
feat(openAI.js): add metadata to response if available
feat(schemas.ts): add finish_reason field to tMessageSchema
* feat(types.ts): add TOnClick and TGenButtonProps types for button components
feat(Continue.tsx): create Continue component for generating button
feat(GenerationButtons.tsx): update GenerationButtons component to use Continue component
feat(Regenerate.tsx): create Regenerate component for regenerating button
feat(Stop.tsx): create Stop component for stop generating button
* feat(MessageHandler.jsx): add MessageHandler component to handle messages and conversations
fix(Root.jsx): fix import paths for Nav and MessageHandler components
* feat(useMessageHandler.ts): add support for generation parameter in ask function
feat(useMessageHandler.ts): add support for isEdited parameter in ask function
feat(useMessageHandler.ts): add support for continueGeneration function
fix(createPayload.ts): replace endpoint URL when isEdited parameter is true
* chore(client): set skipLibCheck to true in tsconfig.json
* fix(useMessageHandler.ts): remove unused clientId variable
fix(schemas.ts): make clientId field in tMessageSchema nullable and optional
* wip: edit route for continue generation
* refactor(api): move handlers to root of routes dir
* fix(useMessageHandler.ts): initialize currentMessages to an empty array if messages is null
fix(useMessageHandler.ts): update initialResponse text to use responseText variable
fix(useMessageHandler.ts): update setMessages logic for isRegenerate case
fix(MessageHandler.jsx): update setMessages logic for cancelHandler, createdHandler, and finalHandler
* fix(schemas.ts): make createdAt and updatedAt fields optional and set default values using new Date().toISOString()
fix(schemas.ts): change type annotation of TMessage from infer to input
* refactor(useMessageHandler.ts): rename AskProps type to TAskProps
refactor(useMessageHandler.ts): remove generation property from ask function arguments
refactor(useMessageHandler.ts): use nullish coalescing operator (??) instead of logical OR (||)
refactor(useMessageHandler.ts): pass the responseMessageId to message prop of submission
* fix(BaseClient.js): use nullish coalescing operator (??) instead of logical OR (||) for default values
* fix(BaseClient.js): fix responseMessageId assignment in handleStartMethods method
feat(BaseClient.js): add support for isEdited flag in sendMessage method
feat(BaseClient.js): add generation to responseMessage text in sendMessage method
* fix(openAI.js): remove unused imports and commented out code
feat(openAI.js): add support for generation parameter in request body
fix(openAI.js): remove console.log statement
fix(openAI.js): remove unused variables and parameters
fix(openAI.js): update response text in case of error
fix(openAI.js): handle error and abort message in case of error
fix(handlers.js): add generation parameter to createOnProgress function
fix(useMessageHandler.ts): update responseText variable to use generation parameter
* refactor(api/middleware): move inside server dir
* refactor: add endpoint specific, modular functions to build options and initialize clients, create server/utils, move middleware, separate utils into api general utils and server specific utils
* fix(abortMiddleware.js): import getConvo and getConvoTitle functions from models
feat(abortMiddleware.js): add abortAsk function to abortController to handle aborting of requests
fix(openAI.js): import buildOptions and initializeClient functions from endpoints/openAI
refactor(openAI.js): use getAbortData function to get data for abortAsk function
* refactor: move endpoint specific logic to an endpoints dir
* refactor(PluginService.js): fix import path for encrypt and decrypt functions in PluginService.js
* feat(openAI): add new endpoint for adding a title to a conversation
- Added a new file `addTitle.js` in the `api/server/routes/endpoints/openAI` directory.
- The `addTitle.js` file exports a function `addTitle` that takes in request parameters and performs the following actions:
- If the `parentMessageId` is `'00000000-0000-0000-0000-000000000000'` and `newConvo` is true, it proceeds with the following steps:
- Calls the `titleConvo` function from the `titleConvo` module, passing in the necessary parameters.
- Calls the `saveConvo` function from the `saveConvo` module, passing in the user ID and conversation details.
- Updated the `index.js` file in the `api/server/routes/endpoints/openAI` directory to export the `addTitle` function.
- This change adds
* fix(abortMiddleware.js): remove console.log statement
refactor(gptPlugins.js): update imports and function parameters
feat(gptPlugins.js): add support for abortController and getAbortData
refactor(openAI.js): update imports and function parameters
feat(openAI.js): add support for abortController and getAbortData
fix(openAI.js): refactor code to use modularized functions and middleware
fix(buildOptions.js): refactor code to use destructuring and update variable names
* refactor(askChatGPTBrowser.js, bingAI.js, google.js): remove duplicate code for setting response headers
feat(askChatGPTBrowser.js, bingAI.js, google.js): add setHeaders middleware to set response headers
* feat(middleware): validateEndpoint, refactor buildOption to only be concerned of endpointOption
* fix(abortMiddleware.js): add 'finish_reason' property with value 'incomplete' to responseMessage object
fix(abortMessage.js): remove console.log statement for aborted message
fix(handlers.js): modify tokens assignment to handle empty generation string and trailing space
* fix(BaseClient.js): import addSpaceIfNeeded function from server/utils
fix(BaseClient.js): add space before generation in text property
fix(index.js): remove getCitations and citeText exports
feat(buildEndpointOption.js): add buildEndpointOption middleware
fix(index.js): import buildEndpointOption middleware
fix(anthropic.js): remove buildOptions function and use endpointOption from req.body
fix(gptPlugins.js): remove buildOptions function and use endpointOption from req.body
fix(openAI.js): remove buildOptions function and use endpointOption from req.body
feat(utils): add citations.js and handleText.js modules
fix(utils): fix import statements in index.js module
* refactor(gptPlugins.js): use getResponseSender function from librechat-data-provider
* feat(gptPlugins): complete 'continue generating'
* wip: anthropic continue regen
* feat(middleware): add validateRegistration middleware
A new middleware function called `validateRegistration` has been added to the list of exported middleware functions in `index.js`. This middleware is responsible for validating registration data before allowing the registration process to proceed.
* feat(Anthropic): complete continue regen
* chore: add librechat-data-provider to api/package.json
* fix(ci): backend-review will mock meilisearch, also installs data-provider as now needed
* chore(ci): remove unneeded SEARCH env var
* style(GenerationButtons): make text shorter for sake of space economy, even though this diverges from chat.openai.com
* style(GenerationButtons/ScrollToBottom): adjust visibility/position based on screen size
* chore(client): 'Editting' typo
* feat(GenerationButtons.tsx): add support for endpoint prop in GenerationButtons component
feat(OptionsBar.tsx): pass endpoint prop to GenerationButtons component
feat(useGenerations.ts): create useGenerations hook to handle generation logic
fix(schemas.ts): add searchResult field to tMessageSchema
* refactor(HoverButtons): convert to TSX and utilize new useGenerations hook
* fix(abortMiddleware): handle error with res headers set, or abortController not found, to ensure proper API error is sent to the client, chore(BaseClient): remove console log for onStart message meant for debugging
* refactor(api): remove librechat-data-provider dep for now as it complicates deployed docker build stage, re-use code in CJS, located in server/endpoints/schemas
* chore: remove console.logs from test files
* ci: add backend tests for AnthropicClient, focusing on new buildMessages logic
* refactor(FakeClient): use actual BaseClient sendMessage method for testing
* test(BaseClient.test.js): add test for loading chat history
test(BaseClient.test.js): add test for sendMessage logic with isEdited flag
* fix(buildEndpointOption.js): add support for azureOpenAI in buildFunction object
wip(endpoints.js): fetch Azure models from Azure OpenAI API if opts.azure is true
* fix(Button.tsx): add data-testid attribute to button component
fix(SelectDropDown.tsx): add data-testid attribute to Listbox.Button component
fix(messages.spec.ts): add waitForServerStream function to consolidate logic for awaiting the server response
feat(messages.spec.ts): add test for stopping and continuing message and improve browser/page context order and closing
* refactor(onProgress): speed up time to save initial message for editable routes
* chore: disable AI message editing (for now), was accidentally allowed
* refactor: ensure continue is only supported for latest message style: improve styling in dark mode and across all hover buttons/icons, including making edit icon for AI invisible (for now)
* fix: add test id to generation buttons so they never resolve to 2+ items
* chore(package.json): add 'packages/' to the list of ignored directories
chore(data-provider/package.json): bump version to 0.1.5
commit ae5b7d3d53a39764c301ad24bf1b7bad216ab97b
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 15 18:27:54 2023 -0400
fix(PluginsClient.js): fix ChatOpenAI Azure Config Issue (#812)
* fix(PluginsClient.js): fix issue with creating LLM when using Azure
* chore(PluginsClient.js): omit azure logging
* refactor(PluginsClient.js): simplify assignment of azure variable
The code was simplified by directly assigning the value of `this.azure` to the `azure` variable using object destructuring. This makes the code cleaner and more concise.
commit b85f3bf91ec3951400029f58fa92ad1a762d19b0
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 15 18:42:24 2023 +0200
update from lang to localize (#810)
commit 80aab73bf6313bede6afa2fcae111930ddd673da
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:19:04 2023 -0400
chore: rebuilt package-lock file
commit bbe4931a9738eca84f8f91d5c753e74f93742671
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:13:24 2023 -0400
refactor(ScreenshotContext): use html-to-image for lighter bundle, faster processing
commit 74802dd720a49c3bc0dff32f5622d5610c6cf0c4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 14 17:51:03 2023 +0200
chore: Translation Fixes, Lint Error Corrections, and Additional Translations (#788)
* fix translation and small lint error
* changed from localize to useLocalize hook
* changed to useLocalize
commit b64cc71d8809a6e8c9e26ce8d4d0531ccff54803
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:23:00 2023 -0400
chore(docker-compose.yml): comment out meilisearch ports in docker-compose.yml (#807)
commit 89f260bc7895713f32cf1361b4912f3f893ecbe4
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:12:00 2023 -0400
fix(CodeBlock.tsx): fix copy-to-clipboard functionality. The code has been updated to use the copy function from the copy-to-clipboard library instead of the (#806)
avigator.clipboard.writeText method. This should fix the issue with browser incompatibility with navigator SDK and allow users to copy code from the CodeBlock component successfully.
commit d00c7354cd464ce17b0d47362621232cb6f88481
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 09:45:44 2023 -0400
fix: Corrected Registration Validation, Case-Insensitive Variable Handling, Playwright workflow (#805)
* feat(auth.js): add validation for registration endpoint using validateRegistration middleware
feat(validateRegistration.js): add middleware to validate registration based on ALLOW_REGISTRATION environment variable
* fix(config.js): fix registrationEnabled and socialLoginEnabled variables to handle case-insensitive environment variable values
* refactor(validateRegistration.js): remove console.log statement
* chore(playwright.yml): skip browser download during yarn install
chore(playwright.yml): place Playwright binaries to node_modules/@playwright/test
chore(playwright.yml): install Playwright dependencies using npx playwright install-deps
chore(playwright.yml): install Playwright chromium browser using npx playwright install chromium
chore(playwright.yml): install @playwright/test@latest using npm install -D @playwright/test@latest
chore(playwright.yml): run Playwright tests using npm run e2e:ci
* chore(playwright.yml): change npm install order and update comment
The order of the npm install commands in the "Install Playwright Browsers" step has been changed to first install @playwright/test@latest and then install chromium. Additionally, the comment explaining the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD variable has been updated to mention npm install instead of yarn install.
* chore(playwright.yml): remove commented out code for caching and add separate steps for installing Playwright dependencies and browsers
commit 1aa4b34dc6c914c2992bb50d39c9b7363f144cf4
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 11 19:02:52 2023 +0200
added the dot (.) username rules (#787)
commit 28230d9305e696f0200f1d3e4da3160dbf877374
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe0ac5bd72ebc1124a0d1d235f0a5685
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5aa8ae43576aa07cacf18697f6a3cc59
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d30500d9f027aed686d42cc229a618f9210
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675bef408fdb918250b151d6ad572a8067
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823585b1f4244e8c250ad184e4d136323
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d469cfabf272b96699902803bb827cb
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046362bfef9c2ee5fa1c5bf3f051d62a7
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487f462f16f23d75e839e3e3ca6ddc656
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161cfc8e413c6cf7355d49a11314f53eb
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082c6ada2cbaaf5c9521c53b6033afdf2
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a206771c15e3a2de65d8acca582d302e
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704fa59f99e3a770bf7302a977fe447a27
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546764fcf0852a54a4c72cf5aeb54247e
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e6c68bf22d060a014ec74285b160ef9
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f3814806031bd960ddd329283020469d20
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18640525bec17051e38dc408a1c9283e
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe4115698f426325741763ce612dfc302f3e72
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca97eb1e0f0d264b941dc8ad4f3e1c47
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1f9648458e93ebc7acdeefed59f9602
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a5690203129a15b544b1b935552277430b0090d5
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d46838f3a9868b44f88af6c1fd4aab72f77
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex …
* Update package-lock.json
* Update SubmitButton.tsx
* Update SpeechRecognition.tsx
* fix: typescript error
* style: moved to new UI
* fix:(SpeechRecognition) lint error
* moved everything to hooks
* feat: support stt external
* fix(useExternalSpeechRecognition): recording the audio
* feat: whisper api support
* refactor(SpeechReecognition); fix(HoverButtons): set isSpeakling correctly
* fix: spelling errors
* fix: renamed files
* BIG FIX
* feat: whisper support
* fixed some ChatForm bugs and added the tts route
* handling more errors
* Fix audio stream initialization and cleanup in useSpeechToTextExternal
* feat: Elevenlabs TTS
* fixed some req issues
* fix: stt not activating on Mac
* fix: send audio blob to frontend
* fix(ChatForm): startupConfig var
* Update text-to-speech and speech-to-text services
* handle more errors correctly
* Remove console.log statements
* feat: added manual trigger with button
* fix: SpeechToText and SpeechToTextExernal + AudioRecorder
* refactor: TTS component
* chore: removed unused variable
* feat: azure stt
* feat: dedicated speech panel
* feat: STT button switch: fix: TextArea pr value adapted
* refactor: textToSpeech function and useTextToSpeechMutation
* fix: typo data-service
* fix: blob backend to frontend
* feat: TTS button for external
* feat: librechat.yaml
* style: spinner when loading TTS
* feat: hold click to download file
* style: disabled when apiKey not provided
* fix: typo startupConfig?.speechToTextExternal
* style: update icons
* fix(useTextToSpeech): set isSpeaking when audio finish
* fix: small issues with local TTS
* style: update settings dark theme
* docs: STT & TTS
* WIP: chat audio automatic; docs(custom_config): update to new .yaml version; chore: updated librechat.yaml version
* fix: send button disabled
* fix: interval update
* localization
* removed unused test code
* revert interval update to 100
* feat: auto-send message
* fix: chat audio automatic, default false
* refactor: moved all logic to hooks
* chore: renamed ChatAudio to conversationMode
* refactor: organized Speech panel
* feat: autoSendText switch
* feat: moved chataudio to conversationMode and improved error handling; docs: update localai model
* refactor: Auto transcribe audio
* test: AutoSendTextSwitch, AutoTranscribeAudioSwitch and ConversationModeSwitch.spec: refactor: removed hark
* fix: various speechTab fixes
* refactor(useSpeechToTextBrowser):: handle more errors
* feat: engine select
* feat: advanced mode
* chore: converted hooks to TS
* feat: cache TTS
* feat: delete cache; fix: cache issues
* refactor(useTextToSpeechExternal): removed unused import
* feat: cache switch; refactor: moved to dir STT/TTS
* tests: CacheTTS, TextToSpeech, SpeechToText
* feat: custom elevenlabs compatibility
* fix(useTextToSpeechExternal): cache switch not working
* feat: animation for STT
* fix: settings var not working
* chore: remove unused var
* feat: voice dropdown; refactor: yaml changes
* fix(textToSpeech): remove undefined properties
* refactor: Remove console logs and unused variable
* fix: TTS; feat: support coqui and piper
* fix: some STT issues
* fix: stt test
* fix: STT backend sending wrong data
* BREAKING: switch to react-speech-recognition, add regenerator-runtime/runtime in main.jsx
* feat: websocket backend
* foundations for websocket
* first pass elevenlabs streaming
* streaming audio
* stream changes
* input streaming implementation
* fix: client build errors
* WIP: streaming rewrite
* audio stream working but not the loop
* WIP: looping audio stream working
* WIP tts routes rewrite
* feat: track SSE runs by runId, which enables us to better track audio streams per message request
* chore: set activeRunId on data.created
* rate limit tts and only allow once
* WIP: streaming audio
* refactor(useSSE): simplify messageId/parentMessageId assignment in message stream
* delete unused component
* streaming working
* first pass but need to investigate forever pending bug
* optimize audio stream handling client and initial request
* fix(StreamAudio): null exception
* refactor(tts): add limiters for db polling and timeout promise by intervals and not elapsed time
* refactor(textToSpeech): reduce polling delay
* feat(StreamAudio): add caching
* refactor: rename global variable, add setIsPlaying, remove mediasource ref
* feat: use custom hook for audioRef to help determine audio end state
* fix: voices mutation -> query
* fix: voices mutation -> query 2/2
* feat: successful TTS for manual playback
* fix: tts voice init
* feat: playback rate
* feat: global audio toggles
* chore: Add renderIcon function for chat message hover buttons, update schemas with notes
* chore: add debug logging instead of console.logs
* fix: edge case undefined user id
* feat: Automatic Playback switch
* feat: add caching bump data-provider
* chore: tts add auth
* use global state for audio run
* feat: assistants support for TTS read aloud
* ci: uncomment tests for now until they are refactored
* stream audio tests are WIP
* refactor: make automatic playback false as default
---------
Co-authored-by: bsu3338 <bsu3338@users.noreply.github.com>
Co-authored-by: bsu3338 <bsu3338@yahoo.com>
Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Co-authored-by: Berry-13 <marco13beretta@gmail.com>
Co-authored-by: Super User <root@Berry>
Co-authored-by: Marco Beretta <marco13beretta@proton.me>
2024-05-22 17:19:55 -04:00
|
|
|
|
|
|
|
export const textToSpeechManual = () => `${textToSpeech()}/manual`;
|
|
|
|
|
|
|
|
export const textToSpeechVoices = () => `${textToSpeech()}/voices`;
|
🗨️ feat: Prompts (#3131)
* 🗨️ feat: Prompts (#7)
* WIP: MERGE prompts/frontend (#1)
* added schema for prompt and promptgroup, added model methods for prompts, added routes for prompts
* * updated promptGroup Schema
* updated model methods for prompts (get, add, delete)
* slight fixes in prompt routes
* * Created Files Management components
* Created Vector Stores components
* Added file management route in the routes folder
* Completed UI for Files list, Compeleted UI for vector stores list, Completed UI for upload file modal, Completed UI for preview file, Completed UI for preview vector store
* Fixed style and UI fixes for file dashboard, file list and vector stores list
* added responsiveness classes for vector store page
* fixed responsiveness of file page, dashboard page, and main page
* fixed styling and responsiveness issues on dashboard page, file list page and vector store page
* added queries and mutations for prompts and promptGroups, added relevant endpoints in data-provider, added relevant components prompts, added and updated relevant APIs
* added types on mutation queries data service, updated prompt attributes
* feature: Prompts and prompt groups management, added relevant APIs, added types for data service/queries/mutations, added relevant mutation and queries
* chore: typing clarifications
* added drop down on prompts mgmt dashboard
* Fixes: fixed version switching issue on tags update or labels update, added cross button on create prompt group, fixed list updation on prompt group renaiming, added CSV upload button
* Feature: Added oneliner and category attributes in prompt group, added schema for categories, added schema methods and route for categories
* chore: typing and lint issues
* chore: more type and linter fixes
* chore: linting
* chore: prompt controller and backend typing example; MOVE TO CONTROLLER DIRECTORY
* chore: more type fixes
* style: prompt name changes
* chore: more type changes, and stateful prompt name change without flickering
* fix: Return result of savePrompt in patchPrompt API endpoint
* fix: navigation prompt queries; refactor: name 'prompt-groups' to just 'groups'
* refactor: fetch prompt groups rewrite
* refactor(prompts): query/mutation statefulness
* refactor: remove `isActive` field
* refactor: remove labels, consolidate logic
* style: width, layout shift
* refactor: improve hover toggle behavior and styling
* refactor: add useParams hook to PromptListItem for dynamic rendering and add timeout ref for blur timeout
* chore: hide upload button
* refactor: import Button component from correct location in PromptSidePanel
* style: prompt editor styling
* style: fix more layout shifts
* style: container scroll
* refactor: Rename CreatePrompt component to CreatePromptForm
* refactor: use react-hook-form
* refactor: Add Prompts components and routes to Dashboard
* style: skeletons for loading
* fix: optimize makePromptProduction
* refactor: consolidate variables
* feat: create prompt form validation
* refactor: Consolidate variables and update mutation hooks
* style: minor touchups
* chore: Update lucide-react npm dependency to version 0.394.0 and npm audit fix
* refactor: add a new icon for the Prompts heading.
* style: Update PromptsView heading to use h1 instead of h2 and other minor margin issues
* chore: wording
* refactor: Update PromptsView heading to use h1 instead of h2, consolidate variables, and add new icons
* refactor: Prompts Button for Mobile
* feature: added category field in prompt group, added relevant API and static data on BE to support FE UI for category in prompt group
* chore: template for prompt cards
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* WIP: Prompts/frontend Continued (#2)
* chore: loading style, remove unused component
* feat: Add CategorySelector component for prompt group category selection
* feat: add categories to create prompt
* feat: prompt versions styling
* feat: optimistic updates for prompt production state
* refactor: optimize form state and show if prompt field is dirty with cross icon, also other styling changes
* chore: remove unused code and localizations
* fix: light mode styling
* WIP: SidePanel Prompts
* refactor: move to groups directory
* refactor: rename GroupsSidePanel to GroupSidePanel and update imports
* style: ListCard
* refactor: isProduction changes
* refactor: infinite query with productionPrompt
* refactor: optimize snippets and prompts, and styling
* refactor: Update getSnippet function to accept a length parameter
* chore: localizations
* feat: prompts navigation to chat and vice versa
* fix: create prompt
* feat: remember last selected category for creating prompts
* fix(promptGroups): fix pagination and add usePromptGroupsNav hook
* Prompts/frontend 3 (#3)
* fix: stateful issues with prompt groups
* style: improved layout
* refactor: improve variable naming in Eng.ts
* refactor: theme selector styling improvements
* added prompt cards on chat new page, with dark mode, added API to fetch random prompts, added types for useQuery
Slightly improved usePromptGroupNav logic to fetch updated result for pageSize, updated prompt cards view with darkmode and responsiveness
fixed page size option buttons styling to match the theme
added dark mode on create prompt page and prompt edit/preview page
fixed page size option buttons styling to match the theme
added dark mode on create prompt page and prompt edit/preview page
* WIP: Prompts/frontend (#4)
* fix: optimize and fix paginated query
* fix: remove unique constraint on names
* refactor: button links and styling
* style: menu border light mode
* feat: Add Auto-Send Switch component for prompts groups
* refactor(ChatView): use form context for submission text
* chore: clear convo state on navigation to dashboard routes
* chore: save prompt edit name on tab, remove console log
* feat: basic prompt submission
* refactor: move Auto-Send Switch
* style(ListCard): border styling
* feat: Add function to detect variables in text
* feat: Add OriginalDialog component to UI library
* chore(ui): Update SelectDropDown options list class to use text-xs size
* refactor: submitMessage hook now includes submitPrompt, make compatible to document query selector
* WIP: Variable Dialog
* feat: variable submission working for both auto-send and non-autosend
* feat: dashboard breadcrumbs and prompts/chat navigation
* refactor: dashboard breadcrumb and dashboard link to chat navigation
* refactor: Update VariableDialog and VariableForm styles
* Prompts: Admin features (#5)
* fix: link issue
* fix: usePromptGroupsNav add missing dep.
* style: dashbreadcrumb and sidepanel text color
* temp fix: remove refetch on pageNumber change
* fix: handle multiple variable replacement
* WIP: create project schema and add project groups to fetch
* feat: Add functionality to add prompt group IDs to a project
* feat: Add caching for startup config in config route
* chore: remove prompt landing
* style: Update Skeleton component with additional background styling
* chore: styling and types
* WIP: SharePrompt first draft
* feat(SharePrompt): form validation
* feat: shared global indicators
* refactor: prompt details
* refactor: change NoPromptGroup directory
* feat: preview prompt
* feat: remove/add global prompts, add rbac-related enums
* refactor: manage prompts location
* WIP: first draft admin settings for prompts
* feat: SystemRoles enum
* refactor: update PromptDetails component styling
* style: ellipsis custom class for showing more preview text
* WIP: initial role schema and initialization
* style: improved margins for single unordered lists
* fix: use custom chat form context to prevent re-renders from FormProvider
* feat: Role mutations for Prompt Permissions
* feat: fetch user role
* feat: update AdminSettings form default values from user role values
* refactor: rename PromptPermissions to Permissions for general definitions
* feat: initial role checks
* feat: Add optional `bodyProps` parameter to generateCheckAccess middleware
* refactor: UI access checks
* Prompts: delete (#6)
* Fixed delete prompt version API, fixed types and logic for prompt version deletion, updated prompt delete mutation logic
* chore: Update return type of deletePrompt function in Prompt.js
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* chore: Update package-lock.json version to 0.7.4-rc1 and fast-xml-parser to 4.4.0
* feat: toast for saving admin settings, add timer no-access navigation
* feat: always make prod
* feat: Add localization to category labels in CategorySelector component
* feat: Update category label localization in CategorySelector component
* fix: Enable making prompt production in Prompt API
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* feat: Add helper fn for dark mode detection in ThemeProvider
* style: surface-primary definition
* fix(useHasAccess): utilize user.role and not just USER role
* fix: empty category and role fetch
* refactort: increase max height to options list and use label if no localization is found
* fix: update CategorySelector to handle empty category value and improve localization
* refactor: move prompts to own store/reactquery modules, add in filter WIP
* refactor: Rename AutoSendSwitch to AutoSendPrompt
* style: theming commit
* style: fix slight coloring issue for convos in dark mode
* style: better composition for prompts side panel
* style: remove gray-750 and make it gray-850
* chore: adjust theming
* feat: filter all prompt groups and properly remove prompts from projects
* refactor: optimize delete prompt groups further
* chore: localization
* feat: Add uniqueProperty filtering to normalizeData function
* WIP: filter prompts
* chore: Update FilterPrompts component to include User icon in FilterItem
* feat(FilterPrompts): set categories
* feat: more system filters and show selected category icon
* style: always make prod, flips switch to avoid mis-clicks
* style: ui/ux loading/no prompts
* chore: style FilterPrompts ChatView
* fix: handle missing role edge case
* style: special variables
* feat: special variables
* refactor: improve replaceSpecialVars function in prompts.ts
* feat: simple/advanced editor modes
* chore: bump versions
* feat: localizations and hide production button on simple mode
* fix: error connecting layout shift
* fix: prompts CRUD for admins
* fix: secure single group fetch
* style: sidepanel styling
* style(PromptName): bring edit button closer to name
* style: mobile prompts header
* style: mobile prompts header continued
* style: align send prompts switch right
* feat: description
* Update special variables description in Eng.ts
* feat: update/create/preview oneliner
* fix: allow empty oneliner update
* style: loading improvement and always make selected prompt Production if simple mode
* fix: production index set and remove unused props
* fix(ci): mock initializeRoles
* fix: address #3128
* fix: address #3128
* feat: add deletion confirmation dialog
* fix: mobile UI issues
* style: prompt library UI update
* style: focus, logcal tab order
* style: Refactor SelectDropDown component to improve code readability and maintainability
* chore: bump data-provider
* chore: fix labels
* refactor: confirm delete prompt version
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
2024-06-20 20:24:32 -04:00
|
|
|
|
2024-07-05 17:13:34 +03:00
|
|
|
export const getCustomConfigSpeech = () => `${speech()}/config/get`;
|
|
|
|
|
🗨️ feat: Prompts (#3131)
* 🗨️ feat: Prompts (#7)
* WIP: MERGE prompts/frontend (#1)
* added schema for prompt and promptgroup, added model methods for prompts, added routes for prompts
* * updated promptGroup Schema
* updated model methods for prompts (get, add, delete)
* slight fixes in prompt routes
* * Created Files Management components
* Created Vector Stores components
* Added file management route in the routes folder
* Completed UI for Files list, Compeleted UI for vector stores list, Completed UI for upload file modal, Completed UI for preview file, Completed UI for preview vector store
* Fixed style and UI fixes for file dashboard, file list and vector stores list
* added responsiveness classes for vector store page
* fixed responsiveness of file page, dashboard page, and main page
* fixed styling and responsiveness issues on dashboard page, file list page and vector store page
* added queries and mutations for prompts and promptGroups, added relevant endpoints in data-provider, added relevant components prompts, added and updated relevant APIs
* added types on mutation queries data service, updated prompt attributes
* feature: Prompts and prompt groups management, added relevant APIs, added types for data service/queries/mutations, added relevant mutation and queries
* chore: typing clarifications
* added drop down on prompts mgmt dashboard
* Fixes: fixed version switching issue on tags update or labels update, added cross button on create prompt group, fixed list updation on prompt group renaiming, added CSV upload button
* Feature: Added oneliner and category attributes in prompt group, added schema for categories, added schema methods and route for categories
* chore: typing and lint issues
* chore: more type and linter fixes
* chore: linting
* chore: prompt controller and backend typing example; MOVE TO CONTROLLER DIRECTORY
* chore: more type fixes
* style: prompt name changes
* chore: more type changes, and stateful prompt name change without flickering
* fix: Return result of savePrompt in patchPrompt API endpoint
* fix: navigation prompt queries; refactor: name 'prompt-groups' to just 'groups'
* refactor: fetch prompt groups rewrite
* refactor(prompts): query/mutation statefulness
* refactor: remove `isActive` field
* refactor: remove labels, consolidate logic
* style: width, layout shift
* refactor: improve hover toggle behavior and styling
* refactor: add useParams hook to PromptListItem for dynamic rendering and add timeout ref for blur timeout
* chore: hide upload button
* refactor: import Button component from correct location in PromptSidePanel
* style: prompt editor styling
* style: fix more layout shifts
* style: container scroll
* refactor: Rename CreatePrompt component to CreatePromptForm
* refactor: use react-hook-form
* refactor: Add Prompts components and routes to Dashboard
* style: skeletons for loading
* fix: optimize makePromptProduction
* refactor: consolidate variables
* feat: create prompt form validation
* refactor: Consolidate variables and update mutation hooks
* style: minor touchups
* chore: Update lucide-react npm dependency to version 0.394.0 and npm audit fix
* refactor: add a new icon for the Prompts heading.
* style: Update PromptsView heading to use h1 instead of h2 and other minor margin issues
* chore: wording
* refactor: Update PromptsView heading to use h1 instead of h2, consolidate variables, and add new icons
* refactor: Prompts Button for Mobile
* feature: added category field in prompt group, added relevant API and static data on BE to support FE UI for category in prompt group
* chore: template for prompt cards
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* WIP: Prompts/frontend Continued (#2)
* chore: loading style, remove unused component
* feat: Add CategorySelector component for prompt group category selection
* feat: add categories to create prompt
* feat: prompt versions styling
* feat: optimistic updates for prompt production state
* refactor: optimize form state and show if prompt field is dirty with cross icon, also other styling changes
* chore: remove unused code and localizations
* fix: light mode styling
* WIP: SidePanel Prompts
* refactor: move to groups directory
* refactor: rename GroupsSidePanel to GroupSidePanel and update imports
* style: ListCard
* refactor: isProduction changes
* refactor: infinite query with productionPrompt
* refactor: optimize snippets and prompts, and styling
* refactor: Update getSnippet function to accept a length parameter
* chore: localizations
* feat: prompts navigation to chat and vice versa
* fix: create prompt
* feat: remember last selected category for creating prompts
* fix(promptGroups): fix pagination and add usePromptGroupsNav hook
* Prompts/frontend 3 (#3)
* fix: stateful issues with prompt groups
* style: improved layout
* refactor: improve variable naming in Eng.ts
* refactor: theme selector styling improvements
* added prompt cards on chat new page, with dark mode, added API to fetch random prompts, added types for useQuery
Slightly improved usePromptGroupNav logic to fetch updated result for pageSize, updated prompt cards view with darkmode and responsiveness
fixed page size option buttons styling to match the theme
added dark mode on create prompt page and prompt edit/preview page
fixed page size option buttons styling to match the theme
added dark mode on create prompt page and prompt edit/preview page
* WIP: Prompts/frontend (#4)
* fix: optimize and fix paginated query
* fix: remove unique constraint on names
* refactor: button links and styling
* style: menu border light mode
* feat: Add Auto-Send Switch component for prompts groups
* refactor(ChatView): use form context for submission text
* chore: clear convo state on navigation to dashboard routes
* chore: save prompt edit name on tab, remove console log
* feat: basic prompt submission
* refactor: move Auto-Send Switch
* style(ListCard): border styling
* feat: Add function to detect variables in text
* feat: Add OriginalDialog component to UI library
* chore(ui): Update SelectDropDown options list class to use text-xs size
* refactor: submitMessage hook now includes submitPrompt, make compatible to document query selector
* WIP: Variable Dialog
* feat: variable submission working for both auto-send and non-autosend
* feat: dashboard breadcrumbs and prompts/chat navigation
* refactor: dashboard breadcrumb and dashboard link to chat navigation
* refactor: Update VariableDialog and VariableForm styles
* Prompts: Admin features (#5)
* fix: link issue
* fix: usePromptGroupsNav add missing dep.
* style: dashbreadcrumb and sidepanel text color
* temp fix: remove refetch on pageNumber change
* fix: handle multiple variable replacement
* WIP: create project schema and add project groups to fetch
* feat: Add functionality to add prompt group IDs to a project
* feat: Add caching for startup config in config route
* chore: remove prompt landing
* style: Update Skeleton component with additional background styling
* chore: styling and types
* WIP: SharePrompt first draft
* feat(SharePrompt): form validation
* feat: shared global indicators
* refactor: prompt details
* refactor: change NoPromptGroup directory
* feat: preview prompt
* feat: remove/add global prompts, add rbac-related enums
* refactor: manage prompts location
* WIP: first draft admin settings for prompts
* feat: SystemRoles enum
* refactor: update PromptDetails component styling
* style: ellipsis custom class for showing more preview text
* WIP: initial role schema and initialization
* style: improved margins for single unordered lists
* fix: use custom chat form context to prevent re-renders from FormProvider
* feat: Role mutations for Prompt Permissions
* feat: fetch user role
* feat: update AdminSettings form default values from user role values
* refactor: rename PromptPermissions to Permissions for general definitions
* feat: initial role checks
* feat: Add optional `bodyProps` parameter to generateCheckAccess middleware
* refactor: UI access checks
* Prompts: delete (#6)
* Fixed delete prompt version API, fixed types and logic for prompt version deletion, updated prompt delete mutation logic
* chore: Update return type of deletePrompt function in Prompt.js
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* chore: Update package-lock.json version to 0.7.4-rc1 and fast-xml-parser to 4.4.0
* feat: toast for saving admin settings, add timer no-access navigation
* feat: always make prod
* feat: Add localization to category labels in CategorySelector component
* feat: Update category label localization in CategorySelector component
* fix: Enable making prompt production in Prompt API
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* feat: Add helper fn for dark mode detection in ThemeProvider
* style: surface-primary definition
* fix(useHasAccess): utilize user.role and not just USER role
* fix: empty category and role fetch
* refactort: increase max height to options list and use label if no localization is found
* fix: update CategorySelector to handle empty category value and improve localization
* refactor: move prompts to own store/reactquery modules, add in filter WIP
* refactor: Rename AutoSendSwitch to AutoSendPrompt
* style: theming commit
* style: fix slight coloring issue for convos in dark mode
* style: better composition for prompts side panel
* style: remove gray-750 and make it gray-850
* chore: adjust theming
* feat: filter all prompt groups and properly remove prompts from projects
* refactor: optimize delete prompt groups further
* chore: localization
* feat: Add uniqueProperty filtering to normalizeData function
* WIP: filter prompts
* chore: Update FilterPrompts component to include User icon in FilterItem
* feat(FilterPrompts): set categories
* feat: more system filters and show selected category icon
* style: always make prod, flips switch to avoid mis-clicks
* style: ui/ux loading/no prompts
* chore: style FilterPrompts ChatView
* fix: handle missing role edge case
* style: special variables
* feat: special variables
* refactor: improve replaceSpecialVars function in prompts.ts
* feat: simple/advanced editor modes
* chore: bump versions
* feat: localizations and hide production button on simple mode
* fix: error connecting layout shift
* fix: prompts CRUD for admins
* fix: secure single group fetch
* style: sidepanel styling
* style(PromptName): bring edit button closer to name
* style: mobile prompts header
* style: mobile prompts header continued
* style: align send prompts switch right
* feat: description
* Update special variables description in Eng.ts
* feat: update/create/preview oneliner
* fix: allow empty oneliner update
* style: loading improvement and always make selected prompt Production if simple mode
* fix: production index set and remove unused props
* fix(ci): mock initializeRoles
* fix: address #3128
* fix: address #3128
* feat: add deletion confirmation dialog
* fix: mobile UI issues
* style: prompt library UI update
* style: focus, logcal tab order
* style: Refactor SelectDropDown component to improve code readability and maintainability
* chore: bump data-provider
* chore: fix labels
* refactor: confirm delete prompt version
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
2024-06-20 20:24:32 -04:00
|
|
|
export const getPromptGroup = (_id: string) => `${prompts()}/groups/${_id}`;
|
|
|
|
|
|
|
|
export const getPromptGroupsWithFilters = (filter: object) => {
|
|
|
|
let url = `${prompts()}/groups`;
|
|
|
|
if (Object.keys(filter).length > 0) {
|
|
|
|
const queryParams = new URLSearchParams(filter as Record<string, string>).toString();
|
|
|
|
url += `?${queryParams}`;
|
|
|
|
}
|
|
|
|
return url;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const getPromptsWithFilters = (filter: object) => {
|
|
|
|
let url = prompts();
|
|
|
|
if (Object.keys(filter).length > 0) {
|
|
|
|
const queryParams = new URLSearchParams(filter as Record<string, string>).toString();
|
|
|
|
url += `?${queryParams}`;
|
|
|
|
}
|
|
|
|
return url;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const getPrompt = (_id: string) => `${prompts()}/${_id}`;
|
|
|
|
|
|
|
|
export const getRandomPrompts = (limit: number, skip: number) =>
|
|
|
|
`${prompts()}/random?limit=${limit}&skip=${skip}`;
|
|
|
|
|
|
|
|
export const postPrompt = prompts;
|
|
|
|
|
|
|
|
export const updatePromptGroup = getPromptGroup;
|
|
|
|
|
|
|
|
export const updatePromptLabels = (_id: string) => `${getPrompt(_id)}/labels`;
|
|
|
|
|
|
|
|
export const updatePromptTag = (_id: string) => `${getPrompt(_id)}/tags/production`;
|
|
|
|
|
|
|
|
export const deletePromptGroup = getPromptGroup;
|
|
|
|
|
|
|
|
export const deletePrompt = ({ _id, groupId }: { _id: string; groupId: string }) => {
|
|
|
|
return `${prompts()}/${_id}?groupId=${groupId}`;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const getCategories = () => '/api/categories';
|
|
|
|
|
2024-06-27 17:34:48 -04:00
|
|
|
export const getAllPromptGroups = () => `${prompts()}/all`;
|
|
|
|
|
🗨️ feat: Prompts (#3131)
* 🗨️ feat: Prompts (#7)
* WIP: MERGE prompts/frontend (#1)
* added schema for prompt and promptgroup, added model methods for prompts, added routes for prompts
* * updated promptGroup Schema
* updated model methods for prompts (get, add, delete)
* slight fixes in prompt routes
* * Created Files Management components
* Created Vector Stores components
* Added file management route in the routes folder
* Completed UI for Files list, Compeleted UI for vector stores list, Completed UI for upload file modal, Completed UI for preview file, Completed UI for preview vector store
* Fixed style and UI fixes for file dashboard, file list and vector stores list
* added responsiveness classes for vector store page
* fixed responsiveness of file page, dashboard page, and main page
* fixed styling and responsiveness issues on dashboard page, file list page and vector store page
* added queries and mutations for prompts and promptGroups, added relevant endpoints in data-provider, added relevant components prompts, added and updated relevant APIs
* added types on mutation queries data service, updated prompt attributes
* feature: Prompts and prompt groups management, added relevant APIs, added types for data service/queries/mutations, added relevant mutation and queries
* chore: typing clarifications
* added drop down on prompts mgmt dashboard
* Fixes: fixed version switching issue on tags update or labels update, added cross button on create prompt group, fixed list updation on prompt group renaiming, added CSV upload button
* Feature: Added oneliner and category attributes in prompt group, added schema for categories, added schema methods and route for categories
* chore: typing and lint issues
* chore: more type and linter fixes
* chore: linting
* chore: prompt controller and backend typing example; MOVE TO CONTROLLER DIRECTORY
* chore: more type fixes
* style: prompt name changes
* chore: more type changes, and stateful prompt name change without flickering
* fix: Return result of savePrompt in patchPrompt API endpoint
* fix: navigation prompt queries; refactor: name 'prompt-groups' to just 'groups'
* refactor: fetch prompt groups rewrite
* refactor(prompts): query/mutation statefulness
* refactor: remove `isActive` field
* refactor: remove labels, consolidate logic
* style: width, layout shift
* refactor: improve hover toggle behavior and styling
* refactor: add useParams hook to PromptListItem for dynamic rendering and add timeout ref for blur timeout
* chore: hide upload button
* refactor: import Button component from correct location in PromptSidePanel
* style: prompt editor styling
* style: fix more layout shifts
* style: container scroll
* refactor: Rename CreatePrompt component to CreatePromptForm
* refactor: use react-hook-form
* refactor: Add Prompts components and routes to Dashboard
* style: skeletons for loading
* fix: optimize makePromptProduction
* refactor: consolidate variables
* feat: create prompt form validation
* refactor: Consolidate variables and update mutation hooks
* style: minor touchups
* chore: Update lucide-react npm dependency to version 0.394.0 and npm audit fix
* refactor: add a new icon for the Prompts heading.
* style: Update PromptsView heading to use h1 instead of h2 and other minor margin issues
* chore: wording
* refactor: Update PromptsView heading to use h1 instead of h2, consolidate variables, and add new icons
* refactor: Prompts Button for Mobile
* feature: added category field in prompt group, added relevant API and static data on BE to support FE UI for category in prompt group
* chore: template for prompt cards
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* WIP: Prompts/frontend Continued (#2)
* chore: loading style, remove unused component
* feat: Add CategorySelector component for prompt group category selection
* feat: add categories to create prompt
* feat: prompt versions styling
* feat: optimistic updates for prompt production state
* refactor: optimize form state and show if prompt field is dirty with cross icon, also other styling changes
* chore: remove unused code and localizations
* fix: light mode styling
* WIP: SidePanel Prompts
* refactor: move to groups directory
* refactor: rename GroupsSidePanel to GroupSidePanel and update imports
* style: ListCard
* refactor: isProduction changes
* refactor: infinite query with productionPrompt
* refactor: optimize snippets and prompts, and styling
* refactor: Update getSnippet function to accept a length parameter
* chore: localizations
* feat: prompts navigation to chat and vice versa
* fix: create prompt
* feat: remember last selected category for creating prompts
* fix(promptGroups): fix pagination and add usePromptGroupsNav hook
* Prompts/frontend 3 (#3)
* fix: stateful issues with prompt groups
* style: improved layout
* refactor: improve variable naming in Eng.ts
* refactor: theme selector styling improvements
* added prompt cards on chat new page, with dark mode, added API to fetch random prompts, added types for useQuery
Slightly improved usePromptGroupNav logic to fetch updated result for pageSize, updated prompt cards view with darkmode and responsiveness
fixed page size option buttons styling to match the theme
added dark mode on create prompt page and prompt edit/preview page
fixed page size option buttons styling to match the theme
added dark mode on create prompt page and prompt edit/preview page
* WIP: Prompts/frontend (#4)
* fix: optimize and fix paginated query
* fix: remove unique constraint on names
* refactor: button links and styling
* style: menu border light mode
* feat: Add Auto-Send Switch component for prompts groups
* refactor(ChatView): use form context for submission text
* chore: clear convo state on navigation to dashboard routes
* chore: save prompt edit name on tab, remove console log
* feat: basic prompt submission
* refactor: move Auto-Send Switch
* style(ListCard): border styling
* feat: Add function to detect variables in text
* feat: Add OriginalDialog component to UI library
* chore(ui): Update SelectDropDown options list class to use text-xs size
* refactor: submitMessage hook now includes submitPrompt, make compatible to document query selector
* WIP: Variable Dialog
* feat: variable submission working for both auto-send and non-autosend
* feat: dashboard breadcrumbs and prompts/chat navigation
* refactor: dashboard breadcrumb and dashboard link to chat navigation
* refactor: Update VariableDialog and VariableForm styles
* Prompts: Admin features (#5)
* fix: link issue
* fix: usePromptGroupsNav add missing dep.
* style: dashbreadcrumb and sidepanel text color
* temp fix: remove refetch on pageNumber change
* fix: handle multiple variable replacement
* WIP: create project schema and add project groups to fetch
* feat: Add functionality to add prompt group IDs to a project
* feat: Add caching for startup config in config route
* chore: remove prompt landing
* style: Update Skeleton component with additional background styling
* chore: styling and types
* WIP: SharePrompt first draft
* feat(SharePrompt): form validation
* feat: shared global indicators
* refactor: prompt details
* refactor: change NoPromptGroup directory
* feat: preview prompt
* feat: remove/add global prompts, add rbac-related enums
* refactor: manage prompts location
* WIP: first draft admin settings for prompts
* feat: SystemRoles enum
* refactor: update PromptDetails component styling
* style: ellipsis custom class for showing more preview text
* WIP: initial role schema and initialization
* style: improved margins for single unordered lists
* fix: use custom chat form context to prevent re-renders from FormProvider
* feat: Role mutations for Prompt Permissions
* feat: fetch user role
* feat: update AdminSettings form default values from user role values
* refactor: rename PromptPermissions to Permissions for general definitions
* feat: initial role checks
* feat: Add optional `bodyProps` parameter to generateCheckAccess middleware
* refactor: UI access checks
* Prompts: delete (#6)
* Fixed delete prompt version API, fixed types and logic for prompt version deletion, updated prompt delete mutation logic
* chore: Update return type of deletePrompt function in Prompt.js
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* chore: Update package-lock.json version to 0.7.4-rc1 and fast-xml-parser to 4.4.0
* feat: toast for saving admin settings, add timer no-access navigation
* feat: always make prod
* feat: Add localization to category labels in CategorySelector component
* feat: Update category label localization in CategorySelector component
* fix: Enable making prompt production in Prompt API
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* feat: Add helper fn for dark mode detection in ThemeProvider
* style: surface-primary definition
* fix(useHasAccess): utilize user.role and not just USER role
* fix: empty category and role fetch
* refactort: increase max height to options list and use label if no localization is found
* fix: update CategorySelector to handle empty category value and improve localization
* refactor: move prompts to own store/reactquery modules, add in filter WIP
* refactor: Rename AutoSendSwitch to AutoSendPrompt
* style: theming commit
* style: fix slight coloring issue for convos in dark mode
* style: better composition for prompts side panel
* style: remove gray-750 and make it gray-850
* chore: adjust theming
* feat: filter all prompt groups and properly remove prompts from projects
* refactor: optimize delete prompt groups further
* chore: localization
* feat: Add uniqueProperty filtering to normalizeData function
* WIP: filter prompts
* chore: Update FilterPrompts component to include User icon in FilterItem
* feat(FilterPrompts): set categories
* feat: more system filters and show selected category icon
* style: always make prod, flips switch to avoid mis-clicks
* style: ui/ux loading/no prompts
* chore: style FilterPrompts ChatView
* fix: handle missing role edge case
* style: special variables
* feat: special variables
* refactor: improve replaceSpecialVars function in prompts.ts
* feat: simple/advanced editor modes
* chore: bump versions
* feat: localizations and hide production button on simple mode
* fix: error connecting layout shift
* fix: prompts CRUD for admins
* fix: secure single group fetch
* style: sidepanel styling
* style(PromptName): bring edit button closer to name
* style: mobile prompts header
* style: mobile prompts header continued
* style: align send prompts switch right
* feat: description
* Update special variables description in Eng.ts
* feat: update/create/preview oneliner
* fix: allow empty oneliner update
* style: loading improvement and always make selected prompt Production if simple mode
* fix: production index set and remove unused props
* fix(ci): mock initializeRoles
* fix: address #3128
* fix: address #3128
* feat: add deletion confirmation dialog
* fix: mobile UI issues
* style: prompt library UI update
* style: focus, logcal tab order
* style: Refactor SelectDropDown component to improve code readability and maintainability
* chore: bump data-provider
* chore: fix labels
* refactor: confirm delete prompt version
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
2024-06-20 20:24:32 -04:00
|
|
|
/* Roles */
|
|
|
|
export const roles = () => '/api/roles';
|
|
|
|
export const getRole = (roleName: string) => `${roles()}/${roleName.toLowerCase()}`;
|
🎉 feat: Code Interpreter API and Agents Release (#4860)
* feat: Code Interpreter API & File Search Agent Uploads
chore: add back code files
wip: first pass, abstract key dialog
refactor: influence checkbox on key changes
refactor: update localization keys for 'execute code' to 'run code'
wip: run code button
refactor: add throwError parameter to loadAuthValues and getUserPluginAuthValue functions
feat: first pass, API tool calling
fix: handle missing toolId in callTool function and return 404 for non-existent tools
feat: show code outputs
fix: improve error handling in callTool function and log errors
fix: handle potential null value for filepath in attachment destructuring
fix: normalize language before rendering and prevent null return
fix: add loading indicator in RunCode component while executing code
feat: add support for conditional code execution in Markdown components
feat: attachments
refactor: remove bash
fix: pass abort signal to graph/run
refactor: debounce and rate limit tool call
refactor: increase debounce delay for execute function
feat: set code output attachments
feat: image attachments
refactor: apply message context
refactor: pass `partIndex`
feat: toolCall schema/model/methods
feat: block indexing
feat: get tool calls
chore: imports
chore: typing
chore: condense type imports
feat: get tool calls
fix: block indexing
chore: typing
refactor: update tool calls mapping to support multiple results
fix: add unique key to nav link for rendering
wip: first pass, tool call results
refactor: update query cache from successful tool call mutation
style: improve result switcher styling
chore: note on using \`.toObject()\`
feat: add agent_id field to conversation schema
chore: typing
refactor: rename agentMap to agentsMap for consistency
feat: Agent Name as chat input placeholder
chore: bump agents
📦 chore: update @langchain dependencies to latest versions to match agents package
📦 chore: update @librechat/agents dependency to version 1.8.0
fix: Aborting agent stream removes sender; fix(bedrock): completion removes preset name label
refactor: remove direct file parameter to use req.file, add `processAgentFileUpload` for image uploads
feat: upload menu
feat: prime message_file resources
feat: implement conversation access validation in chat route
refactor: remove file parameter from processFileUpload and use req.file instead
feat: add savedMessageIds set to track saved message IDs in BaseClient, to prevent unnecessary double-write to db
feat: prevent duplicate message saves by checking savedMessageIds in AgentController
refactor: skip legacy RAG API handling for agents
feat: add files field to convoSchema
refactor: update request type annotations from Express.Request to ServerRequest in file processing functions
feat: track conversation files
fix: resendFiles, addPreviousAttachments handling
feat: add ID validation for session_id and file_id in download route
feat: entity_id for code file uploads/downloads
fix: code file edge cases
feat: delete related tool calls
feat: add stream rate handling for LLM configuration
feat: enhance system content with attached file information
fix: improve error logging in resource priming function
* WIP: PoC, sequential agents
WIP: PoC Sequential Agents, first pass content data + bump agents package
fix: package-lock
WIP: PoC, o1 support, refactor bufferString
feat: convertJsonSchemaToZod
fix: form issues and schema defining erroneous model
fix: max length issue on agent form instructions, limit conversation messages to sequential agents
feat: add abort signal support to createRun function and AgentClient
feat: PoC, hide prior sequential agent steps
fix: update parameter naming from config to metadata in event handlers for clarity, add model to usage data
refactor: use only last contentData, track model for usage data
chore: bump agents package
fix: content parts issue
refactor: filter contentParts to include tool calls and relevant indices
feat: show function calls
refactor: filter context messages to exclude tool calls when no tools are available to the agent
fix: ensure tool call content is not undefined in formatMessages
feat: add agent_id field to conversationPreset schema
feat: hide sequential agents
feat: increase upload toast duration to 10 seconds
* refactor: tool context handling & update Code API Key Dialog
feat: toolContextMap
chore: skipSpecs -> useSpecs
ci: fix handleTools tests
feat: API Key Dialog
* feat: Agent Permissions Admin Controls
feat: replace label with button for prompt permission toggle
feat: update agent permissions
feat: enable experimental agents and streamline capability configuration
feat: implement access control for agents and enhance endpoint menu items
feat: add welcome message for agent selection in localization
feat: add agents permission to access control and update version to 0.7.57
* fix: update types in useAssistantListMap and useMentions hooks for better null handling
* feat: mention agents
* fix: agent tool resource race conditions when deleting agent tool resource files
* feat: add error handling for code execution with user feedback
* refactor: rename AdminControls to AdminSettings for clarity
* style: add gap to button in AdminSettings for improved layout
* refactor: separate agent query hooks and check access to enable fetching
* fix: remove unused provider from agent initialization options, creates issue with custom endpoints
* refactor: remove redundant/deprecated modelOptions from AgentClient processes
* chore: update @librechat/agents to version 1.8.5 in package.json and package-lock.json
* fix: minor styling issues + agent panel uniformity
* fix: agent edge cases when set endpoint is no longer defined
* refactor: remove unused cleanup function call from AppService
* fix: update link in ApiKeyDialog to point to pricing page
* fix: improve type handling and layout calculations in SidePanel component
* fix: add missing localization string for agent selection in SidePanel
* chore: form styling and localizations for upload filesearch/code interpreter
* fix: model selection placeholder logic in AgentConfig component
* style: agent capabilities
* fix: add localization for provider selection and improve dropdown styling in ModelPanel
* refactor: use gpt-4o-mini > gpt-3.5-turbo
* fix: agents configuration for loadDefaultInterface and update related tests
* feat: DALLE Agents support
2024-12-04 15:48:13 -05:00
|
|
|
export const updatePromptPermissions = (roleName: string) => `${getRole(roleName)}/prompts`;
|
🧠 feat: User Memories for Conversational Context (#7760)
* 🧠 feat: User Memories for Conversational Context
chore: mcp typing, use `t`
WIP: first pass, Memories UI
- Added MemoryViewer component for displaying, editing, and deleting user memories.
- Integrated data provider hooks for fetching, updating, and deleting memories.
- Implemented pagination and loading states for better user experience.
- Created unit tests for MemoryViewer to ensure functionality and interaction with data provider.
- Updated translation files to include new UI strings related to memories.
chore: move mcp-related files to own directory
chore: rename librechat-mcp to librechat-api
WIP: first pass, memory processing and data schemas
chore: linting in fileSearch.js query description
chore: rename librechat-api to @librechat/api across the project
WIP: first pass, functional memory agent
feat: add MemoryEditDialog and MemoryViewer components for managing user memories
- Introduced MemoryEditDialog for editing memory entries with validation and toast notifications.
- Updated MemoryViewer to support editing and deleting memories, including pagination and loading states.
- Enhanced data provider to handle memory updates with optional original key for better management.
- Added new localization strings for memory-related UI elements.
feat: add memory permissions management
- Implemented memory permissions in the backend, allowing roles to have specific permissions for using, creating, updating, and reading memories.
- Added new API endpoints for updating memory permissions associated with roles.
- Created a new AdminSettings component for managing memory permissions in the frontend.
- Integrated memory permissions into the existing roles and permissions schemas.
- Updated the interface to include memory settings and permissions.
- Enhanced the MemoryViewer component to conditionally render admin settings based on user roles.
- Added localization support for memory permissions in the translation files.
feat: move AdminSettings component to a new position in MemoryViewer for better visibility
refactor: clean up commented code in MemoryViewer component
feat: enhance MemoryViewer with search functionality and improve MemoryEditDialog integration
- Added a search input to filter memories in the MemoryViewer component.
- Refactored MemoryEditDialog to accept children for better customization.
- Updated MemoryViewer to utilize the new EditMemoryButton and DeleteMemoryButton components for editing and deleting memories.
- Improved localization support by adding new strings for memory filtering and deletion confirmation.
refactor: optimize memory filtering in MemoryViewer using match-sorter
- Replaced manual filtering logic with match-sorter for improved search functionality.
- Enhanced performance and readability of the filteredMemories computation.
feat: enhance MemoryEditDialog with triggerRef and improve updateMemory mutation handling
feat: implement access control for MemoryEditDialog and MemoryViewer components
refactor: remove commented out code and create runMemory method
refactor: rename role based files
feat: implement access control for memory usage in AgentClient
refactor: simplify checkVisionRequest method in AgentClient by removing commented-out code
refactor: make `agents` dir in api package
refactor: migrate Azure utilities to TypeScript and consolidate imports
refactor: move sanitizeFilename function to a new file and update imports, add related tests
refactor: update LLM configuration types and consolidate Azure options in the API package
chore: linting
chore: import order
refactor: replace getLLMConfig with getOpenAIConfig and remove unused LLM configuration file
chore: update winston-daily-rotate-file to version 5.0.0 and add object-hash dependency in package-lock.json
refactor: move primeResources and optionalChainWithEmptyCheck functions to resources.ts and update imports
refactor: move createRun function to a new run.ts file and update related imports
fix: ensure safeAttachments is correctly typed as an array of TFile
chore: add node-fetch dependency and refactor fetch-related functions into packages/api/utils, removing the old generators file
refactor: enhance TEndpointOption type by using Pick to streamline endpoint fields and add new properties for model parameters and client options
feat: implement initializeOpenAIOptions function and update OpenAI types for enhanced configuration handling
fix: update types due to new TEndpointOption typing
fix: ensure safe access to group parameters in initializeOpenAIOptions function
fix: remove redundant API key validation comment in initializeOpenAIOptions function
refactor: rename initializeOpenAIOptions to initializeOpenAI for consistency and update related documentation
refactor: decouple req.body fields and tool loading from initializeAgentOptions
chore: linting
refactor: adjust column widths in MemoryViewer for improved layout
refactor: simplify agent initialization by creating loadAgent function and removing unused code
feat: add memory configuration loading and validation functions
WIP: first pass, memory processing with config
feat: implement memory callback and artifact handling
feat: implement memory artifacts display and processing updates
feat: add memory configuration options and schema validation for validKeys
fix: update MemoryEditDialog and MemoryViewer to handle memory state and display improvements
refactor: remove padding from BookmarkTable and MemoryViewer headers for consistent styling
WIP: initial tokenLimit config and move Tokenizer to @librechat/api
refactor: update mongoMeili plugin methods to use callback for better error handling
feat: enhance memory management with token tracking and usage metrics
- Added token counting for memory entries to enforce limits and provide usage statistics.
- Updated memory retrieval and update routes to include total token usage and limit.
- Enhanced MemoryEditDialog and MemoryViewer components to display memory usage and token information.
- Refactored memory processing functions to handle token limits and provide feedback on memory capacity.
feat: implement memory artifact handling in attachment handler
- Enhanced useAttachmentHandler to process memory artifacts when receiving updates.
- Introduced handleMemoryArtifact utility to manage memory updates and deletions.
- Updated query client to reflect changes in memory state based on incoming data.
refactor: restructure web search key extraction logic
- Moved the logic for extracting API keys from the webSearchAuth configuration into a dedicated function, getWebSearchKeys.
- Updated webSearchKeys to utilize the new function for improved clarity and maintainability.
- Prevents build time errors
feat: add personalization settings and memory preferences management
- Introduced a new Personalization tab in settings to manage user memory preferences.
- Implemented API endpoints and client-side logic for updating memory preferences.
- Enhanced user interface components to reflect personalization options and memory usage.
- Updated permissions to allow users to opt out of memory features.
- Added localization support for new settings and messages related to personalization.
style: personalization switch class
feat: add PersonalizationIcon and align Side Panel UI
feat: implement memory creation functionality
- Added a new API endpoint for creating memory entries, including validation for key and value.
- Introduced MemoryCreateDialog component for user interface to facilitate memory creation.
- Integrated token limit checks to prevent exceeding user memory capacity.
- Updated MemoryViewer to include a button for opening the memory creation dialog.
- Enhanced localization support for new messages related to memory creation.
feat: enhance message processing with configurable window size
- Updated AgentClient to use a configurable message window size for processing messages.
- Introduced messageWindowSize option in memory configuration schema with a default value of 5.
- Improved logic for selecting messages to process based on the configured window size.
chore: update librechat-data-provider version to 0.7.87 in package.json and package-lock.json
chore: remove OpenAPIPlugin and its associated tests
chore: remove MIGRATION_README.md as migration tasks are completed
ci: fix backend tests
chore: remove unused translation keys from localization file
chore: remove problematic test file and unused var in AgentClient
chore: remove unused import and import directly for JSDoc
* feat: add api package build stage in Dockerfile for improved modularity
* docs: reorder build steps in contributing guide for clarity
2025-06-07 18:52:22 -04:00
|
|
|
export const updateMemoryPermissions = (roleName: string) => `${getRole(roleName)}/memories`;
|
🎉 feat: Code Interpreter API and Agents Release (#4860)
* feat: Code Interpreter API & File Search Agent Uploads
chore: add back code files
wip: first pass, abstract key dialog
refactor: influence checkbox on key changes
refactor: update localization keys for 'execute code' to 'run code'
wip: run code button
refactor: add throwError parameter to loadAuthValues and getUserPluginAuthValue functions
feat: first pass, API tool calling
fix: handle missing toolId in callTool function and return 404 for non-existent tools
feat: show code outputs
fix: improve error handling in callTool function and log errors
fix: handle potential null value for filepath in attachment destructuring
fix: normalize language before rendering and prevent null return
fix: add loading indicator in RunCode component while executing code
feat: add support for conditional code execution in Markdown components
feat: attachments
refactor: remove bash
fix: pass abort signal to graph/run
refactor: debounce and rate limit tool call
refactor: increase debounce delay for execute function
feat: set code output attachments
feat: image attachments
refactor: apply message context
refactor: pass `partIndex`
feat: toolCall schema/model/methods
feat: block indexing
feat: get tool calls
chore: imports
chore: typing
chore: condense type imports
feat: get tool calls
fix: block indexing
chore: typing
refactor: update tool calls mapping to support multiple results
fix: add unique key to nav link for rendering
wip: first pass, tool call results
refactor: update query cache from successful tool call mutation
style: improve result switcher styling
chore: note on using \`.toObject()\`
feat: add agent_id field to conversation schema
chore: typing
refactor: rename agentMap to agentsMap for consistency
feat: Agent Name as chat input placeholder
chore: bump agents
📦 chore: update @langchain dependencies to latest versions to match agents package
📦 chore: update @librechat/agents dependency to version 1.8.0
fix: Aborting agent stream removes sender; fix(bedrock): completion removes preset name label
refactor: remove direct file parameter to use req.file, add `processAgentFileUpload` for image uploads
feat: upload menu
feat: prime message_file resources
feat: implement conversation access validation in chat route
refactor: remove file parameter from processFileUpload and use req.file instead
feat: add savedMessageIds set to track saved message IDs in BaseClient, to prevent unnecessary double-write to db
feat: prevent duplicate message saves by checking savedMessageIds in AgentController
refactor: skip legacy RAG API handling for agents
feat: add files field to convoSchema
refactor: update request type annotations from Express.Request to ServerRequest in file processing functions
feat: track conversation files
fix: resendFiles, addPreviousAttachments handling
feat: add ID validation for session_id and file_id in download route
feat: entity_id for code file uploads/downloads
fix: code file edge cases
feat: delete related tool calls
feat: add stream rate handling for LLM configuration
feat: enhance system content with attached file information
fix: improve error logging in resource priming function
* WIP: PoC, sequential agents
WIP: PoC Sequential Agents, first pass content data + bump agents package
fix: package-lock
WIP: PoC, o1 support, refactor bufferString
feat: convertJsonSchemaToZod
fix: form issues and schema defining erroneous model
fix: max length issue on agent form instructions, limit conversation messages to sequential agents
feat: add abort signal support to createRun function and AgentClient
feat: PoC, hide prior sequential agent steps
fix: update parameter naming from config to metadata in event handlers for clarity, add model to usage data
refactor: use only last contentData, track model for usage data
chore: bump agents package
fix: content parts issue
refactor: filter contentParts to include tool calls and relevant indices
feat: show function calls
refactor: filter context messages to exclude tool calls when no tools are available to the agent
fix: ensure tool call content is not undefined in formatMessages
feat: add agent_id field to conversationPreset schema
feat: hide sequential agents
feat: increase upload toast duration to 10 seconds
* refactor: tool context handling & update Code API Key Dialog
feat: toolContextMap
chore: skipSpecs -> useSpecs
ci: fix handleTools tests
feat: API Key Dialog
* feat: Agent Permissions Admin Controls
feat: replace label with button for prompt permission toggle
feat: update agent permissions
feat: enable experimental agents and streamline capability configuration
feat: implement access control for agents and enhance endpoint menu items
feat: add welcome message for agent selection in localization
feat: add agents permission to access control and update version to 0.7.57
* fix: update types in useAssistantListMap and useMentions hooks for better null handling
* feat: mention agents
* fix: agent tool resource race conditions when deleting agent tool resource files
* feat: add error handling for code execution with user feedback
* refactor: rename AdminControls to AdminSettings for clarity
* style: add gap to button in AdminSettings for improved layout
* refactor: separate agent query hooks and check access to enable fetching
* fix: remove unused provider from agent initialization options, creates issue with custom endpoints
* refactor: remove redundant/deprecated modelOptions from AgentClient processes
* chore: update @librechat/agents to version 1.8.5 in package.json and package-lock.json
* fix: minor styling issues + agent panel uniformity
* fix: agent edge cases when set endpoint is no longer defined
* refactor: remove unused cleanup function call from AppService
* fix: update link in ApiKeyDialog to point to pricing page
* fix: improve type handling and layout calculations in SidePanel component
* fix: add missing localization string for agent selection in SidePanel
* chore: form styling and localizations for upload filesearch/code interpreter
* fix: model selection placeholder logic in AgentConfig component
* style: agent capabilities
* fix: add localization for provider selection and improve dropdown styling in ModelPanel
* refactor: use gpt-4o-mini > gpt-3.5-turbo
* fix: agents configuration for loadDefaultInterface and update related tests
* feat: DALLE Agents support
2024-12-04 15:48:13 -05:00
|
|
|
export const updateAgentPermissions = (roleName: string) => `${getRole(roleName)}/agents`;
|
2024-07-29 07:45:59 -07:00
|
|
|
|
|
|
|
/* Conversation Tags */
|
2024-09-21 09:06:02 -04:00
|
|
|
export const conversationTags = (tag?: string) =>
|
|
|
|
`/api/tags${tag != null && tag ? `/${encodeURIComponent(tag)}` : ''}`;
|
2024-07-29 07:45:59 -07:00
|
|
|
|
|
|
|
export const conversationTagsList = (pageNumber: string, sort?: string, order?: string) =>
|
|
|
|
`${conversationTags()}/list?pageNumber=${pageNumber}${sort ? `&sort=${sort}` : ''}${
|
|
|
|
order ? `&order=${order}` : ''
|
|
|
|
}`;
|
|
|
|
|
|
|
|
export const addTagToConversation = (conversationId: string) =>
|
2024-08-22 17:09:05 -04:00
|
|
|
`${conversationTags()}/convo/${conversationId}`;
|
2024-08-31 22:08:04 +02:00
|
|
|
|
|
|
|
export const userTerms = () => '/api/user/terms';
|
|
|
|
export const acceptUserTerms = () => '/api/user/terms/accept';
|
2024-09-11 06:34:25 -07:00
|
|
|
export const banner = () => '/api/banner';
|
2025-02-18 01:09:36 +01:00
|
|
|
|
2025-05-30 18:16:34 +02:00
|
|
|
// Message Feedback
|
|
|
|
export const feedback = (conversationId: string, messageId: string) =>
|
|
|
|
`/api/messages/${conversationId}/${messageId}/feedback`;
|
|
|
|
|
2025-02-18 01:09:36 +01:00
|
|
|
// Two-Factor Endpoints
|
|
|
|
export const enableTwoFactor = () => '/api/auth/2fa/enable';
|
|
|
|
export const verifyTwoFactor = () => '/api/auth/2fa/verify';
|
|
|
|
export const confirmTwoFactor = () => '/api/auth/2fa/confirm';
|
|
|
|
export const disableTwoFactor = () => '/api/auth/2fa/disable';
|
|
|
|
export const regenerateBackupCodes = () => '/api/auth/2fa/backup/regenerate';
|
2025-04-15 10:04:00 +02:00
|
|
|
export const verifyTwoFactorTemp = () => '/api/auth/2fa/verify-temp';
|
🧠 feat: User Memories for Conversational Context (#7760)
* 🧠 feat: User Memories for Conversational Context
chore: mcp typing, use `t`
WIP: first pass, Memories UI
- Added MemoryViewer component for displaying, editing, and deleting user memories.
- Integrated data provider hooks for fetching, updating, and deleting memories.
- Implemented pagination and loading states for better user experience.
- Created unit tests for MemoryViewer to ensure functionality and interaction with data provider.
- Updated translation files to include new UI strings related to memories.
chore: move mcp-related files to own directory
chore: rename librechat-mcp to librechat-api
WIP: first pass, memory processing and data schemas
chore: linting in fileSearch.js query description
chore: rename librechat-api to @librechat/api across the project
WIP: first pass, functional memory agent
feat: add MemoryEditDialog and MemoryViewer components for managing user memories
- Introduced MemoryEditDialog for editing memory entries with validation and toast notifications.
- Updated MemoryViewer to support editing and deleting memories, including pagination and loading states.
- Enhanced data provider to handle memory updates with optional original key for better management.
- Added new localization strings for memory-related UI elements.
feat: add memory permissions management
- Implemented memory permissions in the backend, allowing roles to have specific permissions for using, creating, updating, and reading memories.
- Added new API endpoints for updating memory permissions associated with roles.
- Created a new AdminSettings component for managing memory permissions in the frontend.
- Integrated memory permissions into the existing roles and permissions schemas.
- Updated the interface to include memory settings and permissions.
- Enhanced the MemoryViewer component to conditionally render admin settings based on user roles.
- Added localization support for memory permissions in the translation files.
feat: move AdminSettings component to a new position in MemoryViewer for better visibility
refactor: clean up commented code in MemoryViewer component
feat: enhance MemoryViewer with search functionality and improve MemoryEditDialog integration
- Added a search input to filter memories in the MemoryViewer component.
- Refactored MemoryEditDialog to accept children for better customization.
- Updated MemoryViewer to utilize the new EditMemoryButton and DeleteMemoryButton components for editing and deleting memories.
- Improved localization support by adding new strings for memory filtering and deletion confirmation.
refactor: optimize memory filtering in MemoryViewer using match-sorter
- Replaced manual filtering logic with match-sorter for improved search functionality.
- Enhanced performance and readability of the filteredMemories computation.
feat: enhance MemoryEditDialog with triggerRef and improve updateMemory mutation handling
feat: implement access control for MemoryEditDialog and MemoryViewer components
refactor: remove commented out code and create runMemory method
refactor: rename role based files
feat: implement access control for memory usage in AgentClient
refactor: simplify checkVisionRequest method in AgentClient by removing commented-out code
refactor: make `agents` dir in api package
refactor: migrate Azure utilities to TypeScript and consolidate imports
refactor: move sanitizeFilename function to a new file and update imports, add related tests
refactor: update LLM configuration types and consolidate Azure options in the API package
chore: linting
chore: import order
refactor: replace getLLMConfig with getOpenAIConfig and remove unused LLM configuration file
chore: update winston-daily-rotate-file to version 5.0.0 and add object-hash dependency in package-lock.json
refactor: move primeResources and optionalChainWithEmptyCheck functions to resources.ts and update imports
refactor: move createRun function to a new run.ts file and update related imports
fix: ensure safeAttachments is correctly typed as an array of TFile
chore: add node-fetch dependency and refactor fetch-related functions into packages/api/utils, removing the old generators file
refactor: enhance TEndpointOption type by using Pick to streamline endpoint fields and add new properties for model parameters and client options
feat: implement initializeOpenAIOptions function and update OpenAI types for enhanced configuration handling
fix: update types due to new TEndpointOption typing
fix: ensure safe access to group parameters in initializeOpenAIOptions function
fix: remove redundant API key validation comment in initializeOpenAIOptions function
refactor: rename initializeOpenAIOptions to initializeOpenAI for consistency and update related documentation
refactor: decouple req.body fields and tool loading from initializeAgentOptions
chore: linting
refactor: adjust column widths in MemoryViewer for improved layout
refactor: simplify agent initialization by creating loadAgent function and removing unused code
feat: add memory configuration loading and validation functions
WIP: first pass, memory processing with config
feat: implement memory callback and artifact handling
feat: implement memory artifacts display and processing updates
feat: add memory configuration options and schema validation for validKeys
fix: update MemoryEditDialog and MemoryViewer to handle memory state and display improvements
refactor: remove padding from BookmarkTable and MemoryViewer headers for consistent styling
WIP: initial tokenLimit config and move Tokenizer to @librechat/api
refactor: update mongoMeili plugin methods to use callback for better error handling
feat: enhance memory management with token tracking and usage metrics
- Added token counting for memory entries to enforce limits and provide usage statistics.
- Updated memory retrieval and update routes to include total token usage and limit.
- Enhanced MemoryEditDialog and MemoryViewer components to display memory usage and token information.
- Refactored memory processing functions to handle token limits and provide feedback on memory capacity.
feat: implement memory artifact handling in attachment handler
- Enhanced useAttachmentHandler to process memory artifacts when receiving updates.
- Introduced handleMemoryArtifact utility to manage memory updates and deletions.
- Updated query client to reflect changes in memory state based on incoming data.
refactor: restructure web search key extraction logic
- Moved the logic for extracting API keys from the webSearchAuth configuration into a dedicated function, getWebSearchKeys.
- Updated webSearchKeys to utilize the new function for improved clarity and maintainability.
- Prevents build time errors
feat: add personalization settings and memory preferences management
- Introduced a new Personalization tab in settings to manage user memory preferences.
- Implemented API endpoints and client-side logic for updating memory preferences.
- Enhanced user interface components to reflect personalization options and memory usage.
- Updated permissions to allow users to opt out of memory features.
- Added localization support for new settings and messages related to personalization.
style: personalization switch class
feat: add PersonalizationIcon and align Side Panel UI
feat: implement memory creation functionality
- Added a new API endpoint for creating memory entries, including validation for key and value.
- Introduced MemoryCreateDialog component for user interface to facilitate memory creation.
- Integrated token limit checks to prevent exceeding user memory capacity.
- Updated MemoryViewer to include a button for opening the memory creation dialog.
- Enhanced localization support for new messages related to memory creation.
feat: enhance message processing with configurable window size
- Updated AgentClient to use a configurable message window size for processing messages.
- Introduced messageWindowSize option in memory configuration schema with a default value of 5.
- Improved logic for selecting messages to process based on the configured window size.
chore: update librechat-data-provider version to 0.7.87 in package.json and package-lock.json
chore: remove OpenAPIPlugin and its associated tests
chore: remove MIGRATION_README.md as migration tasks are completed
ci: fix backend tests
chore: remove unused translation keys from localization file
chore: remove problematic test file and unused var in AgentClient
chore: remove unused import and import directly for JSDoc
* feat: add api package build stage in Dockerfile for improved modularity
* docs: reorder build steps in contributing guide for clarity
2025-06-07 18:52:22 -04:00
|
|
|
|
|
|
|
/* Memories */
|
|
|
|
export const memories = () => '/api/memories';
|
|
|
|
export const memory = (key: string) => `${memories()}/${encodeURIComponent(key)}`;
|
|
|
|
export const memoryPreferences = () => `${memories()}/preferences`;
|
2025-07-25 00:03:23 -04:00
|
|
|
|
2025-06-23 10:22:27 -04:00
|
|
|
export const searchPrincipals = (params: q.PrincipalSearchParams) => {
|
|
|
|
const { q: query, limit, type } = params;
|
|
|
|
let url = `/api/permissions/search-principals?q=${encodeURIComponent(query)}`;
|
|
|
|
|
|
|
|
if (limit !== undefined) {
|
|
|
|
url += `&limit=${limit}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (type !== undefined) {
|
|
|
|
url += `&type=${type}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
return url;
|
|
|
|
};
|
|
|
|
|
🔧 refactor: Organize Sharing/Agent Components and Improve Type Safety
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids, rename enums to PascalCase
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids
chore: move sharing related components to dedicated "Sharing" directory
chore: remove PublicSharingToggle component and update index exports
chore: move non-sidepanel agent components to `~/components/Agents`
chore: move AgentCategoryDisplay component with tests
chore: remove commented out code
refactor: change PERMISSION_BITS from const to enum for better type safety
refactor: reorganize imports in GenericGrantAccessDialog and update index exports for hooks
refactor: update type definitions to use ACCESS_ROLE_IDS for improved type safety
refactor: remove unused canAccessPromptResource middleware and related code
refactor: remove unused prompt access roles from createAccessRoleMethods
refactor: update resourceType in AclEntry type definition to remove unused 'prompt' value
refactor: introduce ResourceType enum and update resourceType usage across data provider files for improved type safety
refactor: update resourceType usage to ResourceType enum across sharing and permissions components for improved type safety
refactor: standardize resourceType usage to ResourceType enum across agent and prompt models, permissions controller, and middleware for enhanced type safety
refactor: update resourceType references from PROMPT_GROUP to PROMPTGROUP for consistency across models, middleware, and components
refactor: standardize access role IDs and resource type usage across agent, file, and prompt models for improved type safety and consistency
chore: add typedefs for TUpdateResourcePermissionsRequest and TUpdateResourcePermissionsResponse to enhance type definitions
chore: move SearchPicker to PeoplePicker dir
refactor: implement debouncing for query changes in SearchPicker for improved performance
chore: fix typing, import order for agent admin settings
fix: agent admin settings, prevent agent form submission
refactor: rename `ACCESS_ROLE_IDS` to `AccessRoleIds`
refactor: replace PermissionBits with PERMISSION_BITS
refactor: replace PERMISSION_BITS with PermissionBits
2025-07-28 17:52:36 -04:00
|
|
|
export const getAccessRoles = (resourceType: ResourceType) =>
|
|
|
|
`/api/permissions/${resourceType}/roles`;
|
2025-06-23 10:22:27 -04:00
|
|
|
|
🔧 refactor: Organize Sharing/Agent Components and Improve Type Safety
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids, rename enums to PascalCase
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids
chore: move sharing related components to dedicated "Sharing" directory
chore: remove PublicSharingToggle component and update index exports
chore: move non-sidepanel agent components to `~/components/Agents`
chore: move AgentCategoryDisplay component with tests
chore: remove commented out code
refactor: change PERMISSION_BITS from const to enum for better type safety
refactor: reorganize imports in GenericGrantAccessDialog and update index exports for hooks
refactor: update type definitions to use ACCESS_ROLE_IDS for improved type safety
refactor: remove unused canAccessPromptResource middleware and related code
refactor: remove unused prompt access roles from createAccessRoleMethods
refactor: update resourceType in AclEntry type definition to remove unused 'prompt' value
refactor: introduce ResourceType enum and update resourceType usage across data provider files for improved type safety
refactor: update resourceType usage to ResourceType enum across sharing and permissions components for improved type safety
refactor: standardize resourceType usage to ResourceType enum across agent and prompt models, permissions controller, and middleware for enhanced type safety
refactor: update resourceType references from PROMPT_GROUP to PROMPTGROUP for consistency across models, middleware, and components
refactor: standardize access role IDs and resource type usage across agent, file, and prompt models for improved type safety and consistency
chore: add typedefs for TUpdateResourcePermissionsRequest and TUpdateResourcePermissionsResponse to enhance type definitions
chore: move SearchPicker to PeoplePicker dir
refactor: implement debouncing for query changes in SearchPicker for improved performance
chore: fix typing, import order for agent admin settings
fix: agent admin settings, prevent agent form submission
refactor: rename `ACCESS_ROLE_IDS` to `AccessRoleIds`
refactor: replace PermissionBits with PERMISSION_BITS
refactor: replace PERMISSION_BITS with PermissionBits
2025-07-28 17:52:36 -04:00
|
|
|
export const getResourcePermissions = (resourceType: ResourceType, resourceId: string) =>
|
2025-06-23 10:22:27 -04:00
|
|
|
`/api/permissions/${resourceType}/${resourceId}`;
|
|
|
|
|
🔧 refactor: Organize Sharing/Agent Components and Improve Type Safety
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids, rename enums to PascalCase
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids
chore: move sharing related components to dedicated "Sharing" directory
chore: remove PublicSharingToggle component and update index exports
chore: move non-sidepanel agent components to `~/components/Agents`
chore: move AgentCategoryDisplay component with tests
chore: remove commented out code
refactor: change PERMISSION_BITS from const to enum for better type safety
refactor: reorganize imports in GenericGrantAccessDialog and update index exports for hooks
refactor: update type definitions to use ACCESS_ROLE_IDS for improved type safety
refactor: remove unused canAccessPromptResource middleware and related code
refactor: remove unused prompt access roles from createAccessRoleMethods
refactor: update resourceType in AclEntry type definition to remove unused 'prompt' value
refactor: introduce ResourceType enum and update resourceType usage across data provider files for improved type safety
refactor: update resourceType usage to ResourceType enum across sharing and permissions components for improved type safety
refactor: standardize resourceType usage to ResourceType enum across agent and prompt models, permissions controller, and middleware for enhanced type safety
refactor: update resourceType references from PROMPT_GROUP to PROMPTGROUP for consistency across models, middleware, and components
refactor: standardize access role IDs and resource type usage across agent, file, and prompt models for improved type safety and consistency
chore: add typedefs for TUpdateResourcePermissionsRequest and TUpdateResourcePermissionsResponse to enhance type definitions
chore: move SearchPicker to PeoplePicker dir
refactor: implement debouncing for query changes in SearchPicker for improved performance
chore: fix typing, import order for agent admin settings
fix: agent admin settings, prevent agent form submission
refactor: rename `ACCESS_ROLE_IDS` to `AccessRoleIds`
refactor: replace PermissionBits with PERMISSION_BITS
refactor: replace PERMISSION_BITS with PermissionBits
2025-07-28 17:52:36 -04:00
|
|
|
export const updateResourcePermissions = (resourceType: ResourceType, resourceId: string) =>
|
2025-06-23 10:22:27 -04:00
|
|
|
`/api/permissions/${resourceType}/${resourceId}`;
|
|
|
|
|
🔧 refactor: Organize Sharing/Agent Components and Improve Type Safety
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids, rename enums to PascalCase
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids
chore: move sharing related components to dedicated "Sharing" directory
chore: remove PublicSharingToggle component and update index exports
chore: move non-sidepanel agent components to `~/components/Agents`
chore: move AgentCategoryDisplay component with tests
chore: remove commented out code
refactor: change PERMISSION_BITS from const to enum for better type safety
refactor: reorganize imports in GenericGrantAccessDialog and update index exports for hooks
refactor: update type definitions to use ACCESS_ROLE_IDS for improved type safety
refactor: remove unused canAccessPromptResource middleware and related code
refactor: remove unused prompt access roles from createAccessRoleMethods
refactor: update resourceType in AclEntry type definition to remove unused 'prompt' value
refactor: introduce ResourceType enum and update resourceType usage across data provider files for improved type safety
refactor: update resourceType usage to ResourceType enum across sharing and permissions components for improved type safety
refactor: standardize resourceType usage to ResourceType enum across agent and prompt models, permissions controller, and middleware for enhanced type safety
refactor: update resourceType references from PROMPT_GROUP to PROMPTGROUP for consistency across models, middleware, and components
refactor: standardize access role IDs and resource type usage across agent, file, and prompt models for improved type safety and consistency
chore: add typedefs for TUpdateResourcePermissionsRequest and TUpdateResourcePermissionsResponse to enhance type definitions
chore: move SearchPicker to PeoplePicker dir
refactor: implement debouncing for query changes in SearchPicker for improved performance
chore: fix typing, import order for agent admin settings
fix: agent admin settings, prevent agent form submission
refactor: rename `ACCESS_ROLE_IDS` to `AccessRoleIds`
refactor: replace PermissionBits with PERMISSION_BITS
refactor: replace PERMISSION_BITS with PermissionBits
2025-07-28 17:52:36 -04:00
|
|
|
export const getEffectivePermissions = (resourceType: ResourceType, resourceId: string) =>
|
2025-06-23 10:22:27 -04:00
|
|
|
`/api/permissions/${resourceType}/${resourceId}/effective`;
|
|
|
|
|
2025-07-25 00:03:23 -04:00
|
|
|
// SharePoint Graph API Token
|
|
|
|
export const graphToken = (scopes: string) =>
|
|
|
|
`/api/auth/graph-token?scopes=${encodeURIComponent(scopes)}`;
|