Commit graph

1514 commits

Author SHA1 Message Date
Fuegovic
5ac89b8f0e
🧹 chore: remove deprecated model from documentation (#1598) 2024-01-19 16:14:02 -05:00
Danny Avila
5a74ac9a60
: Release v0.6.6 (#1597) 2024-01-19 15:34:06 -05:00
Fuegovic
130e346228
🌍 : Translation update (Fr & It) (#1595) 2024-01-19 15:01:23 -05:00
Marco Beretta
9b7d7196e9
🌎: Update Italian Translation (#1594)
* translation update

* translation updatre + new transaltions

* Update language files for English and Italian
2024-01-19 15:00:45 -05:00
Danny Avila
e73608ba46
🪶 feat: Add Support for Azure OpenAI Base URL (#1596)
* 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
2024-01-19 14:57:03 -05:00
Raí Santos
5c94f5330a
🌎 : Update Portuguese Translation (#1593)
* 🌎: Update Portuguese Translation

* 🌎: Update Portuguese Translation
2024-01-19 09:14:26 -05:00
Danny Avila
f133bb98fe
🖌️ feat: Optional Display Username in Messages, Send/Stop Button Style, Localization (#1592)
* 👤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>
2024-01-19 03:44:02 -05:00
Carson Yang
3df58532d9
🚆 docs: Add Sealos 1-Click Deployment (#1578)
Add deploy on Sealos
2024-01-19 03:13:49 -05:00
Danny Avila
83292a47a7
📜 refactor: Enhance Auto Scroll Speed and UseEffect Cleanup (#1591) 2024-01-18 21:25:57 -05:00
Danny Avila
a7c54573c4
🚀 feat: Add OPENAI_ORGANIZATION for all OpenAI Requests (#1590) 2024-01-18 20:39:30 -05:00
Danny Avila
7e2e19a134
🎯 feat(config): Custom Endpoint Request Headers (#1588) 2024-01-18 20:11:42 -05:00
Danny Avila
ab3339210a
🖼️ feat(DALL-E): Azure OpenAI Support & New Config Variables (#1586)
* 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
2024-01-18 19:39:27 -05:00
Danny Avila
a8d6bfde7a
✏️ feat: LaTeX parsing for Messages (#1585)
* feat: Beta features tab in Settings and LaTeX Parsing toggle

* feat: LaTex parsing with spec
2024-01-18 14:44:10 -05:00
Danny Avila
638f9242e5
🪙 refactor: Update tokens.js for Added Context Buffer from Max (#1573)
* Update tokens.js

* chore: linting previous PR

* chore: adjust token limits, add buffers

* chore: linting

* chore: adjust 32k gpt-4 limit
2024-01-17 08:13:46 -05:00
Wahit Fitriyanto
963dbf3a1e
🌏: Add indonesia translation (#1563)
* Added Indonesian Language

* added indonesian to eng.tsx and general.tsx
2024-01-16 22:52:43 -05:00
Raí Santos
7b4e31ecc4
🎨: Updated Plugins Search Bar; 🌎: Added Translations (#1549)
* 🎨: layout search bar plugins: updated  / 🌎: translation update

* 🌎:Update Portuguese Translation

* fix: Refactored 'pluginstoredialog' code.

* chore(PopoverButtons): remove comments, re-organize imports

* chore: linting and reorganize useState declarations

* chore: linting and reorganize useState declarations

---------

Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
2024-01-16 13:15:39 -05:00
Ganesh Krishnan
406940490b
🐳 docs: Update dotenv.md (#1564)
docker compose is now a plugin of docker
2024-01-15 17:52:32 -05:00
Danny Avila
dfe45f80c6
📕 fix: Update document Title based on appTitle and on "New Chat" (#1553) 2024-01-14 20:35:37 -05:00
Ikko Eltociear Ashimine
0f49642758
🧹 docs: update docker_override.md (#1546)
minor fix
2024-01-14 19:05:13 -05:00
Danny Avila
783f64a6e5
🏗️ fix(config): Resolve Paths Correctly for Helper Scripts on Linux and Windows (#1542) 2024-01-13 13:06:07 -05:00
Danny Avila
0c48a9dd6e
📑 docs: fix mistral ai api example safe_mode --> safe_prompt (#1541) 2024-01-13 08:19:09 -05:00
Tyler Mendenhall
690cb9caa1
📔 docs: Update Render hosting Guide (#1528)
* 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
2024-01-12 18:14:42 -05:00
Pascal Helfenstein
b9d2a8fbb2
🚆docs: update hetzner ubuntu example (#1539) 2024-01-12 18:12:39 -05:00
Danny Avila
74cf22b71b
📑 docs: Update Mistral AI API example about dropParams (#1538) 2024-01-11 15:50:04 -05:00
Danny Avila
d7b4ed3079
🐛 fix: Remove resendImages, imageDetail from modelOptions for Custom Endpoints (#1537) 2024-01-11 13:42:00 -05:00
Danny Avila
73f79a60f6
📄chore: Update Discord Link README.md 2024-01-11 11:41:31 -05:00
Marco Beretta
6542c71c2b
🚆docs: Railway support (#1529)
* Update README.md

* Update README.md

---------

Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
2024-01-11 11:40:26 -05:00
Danny Avila
d20970f5c5
🚀 Feat: Streamline File Strategies & GPT-4-Vision Settings (#1535)
* 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
2024-01-11 11:37:54 -05:00
USAGI
28a6807176
🌏: Update Zh.tsx (#1527)
Chinese Translation Update
2024-01-11 11:37:42 -05:00
Raí Santos
79c1783e3d
🌎: Update Portuguese Translation (#1523) 2024-01-08 20:58:28 -05:00
MACHINSOFT
e3abd0d345
🌍: Correct Localized Text of "Save & Submit" Button (#1517)
* To provide a full translation option for the button in other languages

* Add a modification for the old version of the chat
2024-01-08 14:12:05 -05:00
Danny Avila
8f9ef13325
fix(getUserPluginAuthValue): throws error if no user matches (#1522) 2024-01-08 11:12:51 -05:00
Danny Avila
ead1c3c797
🔧 fix: Error Handling Improvements (#1518)
* 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
2024-01-08 09:30:38 -05:00
Danny Avila
c9aaf502af
feat(saveImageFromUrl): Dynamic Extension Handling (#1514)
- 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.
2024-01-07 15:22:33 -05:00
Danny Avila
050a92b318
🔄 refactor(config): Move connectWithTimeout Outside of Helpers Module (#1513) 2024-01-07 14:43:27 -05:00
Danny Avila
9144680ffb
🐛 fix: Load dotenv at Top of Call Stack (#1512) 2024-01-07 14:32:59 -05:00
Danny Avila
bebfffb2d9
🛠️ fix: Custom Endpoint issues, Improve SSE Response Handling (#1510)
* 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
2024-01-07 13:49:59 -05:00
Raí Santos
84892b5b98
🌎: Update Portuguese Translation (#1505) 2024-01-07 13:49:41 -05:00
Danny Avila
24cb9957cd
⬆️ fix(SendButton): correct dark theme bg when enabled (#1503) 2024-01-06 15:57:47 -05:00
Danny Avila
e870e6e83f
🧹 docs: formatting fix for custom_config.md 2024-01-06 12:12:59 -05:00
Danny Avila
2990f32f48
docs: minor mkdocs formatting issue in custom_config.md 2024-01-06 12:03:29 -05:00
Marco Beretta
9838a9e29e
⚖️ Update LICENSE.md Year: 2023 -> 2024 (#1501) 2024-01-06 12:00:20 -05:00
Danny Avila
3183d6b678
🐳 : Further Docker build Cleanup & Docs Update (#1502)
* 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
2024-01-06 11:59:08 -05:00
Linus Gasser
5d7869d3d5
🐳 : Improving Docker Build (#1415)
* 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
2024-01-06 11:44:49 -05:00
Danny Avila
8848b8a569
refactor: Mount Config File in Docker and Add to .dockerignore (#1493) 2024-01-04 22:14:53 -05:00
Danny Avila
9864fc8700
🔧 fix: Improve Endpoint Handling and Address Edge Cases (#1486)
* 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
2024-01-04 10:17:15 -05:00
Danny Avila
42f2353509
🗨️ refactor: Open New Tab for Ctrl+Click or Button Combo in NewChat (#1484) 2024-01-03 19:34:41 -05:00
Danny Avila
e1a529b5ae
🧪 feat: Experimental: Enable Switching Endpoints Mid-Conversation (#1483)
* 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
2024-01-03 19:17:42 -05:00
Danny Avila
4befee829b
🛠️ fix: Error Message Parsing and ChatOpenAI credentials (#1482)
* refactor(createLLM): ensure ChatOpenAI class always uses client-defined openAIApiKey; move typedefs to main def file

* refactor(useSSE): improve error message parsing in error handler
2024-01-03 14:26:13 -05:00
Danny Avila
d6d3d2ba13
🔧 fix: langchain packages mismatch, mount config file for deploy-compose.yaml, silence config not found error (#1481)
* 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
2024-01-03 10:59:38 -05:00