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
feat(frontend): add support for agent selection in GPT plugins in adding functions agent
Daniel Avila198f60c5364d
diff --git a/client/src/components/Endpoints/EditPresetDialog.jsx b/client/src/components/Endpoints/EditPresetDialog.jsxindex 7745ca6bab..cdce621ac7 100644--- a/client/src/components/Endpoints/EditPresetDialog.jsx+++ b/client/src/components/Endpoints/EditPresetDialog.jsx@@ -238,6 +238,7 @@ const EditPresetDialog = ({ open, onOpenChange, preset: _preset, title }) => {)}{preset?.endpoint === 'gptPlugins' && showAgentSettings && (<AgentSettings+ agent={preset.agent}model={preset.agentOptions.model}endpoint={preset.agentOptions.endpoint}temperature={preset.agentOptions.temperature}diff --git a/client/src/components/Endpoints/Plugins/AgentSettings.jsx b/client/src/components/Endpoints/Plugins/AgentSettings.jsxindex 2345a80a47..059d5e28e2 100644--- a/client/src/components/Endpoints/Plugins/AgentSettings.jsx+++ b/client/src/components/Endpoints/Plugins/AgentSettings.jsx@@ -20,6 +20,7 @@ import store from '~/store';function Settings(props) {const {readonly,+ agent,model,temperature,// topP,@@ -39,6 +40,7 @@ function Settings(props) {// const toolsSelected = tools?.length > 0;const models = endpointsConfig?.[endpoint]?.['availableModels'] || [];+ const agents = endpointsConfig?.[endpoint]?.['availableAgents'] || [];return (<div className="max-h-[350px] min-h-[305px] overflow-y-auto">@@ -58,6 +60,20 @@ function Settings(props) {containerClassName="flex w-full resize-none"/></div>+ <div className="grid w-full items-center gap-2">+ <SelectDropDown+ title="Agent Mode"+ value={agent}+ setValue={setOption('agent')}+ availableValues={agents}+ disabled={readonly}+ className={cn(+ defaultTextProps,+ 'flex w-full resize-none focus:outline-none focus:ring-0 focus:ring-opacity-0 focus:ring-offset-0'+ )}+ containerClassName="flex w-full resize-none"+ />+ </div></div><div className="col-span-1 flex flex-col items-center justify-start gap-6"><HoverCard openDelay={300}>diff --git a/client/src/components/Input/PluginsOptions/index.jsx b/client/src/components/Input/PluginsOptions/index.jsxindex 3b636e334c..897699a225 100644--- a/client/src/components/Input/PluginsOptions/index.jsx+++ b/client/src/components/Input/PluginsOptions/index.jsx@@ -187,6 +187,7 @@ function PluginsOptions() {<div className="px-4 py-4">{showAgentSettings ? (<AgentSettings+ agent={agentOptions.agent}model={agentOptions.model}endpoint={agentOptions.endpoint}temperature={agentOptions.temperature}diff --git a/client/src/utils/cleanupPreset.js b/client/src/utils/cleanupPreset.jsindex ffe52b986b..12db3a6906 100644--- a/client/src/utils/cleanupPreset.js+++ b/client/src/utils/cleanupPreset.js@@ -51,6 +51,7 @@ const cleanupPreset = ({ preset: _preset, endpointsConfig = {} }) => {};} else if (endpoint === 'gptPlugins') {const agentOptions = _preset?.agentOptions ?? {+ agent: 'classic',model: 'gpt-3.5-turbo',temperature: 0,// top_p: 1,diff --git a/client/src/utils/getDefaultConversation.js b/client/src/utils/getDefaultConversation.jsindex 1ed9099615..5f99254e4b 100644--- a/client/src/utils/getDefaultConversation.js+++ b/client/src/utils/getDefaultConversation.js@@ -67,6 +67,7 @@ const buildDefaultConversation = ({};} else if (endpoint === 'gptPlugins') {const agentOptions = lastConversationSetup?.agentOptions ?? {+ agent: 'classic',model: 'gpt-3.5-turbo',temperature: 0,// top_p: 1,diff --git a/client/src/utils/handleSubmit.js b/client/src/utils/handleSubmit.jsindex 76625b5da9..ffc14507b6 100644--- a/client/src/utils/handleSubmit.js+++ b/client/src/utils/handleSubmit.js@@ -88,6 +88,7 @@ const useMessageHandler = () => {responseSender = 'ChatGPT';} else if (endpoint === 'gptPlugins') {const agentOptions = currentConversation?.agentOptions ?? {+ agent: 'classic',model: 'gpt-3.5-turbo',temperature: 0,// top_p: 1,diff --git a/package-lock.json b/package-lock.jsonindex 2447137425..798c2885a9 100644--- a/package-lock.json+++ b/package-lock.json@@ -63,7 +63,7 @@"jsonwebtoken": "^9.0.0","keyv": "^4.5.2","keyv-file": "^0.2.0",- "langchain": "^0.0.92",+ "langchain": "^0.0.94","lodash": "^4.17.21","meilisearch": "^0.33.0","mongoose": "^7.1.1",@@ -96,6 +96,28 @@"url": "https://github.com/chalk/ansi-styles?sponsor=1"}},+ "api/node_modules/camelcase": {+ "version": "6.3.0",+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "api/node_modules/decamelize": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz",+ "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"api/node_modules/js-yaml": {"version": "4.1.0","resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",@@ -108,20 +130,23 @@}},"api/node_modules/langchain": {- "version": "0.0.92",- "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.0.92.tgz",- "integrity": "sha512-77528kXJu9C391qV1a5jDzZLEjIblq/VtpH7xd4BwavgvhRmeSXR9WkrHHmih/Phpae4Ss3dtb7pcyd78rp/YA==",+ "version": "0.0.94",+ "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.0.94.tgz",+ "integrity": "sha512-RafU2Nk005jnNgOPSi5LhXtwOhdf8nwLSWU4hRyMXwB1l3lNCwTKlYWfKwMQ9VaSEe+4fEaO8lM9yVp+y3aa9w==","dependencies": {"@anthropic-ai/sdk": "^0.4.3","ansi-styles": "^5.0.0","binary-extensions": "^2.2.0",+ "camelcase": "6",+ "decamelize": "5","expr-eval": "^2.0.2","flat": "^5.0.2","js-tiktoken": "^1.0.6","jsonpointer": "^5.0.1",+ "langchainplus-sdk": "^0.0.11","ml-distance": "^4.0.0","object-hash": "^3.0.0",- "openai": "^3.2.0",+ "openai": "^3.3.0","p-queue": "^6.6.2","p-retry": "4","uuid": "^9.0.0",@@ -141,6 +166,7 @@"@getmetal/metal-sdk": "*","@getzep/zep-js": "^0.3.1","@gomomento/sdk": "^1.23.0",+ "@google-cloud/storage": "^6.10.1","@huggingface/inference": "^1.5.1","@opensearch-project/opensearch": "*","@pinecone-database/pinecone": "*",@@ -205,6 +231,9 @@"@gomomento/sdk": {"optional": true},+ "@google-cloud/storage": {+ "optional": true+ },"@huggingface/inference": {"optional": true},@@ -7335,6 +7364,11 @@"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz","integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ=="},+ "node_modules/@types/uuid": {+ "version": "9.0.2",+ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.2.tgz",+ "integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ=="+ },"node_modules/@types/webidl-conversions": {"version": "7.0.0","resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz",@@ -17235,6 +17269,29 @@"url": "https://github.com/chalk/ansi-styles?sponsor=1"}},+ "node_modules/langchainplus-sdk": {+ "version": "0.0.11",+ "resolved": "https://registry.npmjs.org/langchainplus-sdk/-/langchainplus-sdk-0.0.11.tgz",+ "integrity": "sha512-bEovYVJZq88LYznDfK+ohNVd0lqQ1DMgE/A/8ZkqsiyaRuEjvIQj4PLc0VQ8htWPBljrfTu8oS7g+SGWYTZfNw==",+ "dependencies": {+ "@types/uuid": "^9.0.1",+ "commander": "^10.0.1",+ "p-queue": "^6.6.2",+ "p-retry": "4",+ "uuid": "^9.0.0"+ },+ "bin": {+ "langchain": "dist/cli/main.cjs"+ }+ },+ "node_modules/langchainplus-sdk/node_modules/commander": {+ "version": "10.0.1",+ "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",+ "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",+ "engines": {+ "node": ">=14"+ }+ },"node_modules/leven": {"version": "3.1.0","resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",@@ -19722,9 +19779,9 @@}},"node_modules/openai": {- "version": "3.2.1",- "resolved": "https://registry.npmjs.org/openai/-/openai-3.2.1.tgz",- "integrity": "sha512-762C9BNlJPbjjlWZi4WYK9iM2tAVAv0uUp1UmI34vb0CN5T2mjB/qM6RYBmNKMh/dN9fC+bxqPwWJZUTWW052A==",+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/openai/-/openai-3.3.0.tgz",+ "integrity": "sha512-uqxI/Au+aPRnsaQRe8CojU0eCR7I0mBiKjD3sNMzY6DaC1ZVrc85u98mtJW6voDug8fgGN+DIZmTDxTthxb7dQ==","dependencies": {"axios": "^0.26.0","form-data": "^4.0.0"@@ -29462,7 +29519,7 @@"jsonwebtoken": "^9.0.0","keyv": "^4.5.2","keyv-file": "^0.2.0",- "langchain": "^0.0.92",+ "langchain": "0.0.94","lodash": "^4.17.21","meilisearch": "^0.33.0","mongoose": "^7.1.1",@@ -29486,6 +29543,16 @@"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz","integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="},+ "camelcase": {+ "version": "6.3.0",+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA=="+ },+ "decamelize": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz",+ "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA=="+ },"js-yaml": {"version": "4.1.0","resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",@@ -29495,20 +29562,23 @@}},"langchain": {- "version": "0.0.92",- "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.0.92.tgz",- "integrity": "sha512-77528kXJu9C391qV1a5jDzZLEjIblq/VtpH7xd4BwavgvhRmeSXR9WkrHHmih/Phpae4Ss3dtb7pcyd78rp/YA==",+ "version": "0.0.94",+ "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.0.94.tgz",+ "integrity": "sha512-RafU2Nk005jnNgOPSi5LhXtwOhdf8nwLSWU4hRyMXwB1l3lNCwTKlYWfKwMQ9VaSEe+4fEaO8lM9yVp+y3aa9w==","requires": {"@anthropic-ai/sdk": "^0.4.3","ansi-styles": "^5.0.0","binary-extensions": "^2.2.0",+ "camelcase": "6",+ "decamelize": "5","expr-eval": "^2.0.2","flat": "^5.0.2","js-tiktoken": "^1.0.6","jsonpointer": "^5.0.1",+ "langchainplus-sdk": "^0.0.11","ml-distance": "^4.0.0","object-hash": "^3.0.0",- "openai": "^3.2.0",+ "openai": "^3.3.0","p-queue": "^6.6.2","p-retry": "4","uuid": "^9.0.0",@@ -30742,6 +30812,11 @@"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz","integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ=="},+ "@types/uuid": {+ "version": "9.0.2",+ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.2.tgz",+ "integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ=="+ },"@types/webidl-conversions": {"version": "7.0.0","resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz",@@ -38005,6 +38080,25 @@}}},+ "langchainplus-sdk": {+ "version": "0.0.11",+ "resolved": "https://registry.npmjs.org/langchainplus-sdk/-/langchainplus-sdk-0.0.11.tgz",+ "integrity": "sha512-bEovYVJZq88LYznDfK+ohNVd0lqQ1DMgE/A/8ZkqsiyaRuEjvIQj4PLc0VQ8htWPBljrfTu8oS7g+SGWYTZfNw==",+ "requires": {+ "@types/uuid": "^9.0.1",+ "commander": "^10.0.1",+ "p-queue": "^6.6.2",+ "p-retry": "4",+ "uuid": "^9.0.0"+ },+ "dependencies": {+ "commander": {+ "version": "10.0.1",+ "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",+ "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug=="+ }+ }+ },"leven": {"version": "3.1.0","resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",@@ -39735,9 +39829,9 @@}},"openai": {- "version": "3.2.1",- "resolved": "https://registry.npmjs.org/openai/-/openai-3.2.1.tgz",- "integrity": "sha512-762C9BNlJPbjjlWZi4WYK9iM2tAVAv0uUp1UmI34vb0CN5T2mjB/qM6RYBmNKMh/dN9fC+bxqPwWJZUTWW052A==",+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/openai/-/openai-3.3.0.tgz",+ "integrity": "sha512-uqxI/Au+aPRnsaQRe8CojU0eCR7I0mBiKjD3sNMzY6DaC1ZVrc85u98mtJW6voDug8fgGN+DIZmTDxTthxb7dQ==","requires": {"axios": "^0.26.0","form-data": "^4.0.0"