Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
Release: 0.5.3 (#599)
Danny Avila2607f157d3b3
diff --git a/.eslintrc.js b/.eslintrc.jsindex 88123ff97f..3dddeb8ea5 100644--- a/.eslintrc.js+++ b/.eslintrc.js@@ -36,6 +36,7 @@ module.exports = {}],'linebreak-style': 0,+ 'object-curly-spacing': ['error', 'always'],'no-trailing-spaces': 'error','no-multiple-empty-lines': ['error', { 'max': 1 }],// "arrow-parens": [2, "as-needed", { requireForBlockBody: true }],diff --git a/.gitignore b/.gitignoreindex 2bf3b872ef..711c8b0cc3 100644--- a/.gitignore+++ b/.gitignore@@ -75,3 +75,4 @@ data.ms/*auth.json/packages/ux-shared/+/images\ No newline at end of filediff --git a/api/app/clients/OpenAIClient.js b/api/app/clients/OpenAIClient.jsindex d2fa14019e..de7d646f3f 100644--- a/api/app/clients/OpenAIClient.js+++ b/api/app/clients/OpenAIClient.js@@ -245,7 +245,7 @@ class OpenAIClient extends BaseClient {// TODO: need to handle interleaving instructions betterif (this.contextStrategy) {({ payload, tokenCountMap, promptTokens, messages } =- await this.handleContextStrategy({instructions, orderedMessages, formattedMessages}));+ await this.handleContextStrategy({ instructions, orderedMessages, formattedMessages }));}const result = {diff --git a/api/app/clients/PluginsClient.js b/api/app/clients/PluginsClient.jsindex 3767008bba..fc95196d4e 100644--- a/api/app/clients/PluginsClient.js+++ b/api/app/clients/PluginsClient.js@@ -4,7 +4,7 @@ const { CallbackManager } = require('langchain/callbacks');const { initializeCustomAgent, initializeFunctionsAgent } = require('./agents/');const { loadTools } = require('./tools/util');const { SelfReflectionTool } = require('./tools/');-const { HumanMessage, AIMessage } = require('langchain/schema');+const { HumanChatMessage, AIChatMessage } = require('langchain/schema');const {instructions,imageInstructions,@@ -237,8 +237,8 @@ Only respond with your conversational reply to the following User Message:// Map Messages to Langchain formatconst pastMessages = this.currentMessages.slice(0, -1).map(msg => msg?.isCreatedByUser || msg?.role?.toLowerCase() === 'user'- ? new HumanMessage(msg.text)- : new AIMessage(msg.text));+ ? new HumanChatMessage(msg.text)+ : new AIChatMessage(msg.text));// initialize agentconst initializer = this.functionsAgent ? initializeFunctionsAgent : initializeCustomAgent;diff --git a/api/package.json b/api/package.jsonindex 0fda7b8036..e562573fad 100644--- a/api/package.json+++ b/api/package.json@@ -1,18 +1,12 @@{"name": "@librechat/backend",- "version": "0.5.2",+ "version": "0.5.3","description": "","scripts": {"start": "echo 'please run this from the root directory'","server-dev": "echo 'please run this from the root directory'","test": "cross-env NODE_ENV=test jest",- "test:ci": "jest --ci",- "test2": "node --inspect app/langchain/test2.js",- "test3": "node --inspect app/langchain/test3.js",- "test4": "node --inspect app/langchain/test4.js",- "test5": "node --inspect app/langchain/test5.js",- "test8": "node --inspect app/langchain/test8.js",- "langchain": "node app/langchain/test2.js"+ "test:ci": "jest --ci"},"repository": {"type": "git",diff --git a/client/package.json b/client/package.jsonindex 7ac7694ee6..435ec2cc0f 100644--- a/client/package.json+++ b/client/package.json@@ -1,6 +1,6 @@{"name": "@librechat/frontend",- "version": "0.5.2",+ "version": "0.5.3","description": "","scripts": {"data-provider": "cd .. && npm run build:data-provider",diff --git a/client/src/components/Endpoints/EndpointOptionsDialog.jsx b/client/src/components/Endpoints/EndpointOptionsDialog.jsxindex 55a2715c3f..003b99af87 100644--- a/client/src/components/Endpoints/EndpointOptionsDialog.jsx+++ b/client/src/components/Endpoints/EndpointOptionsDialog.jsx@@ -1,10 +1,10 @@import exportFromJSON from 'export-from-json';import { useEffect, useState } from 'react';import { useRecoilValue } from 'recoil';-import { Dialog, DialogButton, DialogTemplate } from '~/components/';+import { Dialog, DialogButton, DialogTemplate } from '~/components';import SaveAsPresetDialog from './SaveAsPresetDialog';import cleanupPreset from '~/utils/cleanupPreset';-+import { alternateName } from '~/utils';import Settings from './Settings';import store from '~/store';@@ -12,18 +12,9 @@ import store from '~/store';// A preset dialog to show readonly preset values.const EndpointOptionsDialog = ({ open, onOpenChange, preset: _preset, title }) => {const [preset, setPreset] = useState(_preset);- const [endpointName, setEndpointName] = useState(preset?.endpoint);-const [saveAsDialogShow, setSaveAsDialogShow] = useState(false);const endpointsConfig = useRecoilValue(store.endpointsConfig);-- if (endpointName === 'google') {- setEndpointName('PaLM');- }-- if (endpointName === 'gptPlugins') {- setEndpointName('Plugins');- }+ const endpointName = alternateName[preset?.endpoint] ?? 'Endpoint';const setOption = (param) => (newValue) => {let update = {};diff --git a/client/src/components/Input/SetTokenDialog/SetTokenDialog.tsx b/client/src/components/Input/SetTokenDialog/SetTokenDialog.tsxindex 91cdc79d46..63954c69f9 100644--- a/client/src/components/Input/SetTokenDialog/SetTokenDialog.tsx+++ b/client/src/components/Input/SetTokenDialog/SetTokenDialog.tsx@@ -1,4 +1,4 @@-import React, { useState }from 'react';+import React, { useState } from 'react';import HelpText from './HelpText';import GoogleConfig from './GoogleConfig';import OpenAIConfig from './OpenAIConfig';diff --git a/package-lock.json b/package-lock.jsonindex b35d816960..8df0a52c0b 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "LibreChat",- "version": "0.5.2",+ "version": "0.5.3","lockfileVersion": 2,"requires": true,"packages": {"": {"name": "LibreChat",- "version": "0.5.2",+ "version": "0.5.3","hasInstallScript": true,"license": "ISC","workspaces": [@@ -16,7 +16,6 @@],"dependencies": {"axios": "^1.4.0",- "langchain": "^0.0.91","passport": "^0.6.0","passport-github2": "^0.1.12"},@@ -44,7 +43,7 @@},"api": {"name": "@librechat/backend",- "version": "0.5.2",+ "version": "0.5.3","license": "ISC","dependencies": {"@dqbd/tiktoken": "^1.0.2",@@ -373,7 +372,7 @@},"client": {"name": "@librechat/frontend",- "version": "0.5.2",+ "version": "0.5.3","license": "ISC","dependencies": {"@fortawesome/fontawesome-svg-core": "^6.4.0",@@ -17451,231 +17450,6 @@"node": ">=6"}},- "node_modules/langchain": {- "version": "0.0.91",- "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.0.91.tgz",- "integrity": "sha512-oCilhNDZDSt8rdvnuVv5J3BIZ1FwCccdqdO6xHddiCko26UkAJ+wKRWmV8YQOYUDZzoRjp4ogDIifETfhfb30w==",- "dependencies": {- "@anthropic-ai/sdk": "^0.4.3",- "ansi-styles": "^5.0.0",- "binary-extensions": "^2.2.0",- "expr-eval": "^2.0.2",- "flat": "^5.0.2",- "js-tiktoken": "^1.0.6",- "jsonpointer": "^5.0.1",- "ml-distance": "^4.0.0",- "object-hash": "^3.0.0",- "openai": "^3.2.0",- "p-queue": "^6.6.2",- "p-retry": "4",- "uuid": "^9.0.0",- "yaml": "^2.2.1",- "zod": "^3.21.4",- "zod-to-json-schema": "^3.20.4"- },- "engines": {- "node": ">=18"- },- "peerDependencies": {- "@aws-sdk/client-dynamodb": "^3.310.0",- "@aws-sdk/client-lambda": "^3.310.0",- "@aws-sdk/client-s3": "^3.310.0",- "@aws-sdk/client-sagemaker-runtime": "^3.310.0",- "@clickhouse/client": "^0.0.14",- "@getmetal/metal-sdk": "*",- "@getzep/zep-js": "^0.3.1",- "@gomomento/sdk": "^1.23.0",- "@huggingface/inference": "^1.5.1",- "@opensearch-project/opensearch": "*",- "@pinecone-database/pinecone": "*",- "@qdrant/js-client-rest": "^1.2.0",- "@supabase/postgrest-js": "^1.1.1",- "@supabase/supabase-js": "^2.10.0",- "@tensorflow-models/universal-sentence-encoder": "*",- "@tensorflow/tfjs-converter": "*",- "@tensorflow/tfjs-core": "*",- "@tigrisdata/vector": "^1.1.0",- "@upstash/redis": "^1.20.6",- "@zilliz/milvus2-sdk-node": ">=2.2.7",- "apify-client": "^2.7.1",- "axios": "*",- "cheerio": "^1.0.0-rc.12",- "chromadb": "^1.5.2",- "cohere-ai": "^5.0.2",- "d3-dsv": "^2.0.0",- "epub2": "^3.0.1",- "faiss-node": "^0.2.0",- "google-auth-library": "^8.8.0",- "hnswlib-node": "^1.4.2",- "html-to-text": "^9.0.5",- "ignore": "^5.2.0",- "mammoth": "*",- "mongodb": "^5.2.0",- "mysql2": "^3.3.3",- "pdf-parse": "1.1.1",- "peggy": "^3.0.2",- "pg": "^8.11.0",- "pickleparser": "^0.1.0",- "playwright": "^1.32.1",- "puppeteer": "^19.7.2",- "redis": "^4.6.4",- "replicate": "^0.9.0",- "srt-parser-2": "^1.2.2",- "typeorm": "^0.3.12",- "weaviate-ts-client": "^1.0.0"- },- "peerDependenciesMeta": {- "@aws-sdk/client-dynamodb": {- "optional": true- },- "@aws-sdk/client-lambda": {- "optional": true- },- "@aws-sdk/client-s3": {- "optional": true- },- "@aws-sdk/client-sagemaker-runtime": {- "optional": true- },- "@clickhouse/client": {- "optional": true- },- "@getmetal/metal-sdk": {- "optional": true- },- "@getzep/zep-js": {- "optional": true- },- "@gomomento/sdk": {- "optional": true- },- "@huggingface/inference": {- "optional": true- },- "@opensearch-project/opensearch": {- "optional": true- },- "@pinecone-database/pinecone": {- "optional": true- },- "@qdrant/js-client-rest": {- "optional": true- },- "@supabase/postgrest-js": {- "optional": true- },- "@supabase/supabase-js": {- "optional": true- },- "@tensorflow-models/universal-sentence-encoder": {- "optional": true- },- "@tensorflow/tfjs-converter": {- "optional": true- },- "@tensorflow/tfjs-core": {- "optional": true- },- "@tigrisdata/vector": {- "optional": true- },- "@upstash/redis": {- "optional": true- },- "@zilliz/milvus2-sdk-node": {- "optional": true- },- "apify-client": {- "optional": true- },- "axios": {- "optional": true- },- "cheerio": {- "optional": true- },- "chromadb": {- "optional": true- },- "cohere-ai": {- "optional": true- },- "d3-dsv": {- "optional": true- },- "epub2": {- "optional": true- },- "faiss-node": {- "optional": true- },- "google-auth-library": {- "optional": true- },- "hnswlib-node": {- "optional": true- },- "html-to-text": {- "optional": true- },- "ignore": {- "optional": true- },- "mammoth": {- "optional": true- },- "mongodb": {- "optional": true- },- "mysql2": {- "optional": true- },- "pdf-parse": {- "optional": true- },- "peggy": {- "optional": true- },- "pg": {- "optional": true- },- "pickleparser": {- "optional": true- },- "playwright": {- "optional": true- },- "puppeteer": {- "optional": true- },- "redis": {- "optional": true- },- "replicate": {- "optional": true- },- "srt-parser-2": {- "optional": true- },- "typeorm": {- "optional": true- },- "weaviate-ts-client": {- "optional": true- }- }- },- "node_modules/langchain/node_modules/ansi-styles": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/chalk/ansi-styles?sponsor=1"- }- },"node_modules/langchainplus-sdk": {"version": "0.0.19","resolved": "https://registry.npmjs.org/langchainplus-sdk/-/langchainplus-sdk-0.0.19.tgz",@@ -30456,7 +30230,7 @@"jsonwebtoken": "^9.0.0","keyv": "^4.5.2","keyv-file": "^0.2.0",- "langchain": "0.0.103",+ "langchain": "^0.0.103","lodash": "^4.17.21","meilisearch": "^0.33.0","mongoose": "^7.1.1",@@ -39260,36 +39034,6 @@"integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==","dev": true},- "langchain": {- "version": "0.0.91",- "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.0.91.tgz",- "integrity": "sha512-oCilhNDZDSt8rdvnuVv5J3BIZ1FwCccdqdO6xHddiCko26UkAJ+wKRWmV8YQOYUDZzoRjp4ogDIifETfhfb30w==",- "requires": {- "@anthropic-ai/sdk": "^0.4.3",- "ansi-styles": "^5.0.0",- "binary-extensions": "^2.2.0",- "expr-eval": "^2.0.2",- "flat": "^5.0.2",- "js-tiktoken": "^1.0.6",- "jsonpointer": "^5.0.1",- "ml-distance": "^4.0.0",- "object-hash": "^3.0.0",- "openai": "^3.2.0",- "p-queue": "^6.6.2",- "p-retry": "4",- "uuid": "^9.0.0",- "yaml": "^2.2.1",- "zod": "^3.21.4",- "zod-to-json-schema": "^3.20.4"- },- "dependencies": {- "ansi-styles": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="- }- }- },"langchainplus-sdk": {"version": "0.0.19","resolved": "https://registry.npmjs.org/langchainplus-sdk/-/langchainplus-sdk-0.0.19.tgz",diff --git a/package.json b/package.jsonindex 633e047ca4..947529cc51 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "LibreChat",- "version": "0.5.2",+ "version": "0.5.3","description": "","workspaces": ["api",@@ -40,7 +40,6 @@"homepage": "https://github.com/danny-avila/LibreChat#readme","dependencies": {"axios": "^1.4.0",- "langchain": "^0.0.91","passport": "^0.6.0","passport-github2": "^0.1.12"},