Commit graph

1106 commits

Author SHA1 Message Date
Danny Avila
ba2e95db04
Update Dockerfile.multi 2023-07-27 16:50:33 -04:00
Danny Avila
2a6e000217
wip: testing dev image workflows and deployment setup (#716)
* chore(deploy-compose.yml): update API and client image references to use latest versions from ghcr.io
feat(deploy-compose.yml): add NODE_ENV environment variable with value 'production' for API service

* chore(dev-images.yml): tag and push latest images to container registry
chore(dev-images.yml): tag and push latest client image to container registry
chore(dev-images.yml): tag and push latest dev image to container registry
fix(Dockerfile.multi): fix CMD command to properly set NODE_ENV variable
2023-07-27 16:48:41 -04:00
Danny Avila
32281d1b8d
wip: testing container workflows and deployment images (#715)
* feat: add Dockerfile.multi for building API, Client, and Data Provider

feat: add nginx.conf for client-side routing in Nginx

feat: add deploy-compose.yml for deploying the application with Docker Compose

chore: update version in deploy-compose.yml to 3.8

chore: remove unused configuration in docs/dev/deploy-compose.yml

* chore(Dockerfile.multi): Remove data-provider build stage
chore(deploy-compose.yml): Add NODE_ENV=production environment variable

* chore(Dockerfile.multi): add environment variable NODE_OPTIONS with value "--max-old-space-size=776"
feat(Dockerfile.multi): copy client build output to api build stage

* chore(Dockerfile.multi): update NODE_OPTIONS to increase max-old-space-size to 2048
chore(deploy-compose.yml): remove NODE_ENV=production environment variable

* feat(dev-images.yml): add GitHub Actions workflow for Docker multi-stage build on push to main branch
2023-07-27 16:24:06 -04:00
Danny Avila
369b1f4eba
chore: remove data-provider and use npm package instead (#713)
* chore: remove data-provider, install npm package

* chore: replace monorepo package with npm package: librechat-data-provider

* chore: remove data-provider scripts

* chore: remove data-provider from .eslintrc.js
2023-07-27 14:49:47 -04:00
Danny Avila
777d64088b
feat: stop-backend.js and update.js linux support (#712)
* chore(dependabot.yml): update target-branch from "develop" to "dev" for npm package updates in /api, /client, and root directory

* feat: stop-backend.js and update.js linux support (#701)

* feat: stop-backend.js and update.js linux support

* feat: update.js sudo support

* chore(helpers.js): add deleteNodeModules function
feat(packages.js): add script to delete node_modules and install dependencies
refactor(update.js): remove unnecessary imports and use deleteNodeModules function
feat(package.json): add update:linux script to update with sudo

* chore(package.json): rename 'update:linux'  script to 'update:sudo'

* refactor(update.js): simplify downCommand and buildCommand by removing redundant use of sudo command, add sudo to single docker command

---------

Co-authored-by: Fuegovic <32828263+fuegovic@users.noreply.github.com>
2023-07-27 11:11:56 -04:00
Danny Avila
d59a3f20cb chore: linting 2023-07-27 10:32:23 -04:00
Danny Avila
8959576d75 fix(Settings/General): fix clear convos bug where active convo would still appear after clearing convos 2023-07-27 10:32:23 -04:00
Danny Avila
dd8bc39001 refactor(Nav/Conversation): reorganize imports and fix import paths 2023-07-27 10:32:23 -04:00
Danny Avila
4898f7489b chore(jest.config.cjs): linting 2023-07-27 10:32:23 -04:00
Danny Avila
c9c77d6fdf chore(eslint): add 'import' plugin to eslint configuration
chore(prettier): add 'prettier-plugin-tailwindcss' plugin to prettier configuration
chore(package.json): update eslint-plugin-import to version 2.27.5
2023-07-27 10:32:23 -04:00
Fuegovic
4dc86c4c18
feat: add more plugins to the Plugin store (#709) 2023-07-27 08:10:22 -04:00
Marco Beretta
6ae807c404
Update free_ai_apis.md (#707) 2023-07-27 08:08:53 -04:00
Marco Beretta
b5353e2640
Organize the getting started menu (#708)
* Create installation.md

* Delete installation.md

* Create installation.md

* Update installation.md

* Update README.md

* Update mkdocs.yml

* Update apis_and_tokens.md

* Update README.md

* Delete installation.md

* Update README.md

* Update mkdocs.yml
2023-07-27 08:05:49 -04:00
Danny Avila
f4f1199a55
feat: docker-compose deployment file (#706)
* feat(deploy-compose.yml): add docker-compose file for development deployment

A new docker-compose file has been added for development deployment. This file defines the services required for running the application in a development environment. The services include a client service running nginx, an api service running the LibreChat application, a mongodb service for the database, and a meilisearch service for search functionality.

The client service is configured to use the latest version of the nginx image, with port 3080 mapped to port 80. It also mounts the nginx.conf file and the client's node_modules directory.

The api service is named LibreChat and is built from the librechat image. It exposes port 9000 and depends on the mongodb service. It also mounts the api directory, the .env files, and the client's node_modules directory.

The mongodb service is named chat-mongodb and uses the mongo image. It exposes port 27018 and mounts the data-node directory for data storage

* chore(deploy-compose.yml): update env_file path to ../../.env

* chore(deploy-compose.yml): update image name to librechat_deploy
chore(deploy-compose.yml): update build context to ../../

* chore(deploy-compose.yml): update image and comment out build section

The image for the service has been updated to `ghcr.io/danny-avila/librechat:latest`. The build section has been commented out as it is no longer needed.

* refactor(nginx.conf): reformat nginx.conf for better readability and maintainability

* chore(nginx.conf): add worker_connections configuration to events block
chore(nginx.conf): add listen configuration to server block

* chore(deploy-compose.yml): update nginx container ports configuration
feat(deploy-compose.yml): add support for HTTPS by exposing port 443

* docs(dev/README.md): add instructions for deploying with deploy-compose.yml

* docs(dev/README.md): update instructions for deploying with deploy-compose.yml
2023-07-26 12:57:26 -04:00
Danny Avila
b6028a3434
Update breaking_changes.md 2023-07-26 08:48:12 -04:00
Danny Avila
abef8c02c1
Update breaking_changes.md 2023-07-26 08:44:51 -04:00
Danny Avila
19af2b06ce
feat: utitlize lean queries, remove migration script, index createdAt timestamps (#698)
* feat(mongoDb): utitlize lean queries and index createdAt timestamps for cosmosDB support

* fix: remove unnecessary lean() method from deleteMany calls

* fix: remove unnecessary lean() method from deleteMany calls

* fix: remove lean() from queries that need hydration

* chore(migrateDb.js): remove unused migration script
fix(Preset.js): return lean documents when retrieving presets
refactor(index.js): remove migration script from server initialization
refactor(convos.js): remove toObject() when sending conversation object
refactor(presets.js): remove toObject() when sending presets object
2023-07-25 19:27:55 -04:00
Marco Beretta
2f7658e39f
Italian-localization-support-for-Nav-components-and-small-fix (#697) 2023-07-25 18:29:32 -04:00
Raí
d3138c79fc
Language files: Spanish translation and Portuguese corrections for PR. (#694)
* Add files via upload

* Add files via upload
2023-07-24 16:22:14 -04:00
Abner Chou
1e49b7ecb1
Support localization for Nav components (#688)
* init localization

* Update defaul to en

* Fix merge issue and import path.

* Set default to en

* Change jsx to tsx

* Update the password max length string.

* Remove languageContext as using the recoil instead.

* Add localization to component endpoints pages

* Revert default to en after testing.

* Update LoginForm.tsx

* Fix translation.

* Make lint happy

* Merge (#1)

* Create deploy.yml

* Add localization support for endpoint pages components  (#667)

* init localization

* Update defaul to en

* Fix merge issue and import path.

* Set default to en

* Change jsx to tsx

* Update the password max length string.

* Remove languageContext as using the recoil instead.

* Add localization to component endpoints pages

* Revert default to en after testing.

* Update LoginForm.tsx

* Fix translation.

* Make lint happy

* Add a restart to melisearch in docker-compose.yml (#684)

* Oauth fixes for Cognito (#686)

* Add a restart to melisearch in docker-compose.yml

* Oauth fixes for Cognito

* Use the username or email for full name from oath if not provided

---------

Co-authored-by: Donavan <snark@hey.com>

* Italian localization support for endpoint (#687)

---------

Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Co-authored-by: Donavan Stanley <donavan.stanley@gmail.com>
Co-authored-by: Donavan <snark@hey.com>
Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>

* Translate Nav pages

* Fix npm test

---------

Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Co-authored-by: Donavan Stanley <donavan.stanley@gmail.com>
Co-authored-by: Donavan <snark@hey.com>
Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
2023-07-24 08:33:08 -04:00
Danny Avila
3b865fbc59
Update mkdocs.yml 2023-07-23 20:34:41 -04:00
Danny Avila
afd894553c
docs: add installation guide for free AI APIs (ChimeraGPT) (#692)
* docs: add installation guide for free AI APIs (chimeraGPT)

* docs: Update free_ai_apis.md with screenshots
2023-07-23 20:30:58 -04:00
Daniel Avila
df485e5bfe chore(.env.example): comment out OPENAI_MODELS and PLUGIN_MODELS
The OPENAI_MODELS and PLUGIN_MODELS variables are being commented out in the .env.example file. This is done to prefer fetching api/models as the default behavior
2023-07-23 16:51:42 -07:00
Daniel Avila
77252bafc1 chore(.prettierrc.js): update tabWidth to 2 and remove commented out code 2023-07-23 16:51:42 -07:00
Daniel Avila
bd1d5e991d feat(endpoints): fetch v1/api/models for model selection when no default models are set 2023-07-23 16:51:42 -07:00
Danny Avila
18c4883ae0 refactor(PluginsClient.js): simplify getFunctionModelName logic using if-else statements
refactor(PluginsClient.js): improve readability by extracting observedImagePath variable
fix(PluginsClient.js): check if responseMessage already includes observedImagePath before appending observation
2023-07-23 16:51:42 -07:00
Youngwook Kim
197307d514
fix(OpenAIClient): resolve null pointer exception in tokenizer management (#689) 2023-07-23 11:59:11 -04:00
Marco Beretta
130356654c
Italian localization support for endpoint (#687) 2023-07-22 20:12:48 -04:00
Donavan Stanley
8f9f09698b
Oauth fixes for Cognito (#686)
* Add a restart to melisearch in docker-compose.yml

* Oauth fixes for Cognito

* Use the username or email for full name from oath if not provided

---------

Co-authored-by: Donavan <snark@hey.com>
2023-07-22 20:12:15 -04:00
Donavan Stanley
5da833e066
Add a restart to melisearch in docker-compose.yml (#684) 2023-07-22 15:10:07 -04:00
Abner Chou
b64273957a
Add localization support for endpoint pages components (#667)
* init localization

* Update defaul to en

* Fix merge issue and import path.

* Set default to en

* Change jsx to tsx

* Update the password max length string.

* Remove languageContext as using the recoil instead.

* Add localization to component endpoints pages

* Revert default to en after testing.

* Update LoginForm.tsx

* Fix translation.

* Make lint happy
2023-07-22 15:09:45 -04:00
Danny Avila
4148c6d219
Create deploy.yml 2023-07-22 13:49:49 -04:00
Danny Avila
e9d68e3bef
Update build.yml 2023-07-22 13:35:00 -04:00
Danny Avila
bbe690cc4b
Update build.yml 2023-07-22 13:29:48 -04:00
Danny Avila
a1ad471d87
Update build.yml 2023-07-22 13:21:30 -04:00
Danny Avila
c319d709f3
Create build.yml 2023-07-22 11:31:56 -04:00
Danny Avila
6943f1c2c7
refactor: improve passport strategy handling in async/await manner to prevent race conditions upon importing modules (#682) 2023-07-22 10:29:17 -04:00
Danny Avila
e38483a8b9
feat(config/update.js): add support for updating with single-compose file (#680) 2023-07-21 21:51:35 -04:00
Danny Avila
2a2e6d9991
docs(dev): update README.md with instructions for using single-compose.yml (#676)
feat(single-compose.yml): add single-compose.yml for building leaner app container without meilisearch and mongodb services
- This is useful for deploying on Google, Azure, etc., as a single, leaner container.
- Instructions for running the container are added to the README.md file.
- The container requires a MongoDB Atlas connection string for the `MONGO_URI` environment variable.
- Remote Meilisearch may also be possible, but is not tested.
2023-07-21 20:11:05 -04:00
Danny Avila
deb1472aa5
chore: add update script for assuring clean installations (#673) 2023-07-21 16:44:59 -04:00
Danny Avila
8aa58ea240
chore(api): update langchain dependency to version 0.0.114 (#669) 2023-07-21 00:14:54 -04:00
Daniel Avila
3a112a344d fix(Content.jsx): remove 'z-index: 1;' from currentContent variable
fix(Content.jsx): exclude rehypePlugins if isIFrame is true
fix(Content.jsx): update content rendering to use currentContent variable
2023-07-20 19:40:31 -07:00
Daniel Avila
712be248be chore: bump app version to 0.5.5
chore: bump @waylaidwanderer/chatgpt-api to 1.37.2
2023-07-20 19:40:31 -07:00
fuegovic
530f9d303f feat: Bing Image Creator 2023-07-20 19:40:31 -07:00
Fuegovic
ad29d25396
docs: updates (#662)
* docs: updates

* docs: updates

* Update Settings.jsx
2023-07-19 08:35:41 -07:00
Danny Avila
1ef53a41f0
chore(Settings.jsx): update placeholder text for promptPrefix/system message (#656) 2023-07-16 13:22:36 -04:00
Fuegovic
0246f164b0
docs: add "chatgpt_plugins_openapi.md" to readme.md and mkdocs (#655)
* docs: add chatgpt_plugins_openapi.md to toc

* docs: add chatgpt_plugins_openapi.md to mkdocs toc
2023-07-16 13:14:07 -04:00
Danny Avila
514f625b8f
feat: ChatGPT Plugins/OpenAPI specs for Plugins Endpoint (#620)
* wip: proof of concept for openapi chain

* chore(api): update langchain dependency to version 0.0.105

* feat(Plugins): use ChatGPT Plugins/OpenAPI specs (first pass)

* chore(manifest.json): update pluginKey for "Browser" tool to "web-browser"
chore(handleTools.js): update customConstructor key for "web-browser" tool

* fix(handleSubmit.js): set unfinished property to false for all endpoints

* fix(handlers.js): remove unnecessary capitalizeWords function and use action.tool directly
refactor(endpoints.js): rename availableTools to tools and transform it into a map

* feat(endpoints): add plugins selector to endpoints file
refactor(CodeBlock.tsx): refactor to typescript
refactor(Plugin.tsx): use recoil Map for plugin name and refactor to typescript
chore(Message.jsx): linting
chore(PluginsOptions/index.jsx): remove comment/linting
chore(svg): export Clipboard and CheckMark components from SVG index and refactor to typescript

* fix(OpenAPIPlugin.js): rename readYamlFile function to readSpecFile
fix(OpenAPIPlugin.js): handle JSON files in readSpecFile function
fix(OpenAPIPlugin.js): handle JSON URLs in getSpec function
fix(OpenAPIPlugin.js): handle JSON variables in createOpenAPIPlugin function
fix(OpenAPIPlugin.js): add description for variables in createOpenAPIPlugin function
fix(OpenAPIPlugin.js): add optional flag for is_user_authenticated and has_user_authentication in ManifestDefinition
fix(loadSpecs.js): add optional flag for is_user_authenticated and has_user_authentication in ManifestDefinition
fix(Plugin.tsx): remove unnecessary callback parameter in getPluginName function
fix(getDefaultConversation.js): fix browser console error: handle null value for lastConversationSetup in getDefaultConversation function

* feat(api): add new tools

Add Ai PDF tool for super-fast, interactive chats with PDFs of any size, complete with page references for fact checking.
Add VoxScript tool for searching through YouTube transcripts, financial data sources, Google Search results, and more.
Add WebPilot tool for browsing and QA of webpages, PDFs, and data. Generate articles from one or more URLs.

feat(api): update OpenAPIPlugin.js

- Add support for bearer token authorization in the OpenAPIPlugin.
- Add support for custom headers in the OpenAPIPlugin.

fix(api): fix loadTools.js

- Pass the user parameter to the loadSpecs function.

* feat(PluginsClient.js): import findMessageContent function from utils
feat(PluginsClient.js): add message parameter to options object in initializeCustomAgent function
feat(PluginsClient.js): add content to errorMessage if message content is found
feat(PluginsClient.js): break out of loop if message content is found
feat(PluginsClient.js): add delay option with value of 8 to generateTextStream function
feat(PluginsClient.js): add support for process.env.PORT environment variable in app.listen function
feat(askyourpdf.json): add askyourpdf plugin configuration
feat(metar.json): add metar plugin configuration
feat(askyourpdf.yaml): add askyourpdf plugin OpenAPI specification
feat(OpenAPIPlugin.js): add message parameter to createOpenAPIPlugin function
feat(OpenAPIPlugin.js): add description_for_model to chain run message
feat(addOpenAPISpecs.js): remove verbose option from loadSpecs function call

fix(loadSpecs.js): add 'message' parameter to the loadSpecs function
feat(findMessageContent.js): add utility function to find message content in JSON objects

* fix(PluginStoreDialog.tsx): update z-index value for the dialog container

The z-index value for the dialog container was updated to "102" to ensure it appears above other elements on the page.

* chore(web_pilot.json): add "params" field with "user_has_request" parameter set to true

* chore(eslintrc.js): update eslint rules
fix(Login.tsx): add missing semicolon after import statement

* fix(package-lock.json): update langchain dependency to version ^0.0.105

* fix(OpenAPIPlugin.js): change header key from 'id' to 'librechat_user_id' for consistency and clarity

feat(plugins): add documentation for using official ChatGPT Plugins with OpenAPI specs

This commit adds a new file `chatgpt_plugins_openapi.md` to the `docs/features/plugins` directory. The file provides detailed information on how to use official ChatGPT Plugins with OpenAPI specifications. It explains the components of a plugin, including the Plugin Manifest file and the OpenAPI spec. It also covers the process of adding a plugin, editing manifest files, and customizing OpenAPI spec files. Additionally, the commit includes disclaimers about the limitations and compatibility of plugins with LibreChat. The documentation also clarifies that the use of ChatGPT Plugins with LibreChat does not violate OpenAI's Terms of Service.

The purpose of this commit is to provide comprehensive documentation for developers who want to integrate ChatGPT Plugins into their projects using OpenAPI specs. It aims to guide them through the process of adding and configuring plugins, as well as addressing potential issues and

chore(introduction.md): update link to ChatGPT Plugins documentation
docs(introduction.md): clarify the purpose of the plugins endpoint and its capabilities

* fix(OpenAPIPlugin.js): update SUFFIX variable to provide a clearer description
docs(chatgpt_plugins_openapi.md): update information about adding plugins via url on the frontend

* feat(PluginsClient.js): sendIntermediateMessage on successful Agent load
fix(PluginsClient.js, server/index.js, gptPlugins.js): linting fixes
docs(chatgpt_plugins_openapi.md): update links and add additional information

* Update chatgpt_plugins_openapi.md

* chore: rebuild package-lock file

* chore: format/lint all files with new rules

* chore: format all files

* chore(README.md): update AI model selection list

The AI model selection list in the README.md file has been updated to reflect the current options available. The "Anthropic" model has been added as an alternative name for the "Claude" model.

* fix(Plugin.tsx): type issue

* feat(tools): add new tool WebPilot

feat(tools): remove tool Weather Report

feat(tools): add new tool Prompt Perfect

feat(tools): add new tool Scholarly Graph Link

* feat(OpenAPIPlugin.js): add getSpec and readSpecFile functions
feat(OpenAPIPlugin.spec.js): add tests for readSpecFile, getSpec, and createOpenAPIPlugin functions

* chore(agent-demo-1.js): remove unused code and dependencies
chore(agent-demo-2.js): remove unused code and dependencies
chore(demo.js): remove unused code and dependencies

* feat(addOpenAPISpecs): add function to transform OpenAPI specs into desired format
feat(addOpenAPISpecs.spec): add tests for transformSpec function
fix(loadSpecs): remove debugging code

* feat(loadSpecs.spec.js): add unit tests for ManifestDefinition, validateJson, and loadSpecs functions

* fix: package file resolution bug

* chore: move scholarly_graph_link manifest to 'has-issues'

* refactor(client/hooks): convert to TS and export from index

* Update introduction.md

* Update chatgpt_plugins_openapi.md
2023-07-16 12:19:47 -04:00
Danny Avila
39ac8d3858
fix: typo when including proxy for langchain (#653)
* fix(PluginsClient.js): change reverseProxyUrl variable to options.reverseProxyUrl

* chore(.prettierrc.js): comment out tabWidth option in Prettier configuration
2023-07-15 12:19:23 -04:00
Danny Avila
15987abe0a
style(Nav): improve Nav transition for open/close (#652)
* Revert "Animated sidebar (#649)"

This reverts commit dd19323280.

* in progress

* style(Nav): improve transition for Nav
2023-07-15 10:43:15 -04:00