* refactor(extractBaseURL): add handling for all possible Cloudflare AI Gateway endpoints
* chore: added endpointoption todo for updating type and optimizing handling app-wide
* feat(azureUtils):
- `genAzureChatCompletion`: allow optional client pass to update azure property
- `constructAzureURL`: optionally replace placeholders for instance and deployment names of an azure baseURL
- add tests for module
* refactor(extractBaseURL): return entire input when cloudflare `azure-openai` suffix detected
- also add more tests for both construct and extract URL
* refactor(genAzureChatCompletion): only allow omitting instance name if baseURL is not set
* refactor(initializeClient): determine `reverseProxyUrl` based on endpoint (azure or openai)
* refactor: utitlize `constructAzureURL` when `AZURE_OPENAI_BASEURL` is set
* docs: update docs on `AZURE_OPENAI_BASEURL`
* fix(ci): update expected error message for `azureUtils` tests
* 👤add: Username instead of 'You' when sending messages.
* 🌎: Added a new translation for 'You' and updated the existing translation for Spanish.
* fix: remove "!"
* Added: New setting Account for show username in messages
chore (StopButon and SendButon): Updated to new style of ChatGPT
chore Update and Added news translations: Spanish, English and Portuguese Brazilian
* fix: message component definition and imports order, remove unnecessary useEffect and localStorage set, fix localStorage key in store
* chore: update readme.md
* chore: optimize condition for messageLabel
* chore(Message.tsx): remove empty blocks
---------
Co-authored-by: Raí Santos <140329135+itzraiss@users.noreply.github.com>
* feat(DALL-E-3/DALL-E-2): Azure OpenAI support. New Version specific environment credentials:
- DALLEx_SYSTEM_PROMPT=
- DALLEx_AZURE_API_VERSION=
- DALLEx_BASEURL=
- DALLEx_API_KEY=
- replace `x` with `3` or `2`
* docs: update docs based on new env vars and Azure OpenAI support for DALL-E
* docs: breaking change for user provided DALLE_API_KEY:
- **DALL-E Update**: user-provided keys for DALL-E are now specific to each DALL-E version, i.e.: and
- Note: will work for both DALL-E-3 and DALL-E-2 when the admin provides the credential; in other words, this may only affect your users if DALLE_API_KEY is not set in the file. In this case, they will simply have to uninstall the plugin, and provide their API key again.
* refactor: use process.env at runtime instead of from memory to fix testing DALLE3.spec.js, adjust test
* add the IntelliJ Idea config file to .gitignore
* Update the docs for using a user created key and restricting mongodb IP access to public IP addresses
* chore: fix `endpoint` typescript issues and typo in console info message
* feat(api): files GET endpoint and save only file_id references to messages
* refactor(client): `useGetFiles` query hook, update file types, optimistic update of filesQuery on file upload
* refactor(buildTree): update to use params object and accept fileMap
* feat: map files to messages; refactor(ChatView): messages only available after files are fetched
* fix: fetch files only when authenticated
* feat(api): AppService
- rename app.locals.configs to app.locals.paths
- load custom config use fileStrategy from yaml config in app.locals
* refactor: separate Firebase and Local strategies, call based on config
* refactor: modularize file strategies and employ with use of DALL-E
* refactor(librechat.yaml): add fileStrategy field
* feat: add source to MongoFile schema, as well as BatchFile, and ExtendedFile types
* feat: employ file strategies for upload/delete files
* refactor(deleteFirebaseFile): add user id validation for firebase file deletion
* chore(deleteFirebaseFile): update jsdocs
* feat: employ strategies for vision requests
* fix(client): handle messages with deleted files
* fix(client): ensure `filesToDelete` always saves/sends `file.source`
* feat(openAI): configurable `resendImages` and `imageDetail`
* refactor(getTokenCountForMessage): recursive process only when array of Objects and only their values (not keys) aside from `image_url` types
* feat(OpenAIClient): calculateImageTokenCost
* chore: remove comment
* refactor(uploadAvatar): employ fileStrategy for avatars, from social logins or user upload
* docs: update docs on how to configure fileStrategy
* fix(ci): mock winston and winston related modules, update DALLE3.spec.js with changes made
* refactor(redis): change terminal message to reflect current development state
* fix(DALL-E-2): pass fileStrategy to dall-e
* style(Icon): remove error bubble from message icon
* fix(custom): `initializeClient` now throws error if apiKey or baseURL are admin provided but no env var was found
* refactor(tPresetSchema): match `conversationId` type to `tConversationSchema` but optional, use `extendedModelEndpointSchema` for `endpoint`
* fix(useSSE): minor improvements
- use `completed` set to avoid submitting unecessary abort request
- set preset with `newConversation` calls using initial conversation settings to prevent default Preset override as well as default settings
- return if there is a parsing error within `onerror` as expected errors from server are properly formatted
- Enhanced the `saveImageFromUrl` function to dynamically handle file extensions based on the content type of the fetched image.
- Replaced the method of appending a '.png' extension with a more robust approach using regular expressions and the path module.
- Allows for correct extension replacement or addition, ensuring filename consistency and compatibility with the actual image format.
- Prevents issues with double extensions (e.g., 'someimage.jpg.png') and aligns saved file types with their respective content types.
* fix(custom): prevent presets using removed custom endpoints from causing frontend errors
* refactor(abortMiddleware): send 204 status when abortController is not found/active, set expected header `application/json` when not set
* fix(useSSE): general improvements:
- Add endpointType to fetch URL in useSSE hook
- use EndpointURLs enum
- handle 204 response by setting `data` to initiated response
- add better error handling UX, make clear when there is an explicit error
* refactor: post-cleanup changes:
- add more unnecessary paths to .dockerignore
- remove librechat.yaml from main compose file (prevents from being required)
- do not create librechat.yaml during build (does nothing)
* docs: make config file instructions easier to read, more info throughout other docs
* docs: add custom config to menu
* Update custom_config.md
* Update docker_compose_install.md
* Improving builds
When adding LibreChat to ansible, it rebuilt way too often, even if I
only changed the configuration.
With this PR, it should build only when the files of the app change.
Also removed the 'volumes' section for the 'api' in the docker-compose.yml.
At least with our installation it works fine like this.
* @danny-avila's comments
- removed 'env_file' from docker-compose.yml
- re-added link to '.env' in volumes
* Adding latest changes from main
* @danny-avila's comments
* Updating installation instructions
* @danny-avila's comments
- Remove unused environment in docker-compose.yml
- Re-add some steps for cleaning docker images
* fix(TEndpointsConfig): resolve property access issues with typesafe helper function
* fix: undefined or null endpoint edge case
* refactor(mapEndpoints -> endpoints): renamed module to be more general for endpoint handling, wrote unit tests, export all helpers
* fix: load all existing conversation settings on refresh
* refactor(buildDefaultConvo): use `lastConversationSetup.endpointType` before `conversation.endpointType`
* refactor(TMessage/messageSchema): add `endpoint` field to messages to differentiate generation origin
* feat(useNewConvo): `keepLatestMessage` param to prevent reseting the `latestMessage` mid-conversation
* style(Settings): adjust height styling to allow more space in dialog for additional settings
* feat: Modular Chat: experimental setting to Enable switching Endpoints mid-conversation
* fix(ChatRoute): fix potential parsing issue with tPresetSchema
* fix(api): version mismatch between langchain packages `@langchain/google-genai` & `langchain`
* chore(loadYaml): silence config file not found error
* chore: improve firebase init message when not configured (generalized)
* fix(deploy-compose.yml): mount `librechat.yaml` config file