From 63afb317c6fa22849e1675feb2561784e4ddd57a Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Thu, 6 Feb 2025 18:13:18 -0500 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=9A=80=20fix:=20Resolve=20Google=20Cl?= =?UTF-8?q?ient=20Issues,=20CDN=20Screenshots,=20Update=20Models=20(#5703)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * πŸ€– refactor: streamline model selection logic for title model in GoogleClient * refactor: add options for empty object schemas in convertJsonSchemaToZod * refactor: add utility function to check for empty object schemas in convertJsonSchemaToZod * fix: Google MCP Tool errors, and remove Object Unescaping as Google fixed this * fix: google safetySettings * feat: add safety settings exclusion via GOOGLE_EXCLUDE_SAFETY_SETTINGS environment variable * fix: rename environment variable for console JSON string length * fix: disable portal for dropdown in ExportModal component * fix: screenshot functionality to use image placeholder for remote images * feat: add visionMode property to BaseClient and initialize in GoogleClient to fix resendFiles issue * fix: enhance formatMessages to include image URLs in message content for Vertex AI * fix: safety settings for titleChatCompletion * fix: remove deprecated model assignment in GoogleClient and streamline title model retrieval * fix: remove unused image preloading logic in ScreenshotContext * chore: update default google models to latest models shared by vertex ai and gen ai * refactor: enhance Google error messaging * fix: update token values and model limits for Gemini models * ci: fix model matching * chore: bump version of librechat-data-provider to 0.7.699 --- api/app/clients/BaseClient.js | 4 +- api/app/clients/GoogleClient.js | 103 +- api/config/parsers.js | 6 +- api/models/tx.js | 9 +- api/models/tx.spec.js | 78 + api/package.json | 2 +- api/server/services/Endpoints/google/llm.js | 46 +- api/server/services/Endpoints/google/title.js | 23 +- api/server/services/MCP.js | 19 +- api/utils/tokens.js | 13 +- api/utils/tokens.spec.js | 18 + .../src/components/Messages/Content/Error.tsx | 8 +- .../Nav/ExportConversation/ExportModal.tsx | 2 +- client/src/hooks/ScreenshotContext.tsx | 14 +- package-lock.json | 2822 +++++++++-------- packages/data-provider/package.json | 2 +- packages/data-provider/src/config.ts | 29 +- packages/data-provider/src/zod.spec.ts | 113 +- packages/data-provider/src/zod.ts | 24 +- 19 files changed, 1777 insertions(+), 1558 deletions(-) diff --git a/api/app/clients/BaseClient.js b/api/app/clients/BaseClient.js index 6ddcaa972197..ebf3ca12d9eb 100644 --- a/api/app/clients/BaseClient.js +++ b/api/app/clients/BaseClient.js @@ -57,6 +57,8 @@ class BaseClient { this.continued; /** @type {TMessage[]} */ this.currentMessages = []; + /** @type {import('librechat-data-provider').VisionModes | undefined} */ + this.visionMode; } setOptions() { @@ -1095,7 +1097,7 @@ class BaseClient { file_id: { $in: fileIds }, }); - await this.addImageURLs(message, files); + await this.addImageURLs(message, files, this.visionMode); this.message_file_map[message.messageId] = files; return message; diff --git a/api/app/clients/GoogleClient.js b/api/app/clients/GoogleClient.js index 6da843966433..03461a6796c2 100644 --- a/api/app/clients/GoogleClient.js +++ b/api/app/clients/GoogleClient.js @@ -10,11 +10,13 @@ const { getResponseSender, endpointSettings, EModelEndpoint, + ContentTypes, VisionModes, ErrorTypes, Constants, AuthKeys, } = require('librechat-data-provider'); +const { getSafetySettings } = require('~/server/services/Endpoints/google/llm'); const { encodeAndFormat } = require('~/server/services/Files/images'); const Tokenizer = require('~/server/services/Tokenizer'); const { spendTokens } = require('~/models/spendTokens'); @@ -70,7 +72,7 @@ class GoogleClient extends BaseClient { /** The key for the usage object's output tokens * @type {string} */ this.outputTokensKey = 'output_tokens'; - + this.visionMode = VisionModes.generative; if (options.skipSetOptions) { return; } @@ -215,10 +217,29 @@ class GoogleClient extends BaseClient { } formatMessages() { - return ((message) => ({ - author: message?.author ?? (message.isCreatedByUser ? this.userLabel : this.modelLabel), - content: message?.content ?? message.text, - })).bind(this); + return ((message) => { + const msg = { + author: message?.author ?? (message.isCreatedByUser ? this.userLabel : this.modelLabel), + content: message?.content ?? message.text, + }; + + if (!message.image_urls?.length) { + return msg; + } + + msg.content = ( + !Array.isArray(msg.content) + ? [ + { + type: ContentTypes.TEXT, + [ContentTypes.TEXT]: msg.content, + }, + ] + : msg.content + ).concat(message.image_urls); + + return msg; + }).bind(this); } /** @@ -566,6 +587,7 @@ class GoogleClient extends BaseClient { if (this.project_id != null) { logger.debug('Creating VertexAI client'); + this.visionMode = undefined; clientOptions.streaming = true; const client = new ChatVertexAI(clientOptions); client.temperature = clientOptions.temperature; @@ -607,13 +629,14 @@ class GoogleClient extends BaseClient { } async getCompletion(_payload, options = {}) { - const safetySettings = this.getSafetySettings(); const { onProgress, abortController } = options; + const safetySettings = getSafetySettings(this.modelOptions.model); const streamRate = this.options.streamRate ?? Constants.DEFAULT_STREAM_RATE; const modelName = this.modelOptions.modelName ?? this.modelOptions.model ?? ''; let reply = ''; - + /** @type {Error} */ + let error; try { if (!EXCLUDED_GENAI_MODELS.test(modelName) && !this.project_id) { /** @type {GenAI} */ @@ -714,8 +737,16 @@ class GoogleClient extends BaseClient { this.usage = usageMetadata; } } catch (e) { + error = e; logger.error('[GoogleClient] There was an issue generating the completion', e); } + + if (error != null && reply === '') { + const errorMessage = `{ "type": "${ErrorTypes.GoogleError}", "info": "${ + error.message ?? 'The Google provider failed to generate content, please contact the Admin.' + }" }`; + throw new Error(errorMessage); + } return reply; } @@ -781,12 +812,11 @@ class GoogleClient extends BaseClient { * Stripped-down logic for generating a title. This uses the non-streaming APIs, since the user does not see titles streaming */ async titleChatCompletion(_payload, options = {}) { - const { abortController } = options; - const safetySettings = this.getSafetySettings(); - let reply = ''; + const { abortController } = options; const model = this.modelOptions.modelName ?? this.modelOptions.model ?? ''; + const safetySettings = getSafetySettings(model); if (!EXCLUDED_GENAI_MODELS.test(model) && !this.project_id) { logger.debug('Identified titling model as GenAI version'); /** @type {GenerativeModel} */ @@ -844,17 +874,6 @@ class GoogleClient extends BaseClient { }, ]); - const model = process.env.GOOGLE_TITLE_MODEL ?? this.modelOptions.model; - const availableModels = this.options.modelsConfig?.[EModelEndpoint.google]; - this.isVisionModel = validateVisionModel({ model, availableModels }); - - if (this.isVisionModel) { - logger.warn( - `Current vision model does not support titling without an attachment; falling back to default model ${settings.model.default}`, - ); - this.modelOptions.model = settings.model.default; - } - try { this.initializeClient(); title = await this.titleChatCompletion(payload, { @@ -892,48 +911,6 @@ class GoogleClient extends BaseClient { return reply.trim(); } - getSafetySettings() { - const model = this.modelOptions.model; - const isGemini2 = model.includes('gemini-2.0') && !model.includes('thinking'); - const mapThreshold = (value) => { - if (isGemini2 && value === 'BLOCK_NONE') { - return 'OFF'; - } - return value; - }; - - return [ - { - category: 'HARM_CATEGORY_SEXUALLY_EXPLICIT', - threshold: mapThreshold( - process.env.GOOGLE_SAFETY_SEXUALLY_EXPLICIT || 'HARM_BLOCK_THRESHOLD_UNSPECIFIED', - ), - }, - { - category: 'HARM_CATEGORY_HATE_SPEECH', - threshold: mapThreshold( - process.env.GOOGLE_SAFETY_HATE_SPEECH || 'HARM_BLOCK_THRESHOLD_UNSPECIFIED', - ), - }, - { - category: 'HARM_CATEGORY_HARASSMENT', - threshold: mapThreshold( - process.env.GOOGLE_SAFETY_HARASSMENT || 'HARM_BLOCK_THRESHOLD_UNSPECIFIED', - ), - }, - { - category: 'HARM_CATEGORY_DANGEROUS_CONTENT', - threshold: mapThreshold( - process.env.GOOGLE_SAFETY_DANGEROUS_CONTENT || 'HARM_BLOCK_THRESHOLD_UNSPECIFIED', - ), - }, - { - category: 'HARM_CATEGORY_CIVIC_INTEGRITY', - threshold: mapThreshold(process.env.GOOGLE_SAFETY_CIVIC_INTEGRITY || 'BLOCK_NONE'), - }, - ]; - } - getEncoding() { return 'cl100k_base'; } diff --git a/api/config/parsers.js b/api/config/parsers.js index 51e9c052d0f7..7bf5be336e41 100644 --- a/api/config/parsers.js +++ b/api/config/parsers.js @@ -4,7 +4,7 @@ const traverse = require('traverse'); const SPLAT_SYMBOL = Symbol.for('splat'); const MESSAGE_SYMBOL = Symbol.for('message'); -const CONSOLE_JSON_LONG_STRING_LENGTH=parseInt(process.env.CONSOLE_JSON_LONG_STRING_LENGTH) || 255; +const CONSOLE_JSON_STRING_LENGTH = parseInt(process.env.CONSOLE_JSON_STRING_LENGTH) || 255; const sensitiveKeys = [ /^(sk-)[^\s]+/, // OpenAI API key pattern @@ -206,13 +206,13 @@ const jsonTruncateFormat = winston.format((info) => { seen.add(obj); if (Array.isArray(obj)) { - return obj.map(item => truncateObject(item)); + return obj.map((item) => truncateObject(item)); } const newObj = {}; Object.entries(obj).forEach(([key, value]) => { if (typeof value === 'string') { - newObj[key] = truncateLongStrings(value, CONSOLE_JSON_LONG_STRING_LENGTH); + newObj[key] = truncateLongStrings(value, CONSOLE_JSON_STRING_LENGTH); } else { newObj[key] = truncateObject(value); } diff --git a/api/models/tx.js b/api/models/tx.js index 776fac123c61..05412430c7f5 100644 --- a/api/models/tx.js +++ b/api/models/tx.js @@ -102,9 +102,14 @@ const tokenValues = Object.assign( /* cohere doesn't have rates for the older command models, so this was from https://artificialanalysis.ai/models/command-light/providers */ command: { prompt: 0.38, completion: 0.38 }, + 'gemini-2.0-flash-lite': { prompt: 0.075, completion: 0.3 }, + 'gemini-2.0-flash': { prompt: 0.1, completion: 0.7 }, 'gemini-2.0': { prompt: 0, completion: 0 }, // https://ai.google.dev/pricing - 'gemini-1.5': { prompt: 7, completion: 21 }, // May 2nd, 2024 pricing - gemini: { prompt: 0.5, completion: 1.5 }, // May 2nd, 2024 pricing + 'gemini-1.5-flash-8b': { prompt: 0.075, completion: 0.3 }, + 'gemini-1.5-flash': { prompt: 0.15, completion: 0.6 }, + 'gemini-1.5': { prompt: 2.5, completion: 10 }, + 'gemini-pro-vision': { prompt: 0.5, completion: 1.5 }, + gemini: { prompt: 0.5, completion: 1.5 }, }, bedrockValues, ); diff --git a/api/models/tx.spec.js b/api/models/tx.spec.js index 0492a0eedbfc..d77973a7f55c 100644 --- a/api/models/tx.spec.js +++ b/api/models/tx.spec.js @@ -380,3 +380,81 @@ describe('getCacheMultiplier', () => { ).toBe(0.03); }); }); + +describe('Google Model Tests', () => { + const googleModels = [ + 'gemini-2.0-flash-lite-preview-02-05', + 'gemini-2.0-flash-001', + 'gemini-2.0-flash-exp', + 'gemini-2.0-pro-exp-02-05', + 'gemini-1.5-flash-8b', + 'gemini-1.5-flash-thinking', + 'gemini-1.5-pro-latest', + 'gemini-1.5-pro-preview-0409', + 'gemini-pro-vision', + 'gemini-1.0', + 'gemini-pro', + ]; + + it('should return the correct prompt and completion rates for all models', () => { + const results = googleModels.map((model) => { + const valueKey = getValueKey(model, EModelEndpoint.google); + const promptRate = getMultiplier({ + model, + tokenType: 'prompt', + endpoint: EModelEndpoint.google, + }); + const completionRate = getMultiplier({ + model, + tokenType: 'completion', + endpoint: EModelEndpoint.google, + }); + return { model, valueKey, promptRate, completionRate }; + }); + + results.forEach(({ valueKey, promptRate, completionRate }) => { + expect(promptRate).toBe(tokenValues[valueKey].prompt); + expect(completionRate).toBe(tokenValues[valueKey].completion); + }); + }); + + it('should map to the correct model keys', () => { + const expected = { + 'gemini-2.0-flash-lite-preview-02-05': 'gemini-2.0-flash-lite', + 'gemini-2.0-flash-001': 'gemini-2.0-flash', + 'gemini-2.0-flash-exp': 'gemini-2.0-flash', + 'gemini-2.0-pro-exp-02-05': 'gemini-2.0', + 'gemini-1.5-flash-8b': 'gemini-1.5-flash-8b', + 'gemini-1.5-flash-thinking': 'gemini-1.5-flash', + 'gemini-1.5-pro-latest': 'gemini-1.5', + 'gemini-1.5-pro-preview-0409': 'gemini-1.5', + 'gemini-pro-vision': 'gemini-pro-vision', + 'gemini-1.0': 'gemini', + 'gemini-pro': 'gemini', + }; + + Object.entries(expected).forEach(([model, expectedKey]) => { + const valueKey = getValueKey(model, EModelEndpoint.google); + expect(valueKey).toBe(expectedKey); + }); + }); + + it('should handle model names with different formats', () => { + const testCases = [ + { input: 'google/gemini-pro', expected: 'gemini' }, + { input: 'gemini-pro/google', expected: 'gemini' }, + { input: 'google/gemini-2.0-flash-lite', expected: 'gemini-2.0-flash-lite' }, + ]; + + testCases.forEach(({ input, expected }) => { + const valueKey = getValueKey(input, EModelEndpoint.google); + expect(valueKey).toBe(expected); + expect( + getMultiplier({ model: input, tokenType: 'prompt', endpoint: EModelEndpoint.google }), + ).toBe(tokenValues[expected].prompt); + expect( + getMultiplier({ model: input, tokenType: 'completion', endpoint: EModelEndpoint.google }), + ).toBe(tokenValues[expected].completion); + }); + }); +}); diff --git a/api/package.json b/api/package.json index db55b94508ab..10264309c9c9 100644 --- a/api/package.json +++ b/api/package.json @@ -45,7 +45,7 @@ "@langchain/google-genai": "^0.1.7", "@langchain/google-vertexai": "^0.1.8", "@langchain/textsplitters": "^0.1.0", - "@librechat/agents": "^2.0.1", + "@librechat/agents": "^2.0.2", "@waylaidwanderer/fetch-event-source": "^3.0.1", "axios": "^1.7.7", "bcryptjs": "^2.4.3", diff --git a/api/server/services/Endpoints/google/llm.js b/api/server/services/Endpoints/google/llm.js index ae5e268ac3a6..a64b33480bee 100644 --- a/api/server/services/Endpoints/google/llm.js +++ b/api/server/services/Endpoints/google/llm.js @@ -1,18 +1,42 @@ const { Providers } = require('@librechat/agents'); const { AuthKeys } = require('librechat-data-provider'); +const { isEnabled } = require('~/server/utils'); + +function getThresholdMapping(model) { + const gemini1Pattern = /gemini-(1\.0|1\.5|pro$|1\.0-pro|1\.5-pro|1\.5-flash-001)/; + const restrictedPattern = /(gemini-(1\.5-flash-8b|2\.0|exp)|learnlm)/; + + if (gemini1Pattern.test(model)) { + return (value) => { + if (value === 'OFF') { + return 'BLOCK_NONE'; + } + return value; + }; + } + + if (restrictedPattern.test(model)) { + return (value) => { + if (value === 'OFF' || value === 'HARM_BLOCK_THRESHOLD_UNSPECIFIED') { + return 'BLOCK_NONE'; + } + return value; + }; + } + + return (value) => value; +} /** * - * @param {boolean} isGemini2 - * @returns {Array<{category: string, threshold: string}>} + * @param {string} model + * @returns {Array<{category: string, threshold: string}> | undefined} */ -function getSafetySettings(isGemini2) { - const mapThreshold = (value) => { - if (isGemini2 && value === 'BLOCK_NONE') { - return 'OFF'; - } - return value; - }; +function getSafetySettings(model) { + if (isEnabled(process.env.GOOGLE_EXCLUDE_SAFETY_SETTINGS)) { + return undefined; + } + const mapThreshold = getThresholdMapping(model); return [ { @@ -85,8 +109,7 @@ function getLLMConfig(credentials, options = {}) { }; /** Used only for Safety Settings */ - const isGemini2 = llmConfig.model.includes('gemini-2.0') && !llmConfig.model.includes('thinking'); - llmConfig.safetySettings = getSafetySettings(isGemini2); + llmConfig.safetySettings = getSafetySettings(llmConfig.model); let provider; @@ -153,4 +176,5 @@ function getLLMConfig(credentials, options = {}) { module.exports = { getLLMConfig, + getSafetySettings, }; diff --git a/api/server/services/Endpoints/google/title.js b/api/server/services/Endpoints/google/title.js index b93f13797ff4..dd8aa7a22008 100644 --- a/api/server/services/Endpoints/google/title.js +++ b/api/server/services/Endpoints/google/title.js @@ -1,9 +1,8 @@ -const { CacheKeys, Constants } = require('librechat-data-provider'); +const { EModelEndpoint, CacheKeys, Constants, googleSettings } = require('librechat-data-provider'); const getLogStores = require('~/cache/getLogStores'); +const initializeClient = require('./initialize'); const { isEnabled } = require('~/server/utils'); const { saveConvo } = require('~/models'); -const { logger } = require('~/config'); -const initializeClient = require('./initialize'); const addTitle = async (req, { text, response, client }) => { const { TITLE_CONVO = 'true' } = process.env ?? {}; @@ -14,22 +13,16 @@ const addTitle = async (req, { text, response, client }) => { if (client.options.titleConvo === false) { return; } - - const DEFAULT_TITLE_MODEL = 'gemini-pro'; const { GOOGLE_TITLE_MODEL } = process.env ?? {}; - - let model = GOOGLE_TITLE_MODEL ?? DEFAULT_TITLE_MODEL; + const providerConfig = req.app.locals[EModelEndpoint.google]; + let model = + providerConfig?.titleModel ?? + GOOGLE_TITLE_MODEL ?? + client.options?.modelOptions.model ?? + googleSettings.model.default; if (GOOGLE_TITLE_MODEL === Constants.CURRENT_MODEL) { model = client.options?.modelOptions.model; - - if (client.isVisionModel) { - logger.warn( - `current_model was specified for Google title request, but the model ${model} cannot process a text-only conversation. Falling back to ${DEFAULT_TITLE_MODEL}`, - ); - - model = DEFAULT_TITLE_MODEL; - } } const titleEndpointOptions = { diff --git a/api/server/services/MCP.js b/api/server/services/MCP.js index 4b23939e623b..f934f9d51994 100644 --- a/api/server/services/MCP.js +++ b/api/server/services/MCP.js @@ -1,9 +1,11 @@ +const { z } = require('zod'); const { tool } = require('@langchain/core/tools'); -const { Constants: AgentConstants } = require('@librechat/agents'); +const { Constants: AgentConstants, Providers } = require('@librechat/agents'); const { Constants, - convertJsonSchemaToZod, + ContentTypes, isAssistantsEndpoint, + convertJsonSchemaToZod, } = require('librechat-data-provider'); const { logger, getMCPManager } = require('~/config'); @@ -25,7 +27,15 @@ async function createMCPTool({ req, toolKey, provider }) { } /** @type {LCTool} */ const { description, parameters } = toolDefinition; - const schema = convertJsonSchemaToZod(parameters); + const isGoogle = provider === Providers.VERTEXAI || provider === Providers.GOOGLE; + let schema = convertJsonSchemaToZod(parameters, { + allowEmptyObject: !isGoogle, + }); + + if (!schema) { + schema = z.object({ input: z.string().optional() }); + } + const [toolName, serverName] = toolKey.split(Constants.mcp_delimiter); /** @type {(toolInput: Object | string) => Promise} */ const _call = async (toolInput) => { @@ -35,6 +45,9 @@ async function createMCPTool({ req, toolKey, provider }) { if (isAssistantsEndpoint(provider) && Array.isArray(result)) { return result[0]; } + if (isGoogle && Array.isArray(result[0]) && result[0][0]?.type === ContentTypes.TEXT) { + return [result[0][0].text, result[1]]; + } return result; } catch (error) { logger.error(`${toolName} MCP server tool call failed`, error); diff --git a/api/utils/tokens.js b/api/utils/tokens.js index b1c3a1e5a877..0541f4f301db 100644 --- a/api/utils/tokens.js +++ b/api/utils/tokens.js @@ -49,11 +49,14 @@ const cohereModels = { const googleModels = { /* Max I/O is combined so we subtract the amount from max response tokens for actual total */ gemini: 30720, // -2048 from max - 'gemini-pro-vision': 12288, // -4096 from max - 'gemini-exp': 8000, - 'gemini-2.0-flash-thinking-exp': 30720, // -2048 from max - 'gemini-2.0': 1048576, - 'gemini-1.5': 1048576, + 'gemini-pro-vision': 12288, + 'gemini-exp': 2000000, + 'gemini-2.0': 2000000, + 'gemini-2.0-flash': 1000000, + 'gemini-2.0-flash-lite': 1000000, + 'gemini-1.5': 1000000, + 'gemini-1.5-flash': 1000000, + 'gemini-1.5-flash-8b': 1000000, 'text-bison-32k': 32758, // -10 from max 'chat-bison-32k': 32758, // -10 from max 'code-bison-32k': 32758, // -10 from max diff --git a/api/utils/tokens.spec.js b/api/utils/tokens.spec.js index f478c4769b61..eb1fd85495ff 100644 --- a/api/utils/tokens.spec.js +++ b/api/utils/tokens.spec.js @@ -154,6 +154,24 @@ describe('getModelMaxTokens', () => { }); test('should return correct tokens for partial match - Google models', () => { + expect(getModelMaxTokens('gemini-2.0-flash-lite-preview-02-05', EModelEndpoint.google)).toBe( + maxTokensMap[EModelEndpoint.google]['gemini-2.0-flash-lite'], + ); + expect(getModelMaxTokens('gemini-2.0-flash-001', EModelEndpoint.google)).toBe( + maxTokensMap[EModelEndpoint.google]['gemini-2.0-flash'], + ); + expect(getModelMaxTokens('gemini-2.0-flash-exp', EModelEndpoint.google)).toBe( + maxTokensMap[EModelEndpoint.google]['gemini-2.0-flash'], + ); + expect(getModelMaxTokens('gemini-2.0-pro-exp-02-05', EModelEndpoint.google)).toBe( + maxTokensMap[EModelEndpoint.google]['gemini-2.0'], + ); + expect(getModelMaxTokens('gemini-1.5-flash-8b', EModelEndpoint.google)).toBe( + maxTokensMap[EModelEndpoint.google]['gemini-1.5-flash-8b'], + ); + expect(getModelMaxTokens('gemini-1.5-flash-thinking', EModelEndpoint.google)).toBe( + maxTokensMap[EModelEndpoint.google]['gemini-1.5-flash'], + ); expect(getModelMaxTokens('gemini-1.5-pro-latest', EModelEndpoint.google)).toBe( maxTokensMap[EModelEndpoint.google]['gemini-1.5'], ); diff --git a/client/src/components/Messages/Content/Error.tsx b/client/src/components/Messages/Content/Error.tsx index b33169813f2e..90b78dc6699a 100644 --- a/client/src/components/Messages/Content/Error.tsx +++ b/client/src/components/Messages/Content/Error.tsx @@ -33,7 +33,7 @@ type TExpiredKey = { endpoint: string; }; -type TInputLength = { +type TGenericError = { info: string; }; @@ -49,10 +49,14 @@ const errorMessages = { const { expiredAt, endpoint } = json; return localize('com_error_expired_user_key', endpoint, expiredAt); }, - [ErrorTypes.INPUT_LENGTH]: (json: TInputLength, localize: LocalizeFunction) => { + [ErrorTypes.INPUT_LENGTH]: (json: TGenericError, localize: LocalizeFunction) => { const { info } = json; return localize('com_error_input_length', info); }, + [ErrorTypes.GOOGLE_ERROR]: (json: TGenericError) => { + const { info } = json; + return info; + }, [ViolationTypes.BAN]: 'Your account has been temporarily banned due to violations of our service.', invalid_api_key: diff --git a/client/src/components/Nav/ExportConversation/ExportModal.tsx b/client/src/components/Nav/ExportConversation/ExportModal.tsx index 026bf1869d21..bae8327ebe73 100644 --- a/client/src/components/Nav/ExportConversation/ExportModal.tsx +++ b/client/src/components/Nav/ExportConversation/ExportModal.tsx @@ -94,7 +94,7 @@ export default function ExportModal({ - +
diff --git a/client/src/hooks/ScreenshotContext.tsx b/client/src/hooks/ScreenshotContext.tsx index bd841b68aa7b..2f9069c5f1bf 100644 --- a/client/src/hooks/ScreenshotContext.tsx +++ b/client/src/hooks/ScreenshotContext.tsx @@ -12,7 +12,7 @@ export const useScreenshot = () => { const { ref } = useContext(ScreenshotContext); const { theme } = useContext(ThemeContext); - const takeScreenShot = async (node: HTMLElement) => { + const takeScreenShot = async (node?: HTMLElement) => { if (!node) { throw new Error('You should provide correct html node.'); } @@ -22,7 +22,13 @@ export const useScreenshot = () => { isDark = window.matchMedia('(prefers-color-scheme: dark)').matches; } const backgroundColor = isDark ? '#171717' : 'white'; - const canvas = await toCanvas(node); + + const canvas = await toCanvas(node, { + backgroundColor, + imagePlaceholder: + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=', + }); + const croppedCanvas = document.createElement('canvas'); const croppedCanvasContext = croppedCanvas.getContext('2d') as CanvasRenderingContext2D; // init data @@ -35,9 +41,9 @@ export const useScreenshot = () => { croppedCanvas.height = cropHeight; croppedCanvasContext.fillStyle = backgroundColor; - croppedCanvasContext?.fillRect(0, 0, cropWidth, cropHeight); + croppedCanvasContext.fillRect(0, 0, cropWidth, cropHeight); - croppedCanvasContext?.drawImage(canvas, cropPositionLeft, cropPositionTop); + croppedCanvasContext.drawImage(canvas, cropPositionLeft, cropPositionTop); const base64Image = croppedCanvas.toDataURL('image/png', 1); diff --git a/package-lock.json b/package-lock.json index 19416839654d..f05d0d85b406 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,7 +54,7 @@ "@langchain/google-genai": "^0.1.7", "@langchain/google-vertexai": "^0.1.8", "@langchain/textsplitters": "^0.1.0", - "@librechat/agents": "^2.0.1", + "@librechat/agents": "^2.0.2", "@waylaidwanderer/fetch-event-source": "^3.0.1", "axios": "^1.7.7", "bcryptjs": "^2.4.3", @@ -646,754 +646,195 @@ "@langchain/core": ">=0.2.21 <0.4.0" } }, - "api/node_modules/@librechat/agents": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-2.0.1.tgz", - "integrity": "sha512-PVVqvJ90X8o2dV7To9MnrsidmtBS+Q/jcCL2TPNmIrsLDgK8rDQWL3p4mkDzenSJ/f8J6w5bt9bWoo18ibhkJw==", + "api/node_modules/@types/node": { + "version": "18.19.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.14.tgz", + "integrity": "sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==", "dependencies": { - "@aws-crypto/sha256-js": "^5.2.0", - "@aws-sdk/credential-provider-node": "^3.613.0", - "@aws-sdk/types": "^3.609.0", - "@langchain/anthropic": "^0.3.12", - "@langchain/aws": "^0.1.3", - "@langchain/community": "^0.3.27", - "@langchain/core": "^0.3.37", - "@langchain/google-genai": "^0.1.7", - "@langchain/google-vertexai": "^0.1.8", - "@langchain/langgraph": "^0.2.41", - "@langchain/mistralai": "^0.0.26", - "@langchain/ollama": "^0.1.5", - "@langchain/openai": "^0.4.2", - "@smithy/eventstream-codec": "^2.2.0", - "@smithy/protocol-http": "^3.0.6", - "@smithy/signature-v4": "^2.0.10", - "@smithy/util-utf8": "^2.0.0", - "dotenv": "^16.4.5", - "nanoid": "^3.3.7" + "undici-types": "~5.26.4" + } + }, + "api/node_modules/@types/whatwg-url": { + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz", + "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==", + "optional": true, + "peer": true, + "dependencies": { + "@types/webidl-conversions": "*" + } + }, + "api/node_modules/cookie-parser": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz", + "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==", + "dependencies": { + "cookie": "0.7.2", + "cookie-signature": "1.0.6" }, "engines": { - "node": ">=14.0.0" + "node": ">= 0.8.0" + } + }, + "api/node_modules/express-rate-limit": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.4.1.tgz", + "integrity": "sha512-KS3efpnpIDVIXopMc65EMbWbUht7qvTCdtCR2dD/IZmi9MIkopYESwyRqLgv8Pfu589+KqDqOdzJWW7AHoACeg==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": "4 || 5 || ^5.0.0-beta.1" + } + }, + "api/node_modules/express/node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "extraneous": true, + "engines": { + "node": ">= 0.6" } }, - "api/node_modules/@librechat/agents/node_modules/@langchain/community": { - "version": "0.3.28", - "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.28.tgz", - "integrity": "sha512-lr3rBe5qE1HGlfUieMayNNT8VGiH4yl4WdQnrf+i0IikDooJOvjTIFqsYqGvdLfpuNKN0JN05jwgvUwOGKTv7A==", + "api/node_modules/mongodb": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.10.0.tgz", + "integrity": "sha512-gP9vduuYWb9ZkDM546M+MP2qKVk5ZG2wPF63OvSRuUbqCR+11ZCAE1mOfllhlAG0wcoJY5yDL/rV3OmYEwXIzg==", + "optional": true, + "peer": true, "dependencies": { - "@langchain/openai": ">=0.2.0 <0.5.0", - "binary-extensions": "^2.2.0", - "expr-eval": "^2.0.2", - "flat": "^5.0.2", - "js-yaml": "^4.1.0", - "langchain": ">=0.2.3 <0.3.0 || >=0.3.4 <0.4.0", - "langsmith": ">=0.2.8 <0.4.0", - "uuid": "^10.0.0", - "zod": "^3.22.3", - "zod-to-json-schema": "^3.22.5" + "@mongodb-js/saslprep": "^1.1.5", + "bson": "^6.7.0", + "mongodb-connection-string-url": "^3.0.0" }, "engines": { - "node": ">=18" + "node": ">=16.20.1" }, "peerDependencies": { - "@arcjet/redact": "^v1.0.0-alpha.23", - "@aws-crypto/sha256-js": "^5.0.0", - "@aws-sdk/client-bedrock-agent-runtime": "^3.583.0", - "@aws-sdk/client-bedrock-runtime": "^3.422.0", - "@aws-sdk/client-dynamodb": "^3.310.0", - "@aws-sdk/client-kendra": "^3.352.0", - "@aws-sdk/client-lambda": "^3.310.0", - "@aws-sdk/client-s3": "^3.310.0", - "@aws-sdk/client-sagemaker-runtime": "^3.310.0", - "@aws-sdk/client-sfn": "^3.310.0", - "@aws-sdk/credential-provider-node": "^3.388.0", - "@azure/search-documents": "^12.0.0", - "@azure/storage-blob": "^12.15.0", - "@browserbasehq/sdk": "*", - "@browserbasehq/stagehand": "^1.0.0", - "@clickhouse/client": "^0.2.5", - "@cloudflare/ai": "*", - "@datastax/astra-db-ts": "^1.0.0", - "@elastic/elasticsearch": "^8.4.0", - "@getmetal/metal-sdk": "*", - "@getzep/zep-cloud": "^1.0.6", - "@getzep/zep-js": "^0.9.0", - "@gomomento/sdk": "^1.51.1", - "@gomomento/sdk-core": "^1.51.1", - "@google-ai/generativelanguage": "*", - "@google-cloud/storage": "^6.10.1 || ^7.7.0", - "@gradientai/nodejs-sdk": "^1.2.0", - "@huggingface/inference": "^2.6.4", - "@huggingface/transformers": "^3.2.3", - "@ibm-cloud/watsonx-ai": "*", - "@lancedb/lancedb": "^0.12.0", - "@langchain/core": ">=0.2.21 <0.4.0", - "@layerup/layerup-security": "^1.5.12", - "@libsql/client": "^0.14.0", - "@mendable/firecrawl-js": "^1.4.3", - "@mlc-ai/web-llm": "*", - "@mozilla/readability": "*", - "@neondatabase/serverless": "*", - "@notionhq/client": "^2.2.10", - "@opensearch-project/opensearch": "*", - "@pinecone-database/pinecone": "*", - "@planetscale/database": "^1.8.0", - "@premai/prem-sdk": "^0.3.25", - "@qdrant/js-client-rest": "^1.8.2", - "@raycast/api": "^1.55.2", - "@rockset/client": "^0.9.1", - "@smithy/eventstream-codec": "^2.0.5", - "@smithy/protocol-http": "^3.0.6", - "@smithy/signature-v4": "^2.0.10", - "@smithy/util-utf8": "^2.0.0", - "@spider-cloud/spider-client": "^0.0.21", - "@supabase/supabase-js": "^2.45.0", - "@tensorflow-models/universal-sentence-encoder": "*", - "@tensorflow/tfjs-converter": "*", - "@tensorflow/tfjs-core": "*", - "@upstash/ratelimit": "^1.1.3 || ^2.0.3", - "@upstash/redis": "^1.20.6", - "@upstash/vector": "^1.1.1", - "@vercel/kv": "*", - "@vercel/postgres": "*", - "@writerai/writer-sdk": "^0.40.2", - "@xata.io/client": "^0.28.0", - "@zilliz/milvus2-sdk-node": ">=2.3.5", - "apify-client": "^2.7.1", - "assemblyai": "^4.6.0", - "better-sqlite3": ">=9.4.0 <12.0.0", - "cassandra-driver": "^4.7.2", - "cborg": "^4.1.1", - "cheerio": "^1.0.0-rc.12", - "chromadb": "*", - "closevector-common": "0.1.3", - "closevector-node": "0.1.6", - "closevector-web": "0.1.6", - "cohere-ai": "*", - "convex": "^1.3.1", - "crypto-js": "^4.2.0", - "d3-dsv": "^2.0.0", - "discord.js": "^14.14.1", - "dria": "^0.0.3", - "duck-duck-scrape": "^2.2.5", - "epub2": "^3.0.1", - "faiss-node": "^0.5.1", - "fast-xml-parser": "*", - "firebase-admin": "^11.9.0 || ^12.0.0", - "google-auth-library": "*", - "googleapis": "*", - "hnswlib-node": "^3.0.0", - "html-to-text": "^9.0.5", - "ibm-cloud-sdk-core": "*", - "ignore": "^5.2.0", - "interface-datastore": "^8.2.11", - "ioredis": "^5.3.2", - "it-all": "^3.0.4", - "jsdom": "*", - "jsonwebtoken": "^9.0.2", - "llmonitor": "^0.5.9", - "lodash": "^4.17.21", - "lunary": "^0.7.10", - "mammoth": "^1.6.0", - "mongodb": ">=5.2.0", - "mysql2": "^3.9.8", - "neo4j-driver": "*", - "notion-to-md": "^3.1.0", - "officeparser": "^4.0.4", - "openai": "*", - "pdf-parse": "1.1.1", - "pg": "^8.11.0", - "pg-copy-streams": "^6.0.5", - "pickleparser": "^0.2.1", - "playwright": "^1.32.1", - "portkey-ai": "^0.1.11", - "puppeteer": "*", - "pyodide": ">=0.24.1 <0.27.0", - "redis": "*", - "replicate": "^0.29.4", - "sonix-speech-recognition": "^2.1.1", - "srt-parser-2": "^1.2.3", - "typeorm": "^0.3.20", - "typesense": "^1.5.3", - "usearch": "^1.1.1", - "voy-search": "0.6.2", - "weaviate-ts-client": "*", - "web-auth-library": "^1.0.3", - "word-extractor": "*", - "ws": "^8.14.2", - "youtubei.js": "*" + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.1.0", + "gcp-metadata": "^5.2.0", + "kerberos": "^2.0.1", + "mongodb-client-encryption": ">=6.0.0 <7", + "snappy": "^7.2.2", + "socks": "^2.7.1" }, "peerDependenciesMeta": { - "@arcjet/redact": { - "optional": true - }, - "@aws-crypto/sha256-js": { - "optional": true - }, - "@aws-sdk/client-bedrock-agent-runtime": { - "optional": true - }, - "@aws-sdk/client-bedrock-runtime": { - "optional": true - }, - "@aws-sdk/client-dynamodb": { - "optional": true - }, - "@aws-sdk/client-kendra": { - "optional": true - }, - "@aws-sdk/client-lambda": { - "optional": true - }, - "@aws-sdk/client-s3": { - "optional": true - }, - "@aws-sdk/client-sagemaker-runtime": { - "optional": true - }, - "@aws-sdk/client-sfn": { - "optional": true - }, - "@aws-sdk/credential-provider-node": { - "optional": true - }, - "@azure/search-documents": { - "optional": true - }, - "@azure/storage-blob": { - "optional": true - }, - "@browserbasehq/sdk": { - "optional": true - }, - "@clickhouse/client": { - "optional": true - }, - "@cloudflare/ai": { - "optional": true - }, - "@datastax/astra-db-ts": { - "optional": true - }, - "@elastic/elasticsearch": { - "optional": true - }, - "@getmetal/metal-sdk": { - "optional": true - }, - "@getzep/zep-cloud": { - "optional": true - }, - "@getzep/zep-js": { - "optional": true - }, - "@gomomento/sdk": { - "optional": true - }, - "@gomomento/sdk-core": { - "optional": true - }, - "@google-ai/generativelanguage": { - "optional": true - }, - "@google-cloud/storage": { - "optional": true - }, - "@gradientai/nodejs-sdk": { - "optional": true - }, - "@huggingface/inference": { - "optional": true - }, - "@huggingface/transformers": { - "optional": true - }, - "@lancedb/lancedb": { - "optional": true - }, - "@layerup/layerup-security": { - "optional": true - }, - "@libsql/client": { - "optional": true - }, - "@mendable/firecrawl-js": { - "optional": true - }, - "@mlc-ai/web-llm": { - "optional": true - }, - "@mozilla/readability": { - "optional": true - }, - "@neondatabase/serverless": { - "optional": true - }, - "@notionhq/client": { - "optional": true - }, - "@opensearch-project/opensearch": { - "optional": true - }, - "@pinecone-database/pinecone": { - "optional": true - }, - "@planetscale/database": { - "optional": true - }, - "@premai/prem-sdk": { - "optional": true - }, - "@qdrant/js-client-rest": { - "optional": true - }, - "@raycast/api": { - "optional": true - }, - "@rockset/client": { - "optional": true - }, - "@smithy/eventstream-codec": { - "optional": true - }, - "@smithy/protocol-http": { - "optional": true - }, - "@smithy/signature-v4": { - "optional": true - }, - "@smithy/util-utf8": { - "optional": true - }, - "@spider-cloud/spider-client": { - "optional": true - }, - "@supabase/supabase-js": { - "optional": true - }, - "@tensorflow-models/universal-sentence-encoder": { - "optional": true - }, - "@tensorflow/tfjs-converter": { - "optional": true - }, - "@tensorflow/tfjs-core": { - "optional": true - }, - "@upstash/ratelimit": { - "optional": true - }, - "@upstash/redis": { - "optional": true - }, - "@upstash/vector": { - "optional": true - }, - "@vercel/kv": { - "optional": true - }, - "@vercel/postgres": { - "optional": true - }, - "@writerai/writer-sdk": { - "optional": true - }, - "@xata.io/client": { - "optional": true - }, - "@zilliz/milvus2-sdk-node": { - "optional": true - }, - "apify-client": { + "@aws-sdk/credential-providers": { "optional": true }, - "assemblyai": { + "@mongodb-js/zstd": { "optional": true }, - "better-sqlite3": { + "gcp-metadata": { "optional": true }, - "cassandra-driver": { + "kerberos": { "optional": true }, - "cborg": { + "mongodb-client-encryption": { "optional": true }, - "cheerio": { + "snappy": { "optional": true }, - "chromadb": { + "socks": { "optional": true - }, - "closevector-common": { + } + } + }, + "api/node_modules/mongodb-connection-string-url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.1.tgz", + "integrity": "sha512-XqMGwRX0Lgn05TDB4PyG2h2kKO/FfWJyCzYQbIhXUxz7ETt0I/FqHjUeqj37irJ+Dl1ZtU82uYyj14u2XsZKfg==", + "optional": true, + "peer": true, + "dependencies": { + "@types/whatwg-url": "^11.0.2", + "whatwg-url": "^13.0.0" + } + }, + "api/node_modules/mongodb-connection-string-url/node_modules/tr46": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "optional": true, + "peer": true, + "dependencies": { + "punycode": "^2.3.0" + }, + "engines": { + "node": ">=14" + } + }, + "api/node_modules/mongodb-connection-string-url/node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "optional": true, + "peer": true, + "engines": { + "node": ">=12" + } + }, + "api/node_modules/mongodb-connection-string-url/node_modules/whatwg-url": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz", + "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==", + "optional": true, + "peer": true, + "dependencies": { + "tr46": "^4.1.1", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=16" + } + }, + "api/node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { "optional": true - }, - "closevector-node": { - "optional": true - }, - "closevector-web": { - "optional": true - }, - "cohere-ai": { - "optional": true - }, - "convex": { - "optional": true - }, - "crypto-js": { - "optional": true - }, - "d3-dsv": { - "optional": true - }, - "discord.js": { - "optional": true - }, - "dria": { - "optional": true - }, - "duck-duck-scrape": { - "optional": true - }, - "epub2": { - "optional": true - }, - "faiss-node": { - "optional": true - }, - "fast-xml-parser": { - "optional": true - }, - "firebase-admin": { - "optional": true - }, - "google-auth-library": { - "optional": true - }, - "googleapis": { - "optional": true - }, - "hnswlib-node": { - "optional": true - }, - "html-to-text": { - "optional": true - }, - "ignore": { - "optional": true - }, - "interface-datastore": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "it-all": { - "optional": true - }, - "jsdom": { - "optional": true - }, - "jsonwebtoken": { - "optional": true - }, - "llmonitor": { - "optional": true - }, - "lodash": { - "optional": true - }, - "lunary": { - "optional": true - }, - "mammoth": { - "optional": true - }, - "mongodb": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "neo4j-driver": { - "optional": true - }, - "notion-to-md": { - "optional": true - }, - "officeparser": { - "optional": true - }, - "pdf-parse": { - "optional": true - }, - "pg": { - "optional": true - }, - "pg-copy-streams": { - "optional": true - }, - "pickleparser": { - "optional": true - }, - "playwright": { - "optional": true - }, - "portkey-ai": { - "optional": true - }, - "puppeteer": { - "optional": true - }, - "pyodide": { - "optional": true - }, - "redis": { - "optional": true - }, - "replicate": { - "optional": true - }, - "sonix-speech-recognition": { - "optional": true - }, - "srt-parser-2": { - "optional": true - }, - "typeorm": { - "optional": true - }, - "typesense": { - "optional": true - }, - "usearch": { - "optional": true - }, - "voy-search": { - "optional": true - }, - "weaviate-ts-client": { - "optional": true - }, - "web-auth-library": { - "optional": true - }, - "word-extractor": { - "optional": true - }, - "ws": { - "optional": true - }, - "youtubei.js": { - "optional": true - } - } - }, - "api/node_modules/@librechat/agents/node_modules/@langchain/openai": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.4.2.tgz", - "integrity": "sha512-Cuj7qbVcycALTP0aqZuPpEc7As8cwiGaU21MhXRyZFs+dnWxKYxZ1Q1z4kcx6cYkq/I+CNwwmk+sP+YruU73Aw==", - "dependencies": { - "js-tiktoken": "^1.0.12", - "openai": "^4.77.0", - "zod": "^3.22.4", - "zod-to-json-schema": "^3.22.3" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@langchain/core": ">=0.3.29 <0.4.0" - } - }, - "api/node_modules/@types/node": { - "version": "18.19.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.14.tgz", - "integrity": "sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "api/node_modules/@types/whatwg-url": { - "version": "11.0.5", - "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz", - "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==", - "optional": true, - "peer": true, - "dependencies": { - "@types/webidl-conversions": "*" - } - }, - "api/node_modules/cookie-parser": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz", - "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==", - "dependencies": { - "cookie": "0.7.2", - "cookie-signature": "1.0.6" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "api/node_modules/express-rate-limit": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.4.1.tgz", - "integrity": "sha512-KS3efpnpIDVIXopMc65EMbWbUht7qvTCdtCR2dD/IZmi9MIkopYESwyRqLgv8Pfu589+KqDqOdzJWW7AHoACeg==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/express-rate-limit" - }, - "peerDependencies": { - "express": "4 || 5 || ^5.0.0-beta.1" - } - }, - "api/node_modules/express/node_modules/cookie": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", - "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", - "extraneous": true, - "engines": { - "node": ">= 0.6" - } - }, - "api/node_modules/mongodb": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.10.0.tgz", - "integrity": "sha512-gP9vduuYWb9ZkDM546M+MP2qKVk5ZG2wPF63OvSRuUbqCR+11ZCAE1mOfllhlAG0wcoJY5yDL/rV3OmYEwXIzg==", - "optional": true, - "peer": true, - "dependencies": { - "@mongodb-js/saslprep": "^1.1.5", - "bson": "^6.7.0", - "mongodb-connection-string-url": "^3.0.0" - }, - "engines": { - "node": ">=16.20.1" - }, - "peerDependencies": { - "@aws-sdk/credential-providers": "^3.188.0", - "@mongodb-js/zstd": "^1.1.0", - "gcp-metadata": "^5.2.0", - "kerberos": "^2.0.1", - "mongodb-client-encryption": ">=6.0.0 <7", - "snappy": "^7.2.2", - "socks": "^2.7.1" - }, - "peerDependenciesMeta": { - "@aws-sdk/credential-providers": { - "optional": true - }, - "@mongodb-js/zstd": { - "optional": true - }, - "gcp-metadata": { - "optional": true - }, - "kerberos": { - "optional": true - }, - "mongodb-client-encryption": { - "optional": true - }, - "snappy": { - "optional": true - }, - "socks": { - "optional": true - } - } - }, - "api/node_modules/mongodb-connection-string-url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.1.tgz", - "integrity": "sha512-XqMGwRX0Lgn05TDB4PyG2h2kKO/FfWJyCzYQbIhXUxz7ETt0I/FqHjUeqj37irJ+Dl1ZtU82uYyj14u2XsZKfg==", - "optional": true, - "peer": true, - "dependencies": { - "@types/whatwg-url": "^11.0.2", - "whatwg-url": "^13.0.0" - } - }, - "api/node_modules/mongodb-connection-string-url/node_modules/tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", - "optional": true, - "peer": true, - "dependencies": { - "punycode": "^2.3.0" - }, - "engines": { - "node": ">=14" - } - }, - "api/node_modules/mongodb-connection-string-url/node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "optional": true, - "peer": true, - "engines": { - "node": ">=12" - } - }, - "api/node_modules/mongodb-connection-string-url/node_modules/whatwg-url": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz", - "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==", - "optional": true, - "peer": true, - "dependencies": { - "tr46": "^4.1.1", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "api/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "api/node_modules/openai": { - "version": "4.71.1", - "resolved": "https://registry.npmjs.org/openai/-/openai-4.71.1.tgz", - "integrity": "sha512-C6JNMaQ1eijM0lrjiRUL3MgThVP5RdwNAghpbJFdW0t11LzmyqON8Eh8MuUuEZ+CeD6bgYl2Fkn2BoptVxv9Ug==", - "license": "Apache-2.0", - "dependencies": { - "@types/node": "^18.11.18", - "@types/node-fetch": "^2.6.4", - "abort-controller": "^3.0.0", - "agentkeepalive": "^4.2.1", - "form-data-encoder": "1.7.2", - "formdata-node": "^4.3.2", - "node-fetch": "^2.6.7" - }, - "bin": { - "openai": "bin/cli" - }, - "peerDependencies": { - "zod": "^3.23.8" - }, - "peerDependenciesMeta": { - "zod": { + } + } + }, + "api/node_modules/openai": { + "version": "4.71.1", + "resolved": "https://registry.npmjs.org/openai/-/openai-4.71.1.tgz", + "integrity": "sha512-C6JNMaQ1eijM0lrjiRUL3MgThVP5RdwNAghpbJFdW0t11LzmyqON8Eh8MuUuEZ+CeD6bgYl2Fkn2BoptVxv9Ug==", + "license": "Apache-2.0", + "dependencies": { + "@types/node": "^18.11.18", + "@types/node-fetch": "^2.6.4", + "abort-controller": "^3.0.0", + "agentkeepalive": "^4.2.1", + "form-data-encoder": "1.7.2", + "formdata-node": "^4.3.2", + "node-fetch": "^2.6.7" + }, + "bin": { + "openai": "bin/cli" + }, + "peerDependencies": { + "zod": "^3.23.8" + }, + "peerDependenciesMeta": { + "zod": { "optional": true } } @@ -6587,9 +6028,9 @@ } }, "node_modules/@browserbasehq/stagehand": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@browserbasehq/stagehand/-/stagehand-1.11.0.tgz", - "integrity": "sha512-I1gBsSouWXCOxl+FJMhB40XIjKnHmYFAfXDg4e/m2VR8YJqIOdLJeT6CQmgzKpre7JqplaAFqEcgifm+CK7mGQ==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@browserbasehq/stagehand/-/stagehand-1.12.0.tgz", + "integrity": "sha512-RWhdGxs2tUKyNpUh710ct/1Wwhv4jsEc1Qs8lz8Qngm3y7onRu0WYH0Cf3mnFZqYLTf3ni9x17VNju8YJACa5Q==", "peer": true, "dependencies": { "@anthropic-ai/sdk": "^0.27.3", @@ -6621,9 +6062,9 @@ } }, "node_modules/@browserbasehq/stagehand/node_modules/@types/node": { - "version": "18.19.74", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.74.tgz", - "integrity": "sha512-HMwEkkifei3L605gFdV+/UwtpxP6JSzM+xFk2Ia6DNFSwSVBRh9qp5Tgf4lNFOMfPVuU0WnkcWpXZpgn5ufO4A==", + "version": "18.19.75", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.75.tgz", + "integrity": "sha512-UIksWtThob6ZVSyxcOqCLOUNg/dyO1Qvx4McgeuhrEtHTLFTf7BBhEazaE4K806FGTPtzd/2sE90qn4fVr7cyw==", "peer": true, "dependencies": { "undici-types": "~5.26.4" @@ -9418,337 +8859,1323 @@ "v8-to-istanbul": "^9.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@jest/reporters/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", + "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@keyv/mongo": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/@keyv/mongo/-/mongo-2.2.8.tgz", + "integrity": "sha512-2y8RXQDzCUzvhkzjH0bj4+Ur9Ce+x9PjNrV6KnGGpRocexFKVgOYexIegnEc/DBy6HhNyqUlgWOpuFfnhpmF+A==", + "dependencies": { + "mongodb": "^4.5.0", + "pify": "^5.0.0" + } + }, + "node_modules/@keyv/mongo/node_modules/bson": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", + "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", + "dependencies": { + "buffer": "^5.6.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@keyv/mongo/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/@keyv/mongo/node_modules/mongodb": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.2.tgz", + "integrity": "sha512-mLV7SEiov2LHleRJPMPrK2PMyhXFZt2UQLC4VD4pnth3jMjYKHhtqfwwkkvS/NXuo/Fp3vbhaNcXrIDaLRb9Tg==", + "dependencies": { + "bson": "^4.7.2", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" + }, + "engines": { + "node": ">=12.9.0" + }, + "optionalDependencies": { + "@aws-sdk/credential-providers": "^3.186.0", + "@mongodb-js/saslprep": "^1.1.0" + } + }, + "node_modules/@keyv/redis": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/@keyv/redis/-/redis-2.8.4.tgz", + "integrity": "sha512-osO4C+i+Gi844wHjvXuHwhl+sDx3289Of309ZlLcj6SJReTLmPXzNiVR81N88wOu5aC+lVFdmx9FUQkkjdbPRQ==", + "dependencies": { + "ioredis": "^5.3.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@langchain/anthropic": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-0.3.12.tgz", + "integrity": "sha512-vYANJVeus+v8wieTST5GUGlennY87NMIjaFx6JCJN8MMtf2KVwyBWQAUAPyGwzVQ40tru3w0rK2ruvzYBRcWEg==", + "dependencies": { + "@anthropic-ai/sdk": "^0.32.1", + "fast-xml-parser": "^4.4.1", + "zod": "^3.22.4", + "zod-to-json-schema": "^3.22.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@langchain/core": ">=0.2.21 <0.4.0" + } + }, + "node_modules/@langchain/aws": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@langchain/aws/-/aws-0.1.3.tgz", + "integrity": "sha512-OjS6V/virzRvOX1D2xgTyyHkYzdepjes77dU2bBS53jt4mp0DT8vzgclZQ/16DA20YgNFtMKYiFbOfMI+RTHyg==", + "dependencies": { + "@aws-sdk/client-bedrock-agent-runtime": "^3.616.0", + "@aws-sdk/client-bedrock-runtime": "^3.602.0", + "@aws-sdk/client-kendra": "^3.352.0", + "@aws-sdk/credential-provider-node": "^3.600.0", + "zod": "^3.23.8", + "zod-to-json-schema": "^3.22.5" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@langchain/core": ">=0.2.21 <0.4.0" + } + }, + "node_modules/@langchain/community": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.15.tgz", + "integrity": "sha512-yG4cv33u7zYar14yqZCI7o2KjwRb+9S7upVzEmVVETimpicm9UjpkMfX4qa4A4IslM1TtC4uy2Ymu9EcINZSpQ==", + "optional": true, + "peer": true, + "dependencies": { + "@langchain/openai": ">=0.2.0 <0.4.0", + "binary-extensions": "^2.2.0", + "expr-eval": "^2.0.2", + "flat": "^5.0.2", + "js-yaml": "^4.1.0", + "langchain": ">=0.2.3 <0.3.0 || >=0.3.4 <0.4.0", + "langsmith": "^0.2.0", + "uuid": "^10.0.0", + "zod": "^3.22.3", + "zod-to-json-schema": "^3.22.5" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@arcjet/redact": "^v1.0.0-alpha.23", + "@aws-crypto/sha256-js": "^5.0.0", + "@aws-sdk/client-bedrock-agent-runtime": "^3.583.0", + "@aws-sdk/client-bedrock-runtime": "^3.422.0", + "@aws-sdk/client-dynamodb": "^3.310.0", + "@aws-sdk/client-kendra": "^3.352.0", + "@aws-sdk/client-lambda": "^3.310.0", + "@aws-sdk/client-s3": "^3.310.0", + "@aws-sdk/client-sagemaker-runtime": "^3.310.0", + "@aws-sdk/client-sfn": "^3.310.0", + "@aws-sdk/credential-provider-node": "^3.388.0", + "@azure/search-documents": "^12.0.0", + "@azure/storage-blob": "^12.15.0", + "@browserbasehq/sdk": "*", + "@clickhouse/client": "^0.2.5", + "@cloudflare/ai": "*", + "@datastax/astra-db-ts": "^1.0.0", + "@elastic/elasticsearch": "^8.4.0", + "@getmetal/metal-sdk": "*", + "@getzep/zep-cloud": "^1.0.6", + "@getzep/zep-js": "^0.9.0", + "@gomomento/sdk": "^1.51.1", + "@gomomento/sdk-core": "^1.51.1", + "@google-ai/generativelanguage": "*", + "@google-cloud/storage": "^6.10.1 || ^7.7.0", + "@gradientai/nodejs-sdk": "^1.2.0", + "@huggingface/inference": "^2.6.4", + "@ibm-cloud/watsonx-ai": "*", + "@lancedb/lancedb": "^0.12.0", + "@langchain/core": ">=0.2.21 <0.4.0", + "@layerup/layerup-security": "^1.5.12", + "@libsql/client": "^0.14.0", + "@mendable/firecrawl-js": "^1.4.3", + "@mlc-ai/web-llm": "*", + "@mozilla/readability": "*", + "@neondatabase/serverless": "*", + "@notionhq/client": "^2.2.10", + "@opensearch-project/opensearch": "*", + "@pinecone-database/pinecone": "*", + "@planetscale/database": "^1.8.0", + "@premai/prem-sdk": "^0.3.25", + "@qdrant/js-client-rest": "^1.8.2", + "@raycast/api": "^1.55.2", + "@rockset/client": "^0.9.1", + "@smithy/eventstream-codec": "^2.0.5", + "@smithy/protocol-http": "^3.0.6", + "@smithy/signature-v4": "^2.0.10", + "@smithy/util-utf8": "^2.0.0", + "@spider-cloud/spider-client": "^0.0.21", + "@supabase/supabase-js": "^2.45.0", + "@tensorflow-models/universal-sentence-encoder": "*", + "@tensorflow/tfjs-converter": "*", + "@tensorflow/tfjs-core": "*", + "@upstash/ratelimit": "^1.1.3 || ^2.0.3", + "@upstash/redis": "^1.20.6", + "@upstash/vector": "^1.1.1", + "@vercel/kv": "^0.2.3", + "@vercel/postgres": "^0.5.0", + "@writerai/writer-sdk": "^0.40.2", + "@xata.io/client": "^0.28.0", + "@xenova/transformers": "^2.17.2", + "@zilliz/milvus2-sdk-node": ">=2.3.5", + "apify-client": "^2.7.1", + "assemblyai": "^4.6.0", + "better-sqlite3": ">=9.4.0 <12.0.0", + "cassandra-driver": "^4.7.2", + "cborg": "^4.1.1", + "cheerio": "^1.0.0-rc.12", + "chromadb": "*", + "closevector-common": "0.1.3", + "closevector-node": "0.1.6", + "closevector-web": "0.1.6", + "cohere-ai": "*", + "convex": "^1.3.1", + "crypto-js": "^4.2.0", + "d3-dsv": "^2.0.0", + "discord.js": "^14.14.1", + "dria": "^0.0.3", + "duck-duck-scrape": "^2.2.5", + "epub2": "^3.0.1", + "faiss-node": "^0.5.1", + "firebase-admin": "^11.9.0 || ^12.0.0", + "google-auth-library": "*", + "googleapis": "*", + "hnswlib-node": "^3.0.0", + "html-to-text": "^9.0.5", + "ibm-cloud-sdk-core": "*", + "ignore": "^5.2.0", + "interface-datastore": "^8.2.11", + "ioredis": "^5.3.2", + "it-all": "^3.0.4", + "jsdom": "*", + "jsonwebtoken": "^9.0.2", + "llmonitor": "^0.5.9", + "lodash": "^4.17.21", + "lunary": "^0.7.10", + "mammoth": "^1.6.0", + "mongodb": ">=5.2.0", + "mysql2": "^3.9.8", + "neo4j-driver": "*", + "notion-to-md": "^3.1.0", + "officeparser": "^4.0.4", + "pdf-parse": "1.1.1", + "pg": "^8.11.0", + "pg-copy-streams": "^6.0.5", + "pickleparser": "^0.2.1", + "playwright": "^1.32.1", + "portkey-ai": "^0.1.11", + "puppeteer": "*", + "pyodide": ">=0.24.1 <0.27.0", + "redis": "*", + "replicate": "^0.29.4", + "sonix-speech-recognition": "^2.1.1", + "srt-parser-2": "^1.2.3", + "typeorm": "^0.3.20", + "typesense": "^1.5.3", + "usearch": "^1.1.1", + "voy-search": "0.6.2", + "weaviate-ts-client": "*", + "web-auth-library": "^1.0.3", + "ws": "^8.14.2", + "youtube-transcript": "^1.0.6", + "youtubei.js": "^9.1.0" + }, + "peerDependenciesMeta": { + "@arcjet/redact": { + "optional": true + }, + "@aws-crypto/sha256-js": { + "optional": true + }, + "@aws-sdk/client-bedrock-agent-runtime": { + "optional": true + }, + "@aws-sdk/client-bedrock-runtime": { + "optional": true + }, + "@aws-sdk/client-dynamodb": { + "optional": true + }, + "@aws-sdk/client-kendra": { + "optional": true + }, + "@aws-sdk/client-lambda": { + "optional": true + }, + "@aws-sdk/client-s3": { + "optional": true + }, + "@aws-sdk/client-sagemaker-runtime": { + "optional": true + }, + "@aws-sdk/client-sfn": { + "optional": true + }, + "@aws-sdk/credential-provider-node": { + "optional": true + }, + "@azure/search-documents": { + "optional": true + }, + "@azure/storage-blob": { + "optional": true + }, + "@browserbasehq/sdk": { + "optional": true + }, + "@clickhouse/client": { + "optional": true + }, + "@cloudflare/ai": { + "optional": true + }, + "@datastax/astra-db-ts": { + "optional": true + }, + "@elastic/elasticsearch": { + "optional": true + }, + "@getmetal/metal-sdk": { + "optional": true + }, + "@getzep/zep-cloud": { + "optional": true + }, + "@getzep/zep-js": { + "optional": true + }, + "@gomomento/sdk": { + "optional": true + }, + "@gomomento/sdk-core": { + "optional": true + }, + "@google-ai/generativelanguage": { + "optional": true + }, + "@google-cloud/storage": { + "optional": true + }, + "@gradientai/nodejs-sdk": { + "optional": true + }, + "@huggingface/inference": { + "optional": true + }, + "@lancedb/lancedb": { + "optional": true + }, + "@layerup/layerup-security": { + "optional": true + }, + "@libsql/client": { + "optional": true + }, + "@mendable/firecrawl-js": { + "optional": true + }, + "@mlc-ai/web-llm": { + "optional": true + }, + "@mozilla/readability": { + "optional": true + }, + "@neondatabase/serverless": { + "optional": true + }, + "@notionhq/client": { + "optional": true + }, + "@opensearch-project/opensearch": { + "optional": true + }, + "@pinecone-database/pinecone": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@premai/prem-sdk": { + "optional": true + }, + "@qdrant/js-client-rest": { + "optional": true + }, + "@raycast/api": { + "optional": true + }, + "@rockset/client": { + "optional": true + }, + "@smithy/eventstream-codec": { + "optional": true + }, + "@smithy/protocol-http": { + "optional": true + }, + "@smithy/signature-v4": { + "optional": true + }, + "@smithy/util-utf8": { + "optional": true + }, + "@spider-cloud/spider-client": { + "optional": true + }, + "@supabase/supabase-js": { + "optional": true + }, + "@tensorflow-models/universal-sentence-encoder": { + "optional": true + }, + "@tensorflow/tfjs-converter": { + "optional": true + }, + "@tensorflow/tfjs-core": { + "optional": true + }, + "@upstash/ratelimit": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@upstash/vector": { + "optional": true + }, + "@vercel/kv": { + "optional": true + }, + "@vercel/postgres": { + "optional": true + }, + "@writerai/writer-sdk": { + "optional": true + }, + "@xata.io/client": { + "optional": true + }, + "@xenova/transformers": { + "optional": true + }, + "@zilliz/milvus2-sdk-node": { + "optional": true + }, + "apify-client": { + "optional": true + }, + "assemblyai": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "cassandra-driver": { + "optional": true + }, + "cborg": { + "optional": true + }, + "cheerio": { + "optional": true + }, + "chromadb": { + "optional": true + }, + "closevector-common": { + "optional": true + }, + "closevector-node": { + "optional": true + }, + "closevector-web": { + "optional": true + }, + "cohere-ai": { + "optional": true + }, + "convex": { + "optional": true + }, + "crypto-js": { + "optional": true + }, + "d3-dsv": { + "optional": true + }, + "discord.js": { + "optional": true + }, + "dria": { + "optional": true + }, + "duck-duck-scrape": { + "optional": true + }, + "epub2": { + "optional": true + }, + "faiss-node": { + "optional": true + }, + "firebase-admin": { + "optional": true + }, + "google-auth-library": { + "optional": true + }, + "googleapis": { + "optional": true + }, + "hnswlib-node": { + "optional": true + }, + "html-to-text": { + "optional": true + }, + "ignore": { + "optional": true + }, + "interface-datastore": { + "optional": true + }, + "ioredis": { + "optional": true + }, + "it-all": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "jsonwebtoken": { + "optional": true + }, + "llmonitor": { + "optional": true + }, + "lodash": { + "optional": true + }, + "lunary": { + "optional": true + }, + "mammoth": { + "optional": true + }, + "mongodb": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "neo4j-driver": { + "optional": true + }, + "notion-to-md": { + "optional": true + }, + "officeparser": { + "optional": true + }, + "pdf-parse": { + "optional": true + }, + "pg": { + "optional": true + }, + "pg-copy-streams": { + "optional": true + }, + "pickleparser": { + "optional": true + }, + "playwright": { + "optional": true + }, + "portkey-ai": { + "optional": true + }, + "puppeteer": { + "optional": true + }, + "pyodide": { + "optional": true + }, + "redis": { + "optional": true + }, + "replicate": { + "optional": true + }, + "sonix-speech-recognition": { + "optional": true + }, + "srt-parser-2": { + "optional": true + }, + "typeorm": { + "optional": true + }, + "typesense": { + "optional": true + }, + "usearch": { + "optional": true + }, + "voy-search": { + "optional": true + }, + "weaviate-ts-client": { + "optional": true + }, + "web-auth-library": { + "optional": true + }, + "ws": { + "optional": true + }, + "youtube-transcript": { + "optional": true + }, + "youtubei.js": { + "optional": true + } + } + }, + "node_modules/@langchain/community/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "optional": true, + "peer": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@langchain/core": { + "version": "0.3.37", + "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.37.tgz", + "integrity": "sha512-LFk9GqHxcyCFx0oXvCBP7vDZIOUHYzzNU7JR+2ofIMnfkBLzcCKzBLySQDfPtd13PrpGHkaeOeLq8H1Tqi9lSw==", + "dependencies": { + "@cfworker/json-schema": "^4.0.2", + "ansi-styles": "^5.0.0", + "camelcase": "6", + "decamelize": "1.2.0", + "js-tiktoken": "^1.0.12", + "langsmith": ">=0.2.8 <0.4.0", + "mustache": "^4.2.0", + "p-queue": "^6.6.2", + "p-retry": "4", + "uuid": "^10.0.0", + "zod": "^3.22.4", + "zod-to-json-schema": "^3.22.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@langchain/core/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/@langchain/core/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@langchain/google-common": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@langchain/google-common/-/google-common-0.1.8.tgz", + "integrity": "sha512-8auqWw2PMPhcHQHS+nMN3tVZrUPgSLckUaFeOHDOeSBiDvBd4KCybPwyl2oCwMDGvmyIxvOOckkMdeGaJ92vpQ==", + "dependencies": { + "uuid": "^10.0.0", + "zod-to-json-schema": "^3.22.4" + }, + "engines": { + "node": ">=18" }, "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "@langchain/core": ">=0.2.21 <0.4.0" } }, - "node_modules/@jest/reporters/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, + "node_modules/@langchain/google-common/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@langchain/google-gauth": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@langchain/google-gauth/-/google-gauth-0.1.8.tgz", + "integrity": "sha512-2QK7d5SQMrnSv7X4j05BGfO74hiA8FJuNwSsQKZvzlGoVnNXil3x2aqD5V+zsYOPpxhkDCpNlmh2Pue2Wzy1rQ==", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "@langchain/google-common": "~0.1.8", + "google-auth-library": "^8.9.0" }, "engines": { - "node": "*" + "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@jest/reporters/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" + "peerDependencies": { + "@langchain/core": ">=0.2.21 <0.4.0" } }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, + "node_modules/@langchain/google-genai": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.1.7.tgz", + "integrity": "sha512-m0cg2VKxxySFfiIFfoMEt22sM4DifmV7AYUN3/DBG8AABG1qLMpNTXUA+b9DGbRD21JFCQpny8Z8eFKRSZFHzA==", "dependencies": { - "@sinclair/typebox": "^0.27.8" + "@google/generative-ai": "^0.21.0", + "zod-to-json-schema": "^3.22.4" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18" + }, + "peerDependencies": { + "@langchain/core": ">=0.3.17 <0.4.0" } }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", - "dev": true, + "node_modules/@langchain/google-vertexai": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@langchain/google-vertexai/-/google-vertexai-0.1.8.tgz", + "integrity": "sha512-n06ohihopz38agOm7BTASHMmFLz+XAZlzEvqtPC4Qa1fhYhzETQg2gCzEapIJ1yVk5MhrWqwKnVOQ+tIsFE88Q==", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" + "@langchain/google-gauth": "~0.1.8" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18" + }, + "peerDependencies": { + "@langchain/core": ">=0.2.21 <0.4.0" } }, - "node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", - "dev": true, + "node_modules/@langchain/langgraph": { + "version": "0.2.44", + "resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-0.2.44.tgz", + "integrity": "sha512-CR9LB7sytdx0Ink56qVUPorDo5gW5m7iOU2ypu1OYA4l5aIrT4xGvHCwrGH9RE80pb/d0FglVUkEgEfuvSDbmw==", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" + "@langchain/langgraph-checkpoint": "~0.0.15", + "@langchain/langgraph-sdk": "~0.0.32", + "uuid": "^10.0.0", + "zod": "^3.23.8" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18" + }, + "peerDependencies": { + "@langchain/core": ">=0.2.36 <0.3.0 || >=0.3.9 < 0.4.0" } }, - "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", - "dev": true, + "node_modules/@langchain/langgraph-checkpoint": { + "version": "0.0.15", + "resolved": "https://registry.npmjs.org/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-0.0.15.tgz", + "integrity": "sha512-AiJkvsYHqNbCh1Tx823qs2lf2qRqeB4EAMejirOk8gkpPszAGYua5c3niKYkcKR2tU8Snhrmj7Gm9HKZSFOXyw==", "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" + "uuid": "^10.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18" + }, + "peerDependencies": { + "@langchain/core": ">=0.2.31 <0.4.0" } }, - "node_modules/@jest/test-sequencer/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" + "node_modules/@langchain/langgraph-checkpoint/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dev": true, + "node_modules/@langchain/langgraph-sdk": { + "version": "0.0.36", + "resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.36.tgz", + "integrity": "sha512-KkAZM0uXBaMcD/dpGTBppOhbvNX6gz+Y1zFAC898OblegFkSvICrkd0oRQ5Ro/GWK/NAoDymnMUDXeZDdUkSuw==", "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "@types/json-schema": "^7.0.15", + "p-queue": "^6.6.2", + "p-retry": "4", + "uuid": "^9.0.0" } }, - "node_modules/@jest/transform/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" + "node_modules/@langchain/langgraph/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, + "node_modules/@langchain/mistralai": { + "version": "0.0.26", + "resolved": "https://registry.npmjs.org/@langchain/mistralai/-/mistralai-0.0.26.tgz", + "integrity": "sha512-NoXmOTrkHjfCcgWQprbPujCvFktJFPcFTAcJEc4jY0J+PRiwWfhe4Xx2MevWTSV9clWm2Pil454nJ1CYEvh3Ng==", "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@langchain/core": ">=0.2.16 <0.3.0", + "@mistralai/mistralai": "^0.4.0", + "uuid": "^10.0.0", + "zod": "^3.22.4", + "zod-to-json-schema": "^3.22.4" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "node_modules/@langchain/mistralai/node_modules/@langchain/core": { + "version": "0.2.34", + "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.2.34.tgz", + "integrity": "sha512-Hkveq1UcOjUj1DVn5erbqElyRj1t04NORSuSIZAJCtPO7EDkIqomjAarJ5+I5NUpQeIONgbOdnY9TkJ6cKUSVA==", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" + "ansi-styles": "^5.0.0", + "camelcase": "6", + "decamelize": "1.2.0", + "js-tiktoken": "^1.0.12", + "langsmith": "^0.1.56-rc.1", + "mustache": "^4.2.0", + "p-queue": "^6.6.2", + "p-retry": "4", + "uuid": "^10.0.0", + "zod": "^3.22.4", + "zod-to-json-schema": "^3.22.3" }, "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "engines": { - "node": ">=6.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "node_modules/@langchain/mistralai/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": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "node_modules/@langchain/mistralai/node_modules/langsmith": { + "version": "0.1.61", + "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.61.tgz", + "integrity": "sha512-XQE4KPScwPmdaT0mWDzhNxj9gvqXUR+C7urLA0QFi27XeoQdm17eYpudenn4wxC0gIyUJutQCyuYJpfwlT5JnQ==", "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "@types/uuid": "^10.0.0", + "commander": "^10.0.1", + "p-queue": "^6.6.2", + "p-retry": "4", + "semver": "^7.6.3", + "uuid": "^10.0.0" + }, + "peerDependencies": { + "openai": "*" + }, + "peerDependenciesMeta": { + "openai": { + "optional": true + } } }, - "node_modules/@keyv/mongo": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/@keyv/mongo/-/mongo-2.2.8.tgz", - "integrity": "sha512-2y8RXQDzCUzvhkzjH0bj4+Ur9Ce+x9PjNrV6KnGGpRocexFKVgOYexIegnEc/DBy6HhNyqUlgWOpuFfnhpmF+A==", - "dependencies": { - "mongodb": "^4.5.0", - "pify": "^5.0.0" + "node_modules/@langchain/mistralai/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/@keyv/mongo/node_modules/bson": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", - "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", + "node_modules/@langchain/ollama": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@langchain/ollama/-/ollama-0.1.5.tgz", + "integrity": "sha512-S2tF94uIJtXavekKg10LvTV+jIelOIrubaCnje8BopfiNOVcnzsSulUL4JH0wvdxMZq0vbE4/i9RwC2q9ivOmA==", "dependencies": { - "buffer": "^5.6.0" + "ollama": "^0.5.9", + "uuid": "^10.0.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=18" + }, + "peerDependencies": { + "@langchain/core": ">=0.2.21 <0.4.0" } }, - "node_modules/@keyv/mongo/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "node_modules/@langchain/ollama/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/@keyv/mongo/node_modules/mongodb": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.2.tgz", - "integrity": "sha512-mLV7SEiov2LHleRJPMPrK2PMyhXFZt2UQLC4VD4pnth3jMjYKHhtqfwwkkvS/NXuo/Fp3vbhaNcXrIDaLRb9Tg==", + "node_modules/@langchain/openai": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.3.14.tgz", + "integrity": "sha512-lNWjUo1tbvsss45IF7UQtMu1NJ6oUKvhgPYWXnX9f/d6OmuLu7D99HQ3Y88vLcUo9XjjOy417olYHignMduMjA==", "dependencies": { - "bson": "^4.7.2", - "mongodb-connection-string-url": "^2.6.0", - "socks": "^2.7.1" + "js-tiktoken": "^1.0.12", + "openai": "^4.71.0", + "zod": "^3.22.4", + "zod-to-json-schema": "^3.22.3" }, "engines": { - "node": ">=12.9.0" + "node": ">=18" }, - "optionalDependencies": { - "@aws-sdk/credential-providers": "^3.186.0", - "@mongodb-js/saslprep": "^1.1.0" + "peerDependencies": { + "@langchain/core": ">=0.2.26 <0.4.0" } }, - "node_modules/@keyv/redis": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/@keyv/redis/-/redis-2.8.4.tgz", - "integrity": "sha512-osO4C+i+Gi844wHjvXuHwhl+sDx3289Of309ZlLcj6SJReTLmPXzNiVR81N88wOu5aC+lVFdmx9FUQkkjdbPRQ==", + "node_modules/@langchain/textsplitters": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@langchain/textsplitters/-/textsplitters-0.0.3.tgz", + "integrity": "sha512-cXWgKE3sdWLSqAa8ykbCcUsUF1Kyr5J3HOWYGuobhPEycXW4WI++d5DhzdpL238mzoEXTi90VqfSCra37l5YqA==", "dependencies": { - "ioredis": "^5.3.2" + "@langchain/core": ">0.2.0 <0.3.0", + "js-tiktoken": "^1.0.12" }, "engines": { - "node": ">= 14" + "node": ">=18" } }, - "node_modules/@langchain/anthropic": { - "version": "0.3.12", - "resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-0.3.12.tgz", - "integrity": "sha512-vYANJVeus+v8wieTST5GUGlennY87NMIjaFx6JCJN8MMtf2KVwyBWQAUAPyGwzVQ40tru3w0rK2ruvzYBRcWEg==", + "node_modules/@langchain/textsplitters/node_modules/@langchain/core": { + "version": "0.2.34", + "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.2.34.tgz", + "integrity": "sha512-Hkveq1UcOjUj1DVn5erbqElyRj1t04NORSuSIZAJCtPO7EDkIqomjAarJ5+I5NUpQeIONgbOdnY9TkJ6cKUSVA==", "dependencies": { - "@anthropic-ai/sdk": "^0.32.1", - "fast-xml-parser": "^4.4.1", + "ansi-styles": "^5.0.0", + "camelcase": "6", + "decamelize": "1.2.0", + "js-tiktoken": "^1.0.12", + "langsmith": "^0.1.56-rc.1", + "mustache": "^4.2.0", + "p-queue": "^6.6.2", + "p-retry": "4", + "uuid": "^10.0.0", "zod": "^3.22.4", - "zod-to-json-schema": "^3.22.4" + "zod-to-json-schema": "^3.22.3" }, "engines": { "node": ">=18" + } + }, + "node_modules/@langchain/textsplitters/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/@langchain/textsplitters/node_modules/langsmith": { + "version": "0.1.61", + "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.61.tgz", + "integrity": "sha512-XQE4KPScwPmdaT0mWDzhNxj9gvqXUR+C7urLA0QFi27XeoQdm17eYpudenn4wxC0gIyUJutQCyuYJpfwlT5JnQ==", + "dependencies": { + "@types/uuid": "^10.0.0", + "commander": "^10.0.1", + "p-queue": "^6.6.2", + "p-retry": "4", + "semver": "^7.6.3", + "uuid": "^10.0.0" }, "peerDependencies": { - "@langchain/core": ">=0.2.21 <0.4.0" + "openai": "*" + }, + "peerDependenciesMeta": { + "openai": { + "optional": true + } + } + }, + "node_modules/@langchain/textsplitters/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@lezer/common": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz", + "integrity": "sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==" + }, + "node_modules/@lezer/css": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.1.8.tgz", + "integrity": "sha512-7JhxupKuMBaWQKjQoLtzhGj83DdnZY9MckEOG5+/iLKNK2ZJqKc6hf6uc0HjwCX7Qlok44jBNqZhHKDhEhZYLA==", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/highlight": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.1.tgz", + "integrity": "sha512-Z5duk4RN/3zuVO7Jq0pGLJ3qynpxUVsh7IbUbGj88+uV2ApSAn6kWg2au3iJb+0Zi7kKtqffIESgNcRXWZWmSA==", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lezer/html": { + "version": "1.3.10", + "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.10.tgz", + "integrity": "sha512-dqpT8nISx/p9Do3AchvYGV3qYc4/rKr3IBZxlHmpIKam56P47RSHkSF5f13Vu9hebS1jM0HmtJIwLbWz1VIY6w==", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/javascript": { + "version": "1.4.17", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.17.tgz", + "integrity": "sha512-bYW4ctpyGK+JMumDApeUzuIezX01H76R1foD6LcRX224FWfyYit/HYxiPGDjXXe/wQWASjCvVGoukTH68+0HIA==", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.1.3", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/lr": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz", + "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==", + "dependencies": { + "@lezer/common": "^1.0.0" } }, - "node_modules/@langchain/aws": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@langchain/aws/-/aws-0.1.3.tgz", - "integrity": "sha512-OjS6V/virzRvOX1D2xgTyyHkYzdepjes77dU2bBS53jt4mp0DT8vzgclZQ/16DA20YgNFtMKYiFbOfMI+RTHyg==", + "node_modules/@librechat/agents": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-2.0.2.tgz", + "integrity": "sha512-ucH1zb2nHpAafXq6YNNFBHl5rwBEoTl5CUZ6M9r5Mp1oyk9vSAz+knOCaUgYMU5GJqY+6ReFWRH9tnvZfrzhTQ==", "dependencies": { - "@aws-sdk/client-bedrock-agent-runtime": "^3.616.0", - "@aws-sdk/client-bedrock-runtime": "^3.602.0", - "@aws-sdk/client-kendra": "^3.352.0", - "@aws-sdk/credential-provider-node": "^3.600.0", - "zod": "^3.23.8", - "zod-to-json-schema": "^3.22.5" + "@aws-crypto/sha256-js": "^5.2.0", + "@aws-sdk/credential-provider-node": "^3.613.0", + "@aws-sdk/types": "^3.609.0", + "@langchain/anthropic": "^0.3.12", + "@langchain/aws": "^0.1.3", + "@langchain/community": "^0.3.27", + "@langchain/core": "^0.3.37", + "@langchain/google-genai": "^0.1.7", + "@langchain/google-vertexai": "^0.1.8", + "@langchain/langgraph": "^0.2.41", + "@langchain/mistralai": "^0.0.26", + "@langchain/ollama": "^0.1.5", + "@langchain/openai": "^0.4.2", + "@smithy/eventstream-codec": "^2.2.0", + "@smithy/protocol-http": "^3.0.6", + "@smithy/signature-v4": "^2.0.10", + "@smithy/util-utf8": "^2.0.0", + "dotenv": "^16.4.5", + "nanoid": "^3.3.7" }, "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@langchain/core": ">=0.2.21 <0.4.0" + "node": ">=14.0.0" } }, - "node_modules/@langchain/community": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.15.tgz", - "integrity": "sha512-yG4cv33u7zYar14yqZCI7o2KjwRb+9S7upVzEmVVETimpicm9UjpkMfX4qa4A4IslM1TtC4uy2Ymu9EcINZSpQ==", - "optional": true, - "peer": true, + "node_modules/@librechat/agents/node_modules/@langchain/community": { + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.29.tgz", + "integrity": "sha512-6XIPGctpH3KziFpdVDEvYBEQMMsNomffqy545shoxOLoMkZqgn1wfMs6R7ltzzS0p3LJUXW1RbwAUEuWp0rbuA==", "dependencies": { - "@langchain/openai": ">=0.2.0 <0.4.0", + "@langchain/openai": ">=0.2.0 <0.5.0", "binary-extensions": "^2.2.0", "expr-eval": "^2.0.2", "flat": "^5.0.2", "js-yaml": "^4.1.0", "langchain": ">=0.2.3 <0.3.0 || >=0.3.4 <0.4.0", - "langsmith": "^0.2.0", + "langsmith": ">=0.2.8 <0.4.0", "uuid": "^10.0.0", "zod": "^3.22.3", "zod-to-json-schema": "^3.22.5" @@ -9771,6 +10198,7 @@ "@azure/search-documents": "^12.0.0", "@azure/storage-blob": "^12.15.0", "@browserbasehq/sdk": "*", + "@browserbasehq/stagehand": "^1.0.0", "@clickhouse/client": "^0.2.5", "@cloudflare/ai": "*", "@datastax/astra-db-ts": "^1.0.0", @@ -9784,6 +10212,7 @@ "@google-cloud/storage": "^6.10.1 || ^7.7.0", "@gradientai/nodejs-sdk": "^1.2.0", "@huggingface/inference": "^2.6.4", + "@huggingface/transformers": "^3.2.3", "@ibm-cloud/watsonx-ai": "*", "@lancedb/lancedb": "^0.12.0", "@langchain/core": ">=0.2.21 <0.4.0", @@ -9813,11 +10242,10 @@ "@upstash/ratelimit": "^1.1.3 || ^2.0.3", "@upstash/redis": "^1.20.6", "@upstash/vector": "^1.1.1", - "@vercel/kv": "^0.2.3", - "@vercel/postgres": "^0.5.0", + "@vercel/kv": "*", + "@vercel/postgres": "*", "@writerai/writer-sdk": "^0.40.2", "@xata.io/client": "^0.28.0", - "@xenova/transformers": "^2.17.2", "@zilliz/milvus2-sdk-node": ">=2.3.5", "apify-client": "^2.7.1", "assemblyai": "^4.6.0", @@ -9838,6 +10266,7 @@ "duck-duck-scrape": "^2.2.5", "epub2": "^3.0.1", "faiss-node": "^0.5.1", + "fast-xml-parser": "*", "firebase-admin": "^11.9.0 || ^12.0.0", "google-auth-library": "*", "googleapis": "*", @@ -9859,6 +10288,7 @@ "neo4j-driver": "*", "notion-to-md": "^3.1.0", "officeparser": "^4.0.4", + "openai": "*", "pdf-parse": "1.1.1", "pg": "^8.11.0", "pg-copy-streams": "^6.0.5", @@ -9868,7 +10298,7 @@ "puppeteer": "*", "pyodide": ">=0.24.1 <0.27.0", "redis": "*", - "replicate": "^0.29.4", + "replicate": "*", "sonix-speech-recognition": "^2.1.1", "srt-parser-2": "^1.2.3", "typeorm": "^0.3.20", @@ -9877,9 +10307,9 @@ "voy-search": "0.6.2", "weaviate-ts-client": "*", "web-auth-library": "^1.0.3", + "word-extractor": "*", "ws": "^8.14.2", - "youtube-transcript": "^1.0.6", - "youtubei.js": "^9.1.0" + "youtubei.js": "*" }, "peerDependenciesMeta": { "@arcjet/redact": { @@ -9963,6 +10393,9 @@ "@huggingface/inference": { "optional": true }, + "@huggingface/transformers": { + "optional": true + }, "@lancedb/lancedb": { "optional": true }, @@ -10056,9 +10489,6 @@ "@xata.io/client": { "optional": true }, - "@xenova/transformers": { - "optional": true - }, "@zilliz/milvus2-sdk-node": { "optional": true }, @@ -10119,6 +10549,9 @@ "faiss-node": { "optional": true }, + "fast-xml-parser": { + "optional": true + }, "firebase-admin": { "optional": true }, @@ -10233,10 +10666,10 @@ "web-auth-library": { "optional": true }, - "ws": { + "word-extractor": { "optional": true }, - "youtube-transcript": { + "ws": { "optional": true }, "youtubei.js": { @@ -10244,394 +10677,24 @@ } } }, - "node_modules/@langchain/community/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "optional": true, - "peer": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@langchain/core": { - "version": "0.3.37", - "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.37.tgz", - "integrity": "sha512-LFk9GqHxcyCFx0oXvCBP7vDZIOUHYzzNU7JR+2ofIMnfkBLzcCKzBLySQDfPtd13PrpGHkaeOeLq8H1Tqi9lSw==", - "dependencies": { - "@cfworker/json-schema": "^4.0.2", - "ansi-styles": "^5.0.0", - "camelcase": "6", - "decamelize": "1.2.0", - "js-tiktoken": "^1.0.12", - "langsmith": ">=0.2.8 <0.4.0", - "mustache": "^4.2.0", - "p-queue": "^6.6.2", - "p-retry": "4", - "uuid": "^10.0.0", - "zod": "^3.22.4", - "zod-to-json-schema": "^3.22.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@langchain/core/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/@langchain/core/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@langchain/google-common": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@langchain/google-common/-/google-common-0.1.8.tgz", - "integrity": "sha512-8auqWw2PMPhcHQHS+nMN3tVZrUPgSLckUaFeOHDOeSBiDvBd4KCybPwyl2oCwMDGvmyIxvOOckkMdeGaJ92vpQ==", - "dependencies": { - "uuid": "^10.0.0", - "zod-to-json-schema": "^3.22.4" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@langchain/core": ">=0.2.21 <0.4.0" - } - }, - "node_modules/@langchain/google-common/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@langchain/google-gauth": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@langchain/google-gauth/-/google-gauth-0.1.8.tgz", - "integrity": "sha512-2QK7d5SQMrnSv7X4j05BGfO74hiA8FJuNwSsQKZvzlGoVnNXil3x2aqD5V+zsYOPpxhkDCpNlmh2Pue2Wzy1rQ==", - "dependencies": { - "@langchain/google-common": "~0.1.8", - "google-auth-library": "^8.9.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@langchain/core": ">=0.2.21 <0.4.0" - } - }, - "node_modules/@langchain/google-genai": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.1.7.tgz", - "integrity": "sha512-m0cg2VKxxySFfiIFfoMEt22sM4DifmV7AYUN3/DBG8AABG1qLMpNTXUA+b9DGbRD21JFCQpny8Z8eFKRSZFHzA==", - "dependencies": { - "@google/generative-ai": "^0.21.0", - "zod-to-json-schema": "^3.22.4" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@langchain/core": ">=0.3.17 <0.4.0" - } - }, - "node_modules/@langchain/google-vertexai": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@langchain/google-vertexai/-/google-vertexai-0.1.8.tgz", - "integrity": "sha512-n06ohihopz38agOm7BTASHMmFLz+XAZlzEvqtPC4Qa1fhYhzETQg2gCzEapIJ1yVk5MhrWqwKnVOQ+tIsFE88Q==", - "dependencies": { - "@langchain/google-gauth": "~0.1.8" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@langchain/core": ">=0.2.21 <0.4.0" - } - }, - "node_modules/@langchain/langgraph": { - "version": "0.2.44", - "resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-0.2.44.tgz", - "integrity": "sha512-CR9LB7sytdx0Ink56qVUPorDo5gW5m7iOU2ypu1OYA4l5aIrT4xGvHCwrGH9RE80pb/d0FglVUkEgEfuvSDbmw==", - "dependencies": { - "@langchain/langgraph-checkpoint": "~0.0.15", - "@langchain/langgraph-sdk": "~0.0.32", - "uuid": "^10.0.0", - "zod": "^3.23.8" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@langchain/core": ">=0.2.36 <0.3.0 || >=0.3.9 < 0.4.0" - } - }, - "node_modules/@langchain/langgraph-checkpoint": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-0.0.15.tgz", - "integrity": "sha512-AiJkvsYHqNbCh1Tx823qs2lf2qRqeB4EAMejirOk8gkpPszAGYua5c3niKYkcKR2tU8Snhrmj7Gm9HKZSFOXyw==", - "dependencies": { - "uuid": "^10.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@langchain/core": ">=0.2.31 <0.4.0" - } - }, - "node_modules/@langchain/langgraph-checkpoint/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@langchain/langgraph-sdk": { - "version": "0.0.36", - "resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.36.tgz", - "integrity": "sha512-KkAZM0uXBaMcD/dpGTBppOhbvNX6gz+Y1zFAC898OblegFkSvICrkd0oRQ5Ro/GWK/NAoDymnMUDXeZDdUkSuw==", - "dependencies": { - "@types/json-schema": "^7.0.15", - "p-queue": "^6.6.2", - "p-retry": "4", - "uuid": "^9.0.0" - } - }, - "node_modules/@langchain/langgraph/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@langchain/mistralai": { - "version": "0.0.26", - "resolved": "https://registry.npmjs.org/@langchain/mistralai/-/mistralai-0.0.26.tgz", - "integrity": "sha512-NoXmOTrkHjfCcgWQprbPujCvFktJFPcFTAcJEc4jY0J+PRiwWfhe4Xx2MevWTSV9clWm2Pil454nJ1CYEvh3Ng==", - "dependencies": { - "@langchain/core": ">=0.2.16 <0.3.0", - "@mistralai/mistralai": "^0.4.0", - "uuid": "^10.0.0", - "zod": "^3.22.4", - "zod-to-json-schema": "^3.22.4" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@langchain/mistralai/node_modules/@langchain/core": { - "version": "0.2.34", - "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.2.34.tgz", - "integrity": "sha512-Hkveq1UcOjUj1DVn5erbqElyRj1t04NORSuSIZAJCtPO7EDkIqomjAarJ5+I5NUpQeIONgbOdnY9TkJ6cKUSVA==", - "dependencies": { - "ansi-styles": "^5.0.0", - "camelcase": "6", - "decamelize": "1.2.0", - "js-tiktoken": "^1.0.12", - "langsmith": "^0.1.56-rc.1", - "mustache": "^4.2.0", - "p-queue": "^6.6.2", - "p-retry": "4", - "uuid": "^10.0.0", - "zod": "^3.22.4", - "zod-to-json-schema": "^3.22.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@langchain/mistralai/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/@langchain/mistralai/node_modules/langsmith": { - "version": "0.1.61", - "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.61.tgz", - "integrity": "sha512-XQE4KPScwPmdaT0mWDzhNxj9gvqXUR+C7urLA0QFi27XeoQdm17eYpudenn4wxC0gIyUJutQCyuYJpfwlT5JnQ==", - "dependencies": { - "@types/uuid": "^10.0.0", - "commander": "^10.0.1", - "p-queue": "^6.6.2", - "p-retry": "4", - "semver": "^7.6.3", - "uuid": "^10.0.0" - }, - "peerDependencies": { - "openai": "*" - }, - "peerDependenciesMeta": { - "openai": { - "optional": true - } - } - }, - "node_modules/@langchain/mistralai/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@langchain/ollama": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@langchain/ollama/-/ollama-0.1.5.tgz", - "integrity": "sha512-S2tF94uIJtXavekKg10LvTV+jIelOIrubaCnje8BopfiNOVcnzsSulUL4JH0wvdxMZq0vbE4/i9RwC2q9ivOmA==", - "dependencies": { - "ollama": "^0.5.9", - "uuid": "^10.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@langchain/core": ">=0.2.21 <0.4.0" - } - }, - "node_modules/@langchain/ollama/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@langchain/openai": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.3.14.tgz", - "integrity": "sha512-lNWjUo1tbvsss45IF7UQtMu1NJ6oUKvhgPYWXnX9f/d6OmuLu7D99HQ3Y88vLcUo9XjjOy417olYHignMduMjA==", - "dependencies": { - "js-tiktoken": "^1.0.12", - "openai": "^4.71.0", - "zod": "^3.22.4", - "zod-to-json-schema": "^3.22.3" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@langchain/core": ">=0.2.26 <0.4.0" - } - }, - "node_modules/@langchain/textsplitters": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@langchain/textsplitters/-/textsplitters-0.0.3.tgz", - "integrity": "sha512-cXWgKE3sdWLSqAa8ykbCcUsUF1Kyr5J3HOWYGuobhPEycXW4WI++d5DhzdpL238mzoEXTi90VqfSCra37l5YqA==", - "dependencies": { - "@langchain/core": ">0.2.0 <0.3.0", - "js-tiktoken": "^1.0.12" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@langchain/textsplitters/node_modules/@langchain/core": { - "version": "0.2.34", - "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.2.34.tgz", - "integrity": "sha512-Hkveq1UcOjUj1DVn5erbqElyRj1t04NORSuSIZAJCtPO7EDkIqomjAarJ5+I5NUpQeIONgbOdnY9TkJ6cKUSVA==", + "node_modules/@librechat/agents/node_modules/@langchain/openai": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.4.2.tgz", + "integrity": "sha512-Cuj7qbVcycALTP0aqZuPpEc7As8cwiGaU21MhXRyZFs+dnWxKYxZ1Q1z4kcx6cYkq/I+CNwwmk+sP+YruU73Aw==", "dependencies": { - "ansi-styles": "^5.0.0", - "camelcase": "6", - "decamelize": "1.2.0", "js-tiktoken": "^1.0.12", - "langsmith": "^0.1.56-rc.1", - "mustache": "^4.2.0", - "p-queue": "^6.6.2", - "p-retry": "4", - "uuid": "^10.0.0", + "openai": "^4.77.0", "zod": "^3.22.4", "zod-to-json-schema": "^3.22.3" }, "engines": { "node": ">=18" - } - }, - "node_modules/@langchain/textsplitters/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/@langchain/textsplitters/node_modules/langsmith": { - "version": "0.1.61", - "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.61.tgz", - "integrity": "sha512-XQE4KPScwPmdaT0mWDzhNxj9gvqXUR+C7urLA0QFi27XeoQdm17eYpudenn4wxC0gIyUJutQCyuYJpfwlT5JnQ==", - "dependencies": { - "@types/uuid": "^10.0.0", - "commander": "^10.0.1", - "p-queue": "^6.6.2", - "p-retry": "4", - "semver": "^7.6.3", - "uuid": "^10.0.0" }, "peerDependencies": { - "openai": "*" - }, - "peerDependenciesMeta": { - "openai": { - "optional": true - } + "@langchain/core": ">=0.3.29 <0.4.0" } }, - "node_modules/@langchain/textsplitters/node_modules/uuid": { + "node_modules/@librechat/agents/node_modules/uuid": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", @@ -10643,57 +10706,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/@lezer/common": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz", - "integrity": "sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==" - }, - "node_modules/@lezer/css": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.1.8.tgz", - "integrity": "sha512-7JhxupKuMBaWQKjQoLtzhGj83DdnZY9MckEOG5+/iLKNK2ZJqKc6hf6uc0HjwCX7Qlok44jBNqZhHKDhEhZYLA==", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/highlight": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.1.tgz", - "integrity": "sha512-Z5duk4RN/3zuVO7Jq0pGLJ3qynpxUVsh7IbUbGj88+uV2ApSAn6kWg2au3iJb+0Zi7kKtqffIESgNcRXWZWmSA==", - "dependencies": { - "@lezer/common": "^1.0.0" - } - }, - "node_modules/@lezer/html": { - "version": "1.3.10", - "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.10.tgz", - "integrity": "sha512-dqpT8nISx/p9Do3AchvYGV3qYc4/rKr3IBZxlHmpIKam56P47RSHkSF5f13Vu9hebS1jM0HmtJIwLbWz1VIY6w==", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/javascript": { - "version": "1.4.17", - "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.17.tgz", - "integrity": "sha512-bYW4ctpyGK+JMumDApeUzuIezX01H76R1foD6LcRX224FWfyYit/HYxiPGDjXXe/wQWASjCvVGoukTH68+0HIA==", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.1.3", - "@lezer/lr": "^1.3.0" - } - }, - "node_modules/@lezer/lr": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz", - "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==", - "dependencies": { - "@lezer/common": "^1.0.0" - } - }, "node_modules/@librechat/backend": { "resolved": "api", "link": true @@ -35539,7 +35551,7 @@ }, "packages/data-provider": { "name": "librechat-data-provider", - "version": "0.7.698", + "version": "0.7.699", "license": "ISC", "dependencies": { "axios": "^1.7.7", diff --git a/packages/data-provider/package.json b/packages/data-provider/package.json index e2d63ce1f70b..976cf85d1268 100644 --- a/packages/data-provider/package.json +++ b/packages/data-provider/package.json @@ -1,6 +1,6 @@ { "name": "librechat-data-provider", - "version": "0.7.698", + "version": "0.7.699", "description": "data services for librechat apps", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.ts index 3ba6c1154e5e..6a2db199b264 100644 --- a/packages/data-provider/src/config.ts +++ b/packages/data-provider/src/config.ts @@ -699,18 +699,19 @@ export const defaultModels = { [EModelEndpoint.assistants]: ['chatgpt-4o-latest', ...sharedOpenAIModels], [EModelEndpoint.agents]: sharedOpenAIModels, // TODO: Add agent models (agentsModels) [EModelEndpoint.google]: [ - 'gemini-pro', - 'gemini-pro-vision', - 'chat-bison', - 'chat-bison-32k', - 'codechat-bison', - 'codechat-bison-32k', - 'text-bison', - 'text-bison-32k', - 'text-unicorn', - 'code-gecko', - 'code-bison', - 'code-bison-32k', + // Shared Google Models between Vertex AI & Gen AI + // Gemini 2.0 Models + 'gemini-2.0-flash-001', + 'gemini-2.0-flash-exp', + 'gemini-2.0-flash-lite-preview-02-05', + 'gemini-2.0-pro-exp-02-05', + // Gemini 1.5 Models + 'gemini-1.5-flash-001', + 'gemini-1.5-flash-002', + 'gemini-1.5-pro-001', + 'gemini-1.5-pro-002', + // Gemini 1.0 Models + 'gemini-1.0-pro-001', ], [EModelEndpoint.anthropic]: sharedAnthropicModels, [EModelEndpoint.openAI]: [ @@ -1019,6 +1020,10 @@ export enum ErrorTypes { * Invalid request error, API rejected request */ NO_SYSTEM_MESSAGES = 'no_system_messages', + /** + * Google provider returned an error + */ + GOOGLE_ERROR = 'google_error', } /** diff --git a/packages/data-provider/src/zod.spec.ts b/packages/data-provider/src/zod.spec.ts index 37915649bc94..caa7d54e49c9 100644 --- a/packages/data-provider/src/zod.spec.ts +++ b/packages/data-provider/src/zod.spec.ts @@ -13,8 +13,8 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse('test')).toBe('test'); - expect(() => zodSchema.parse(123)).toThrow(); + expect(zodSchema?.parse('test')).toBe('test'); + expect(() => zodSchema?.parse(123)).toThrow(); }); it('should convert string enum schema', () => { @@ -24,8 +24,8 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse('foo')).toBe('foo'); - expect(() => zodSchema.parse('invalid')).toThrow(); + expect(zodSchema?.parse('foo')).toBe('foo'); + expect(() => zodSchema?.parse('invalid')).toThrow(); }); it('should convert number schema', () => { @@ -34,8 +34,8 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse(123)).toBe(123); - expect(() => zodSchema.parse('123')).toThrow(); + expect(zodSchema?.parse(123)).toBe(123); + expect(() => zodSchema?.parse('123')).toThrow(); }); it('should convert boolean schema', () => { @@ -44,8 +44,8 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse(true)).toBe(true); - expect(() => zodSchema.parse('true')).toThrow(); + expect(zodSchema?.parse(true)).toBe(true); + expect(() => zodSchema?.parse('true')).toThrow(); }); }); @@ -57,8 +57,8 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse(['a', 'b', 'c'])).toEqual(['a', 'b', 'c']); - expect(() => zodSchema.parse(['a', 123, 'c'])).toThrow(); + expect(zodSchema?.parse(['a', 'b', 'c'])).toEqual(['a', 'b', 'c']); + expect(() => zodSchema?.parse(['a', 123, 'c'])).toThrow(); }); it('should convert array of numbers schema', () => { @@ -68,8 +68,8 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse([1, 2, 3])).toEqual([1, 2, 3]); - expect(() => zodSchema.parse([1, '2', 3])).toThrow(); + expect(zodSchema?.parse([1, 2, 3])).toEqual([1, 2, 3]); + expect(() => zodSchema?.parse([1, '2', 3])).toThrow(); }); }); @@ -84,8 +84,8 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse({ name: 'John', age: 30 })).toEqual({ name: 'John', age: 30 }); - expect(() => zodSchema.parse({ name: 123, age: 30 })).toThrow(); + expect(zodSchema?.parse({ name: 'John', age: 30 })).toEqual({ name: 'John', age: 30 }); + expect(() => zodSchema?.parse({ name: 123, age: 30 })).toThrow(); }); it('should handle required fields', () => { @@ -99,8 +99,8 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse({ name: 'John' })).toEqual({ name: 'John' }); - expect(() => zodSchema.parse({})).toThrow(); + expect(zodSchema?.parse({ name: 'John' })).toEqual({ name: 'John' }); + expect(() => zodSchema?.parse({})).toThrow(); }); it('should handle nested objects', () => { @@ -120,10 +120,10 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse({ user: { name: 'John', age: 30 } })).toEqual({ + expect(zodSchema?.parse({ user: { name: 'John', age: 30 } })).toEqual({ user: { name: 'John', age: 30 }, }); - expect(() => zodSchema.parse({ user: { age: 30 } })).toThrow(); + expect(() => zodSchema?.parse({ user: { age: 30 } })).toThrow(); }); it('should handle objects with arrays', () => { @@ -138,8 +138,8 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse({ names: ['John', 'Jane'] })).toEqual({ names: ['John', 'Jane'] }); - expect(() => zodSchema.parse({ names: ['John', 123] })).toThrow(); + expect(zodSchema?.parse({ names: ['John', 'Jane'] })).toEqual({ names: ['John', 'Jane'] }); + expect(() => zodSchema?.parse({ names: ['John', 123] })).toThrow(); }); }); @@ -151,7 +151,7 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse({})).toEqual({}); + expect(zodSchema?.parse({})).toEqual({}); }); it('should handle unknown types as unknown', () => { @@ -160,8 +160,8 @@ describe('convertJsonSchemaToZod', () => { } as unknown as JsonSchemaType; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse('anything')).toBe('anything'); - expect(zodSchema.parse(123)).toBe(123); + expect(zodSchema?.parse('anything')).toBe('anything'); + expect(zodSchema?.parse(123)).toBe(123); }); it('should handle empty enum arrays as regular strings', () => { @@ -171,7 +171,7 @@ describe('convertJsonSchemaToZod', () => { }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.parse('test')).toBe('test'); + expect(zodSchema?.parse('test')).toBe('test'); }); }); @@ -223,6 +223,9 @@ describe('convertJsonSchemaToZod', () => { ], }, }; + if (zodSchema == null) { + throw new Error('Zod schema is null'); + } expect(zodSchema.parse(validData)).toEqual(validData); expect(() => @@ -253,7 +256,7 @@ describe('convertJsonSchemaToZod', () => { }, }; const zodSchema = convertJsonSchemaToZod(schema); - expect(zodSchema.description).toBe('A test schema description'); + expect(zodSchema?.description).toBe('A test schema description'); }); it('should preserve field descriptions', () => { @@ -309,7 +312,7 @@ describe('convertJsonSchemaToZod', () => { // Type assertions for better type safety const shape = zodSchema instanceof z.ZodObject ? zodSchema.shape : {}; - expect(zodSchema.description).toBe('User record'); + expect(zodSchema?.description).toBe('User record'); if ('user' in shape) { expect(shape.user.description).toBe('User details'); @@ -436,7 +439,7 @@ describe('convertJsonSchemaToZod', () => { const zodSchema = convertJsonSchemaToZod(schema); // Test top-level description - expect(zodSchema.description).toBe('User profile configuration'); + expect(zodSchema?.description).toBe('User profile configuration'); const shape = zodSchema instanceof z.ZodObject ? zodSchema.shape : {}; @@ -464,4 +467,60 @@ describe('convertJsonSchemaToZod', () => { } }); }); + + describe('empty object handling', () => { + it('should return undefined for empty object schemas when allowEmptyObject is false', () => { + const emptyObjectSchemas = [ + { type: 'object' as const }, + { type: 'object' as const, properties: {} }, + ]; + + emptyObjectSchemas.forEach((schema) => { + expect(convertJsonSchemaToZod(schema, { allowEmptyObject: false })).toBeUndefined(); + }); + }); + + it('should return zod schema for empty object schemas when allowEmptyObject is true', () => { + const emptyObjectSchemas = [ + { type: 'object' as const }, + { type: 'object' as const, properties: {} }, + ]; + + emptyObjectSchemas.forEach((schema) => { + const result = convertJsonSchemaToZod(schema, { allowEmptyObject: true }); + expect(result).toBeDefined(); + expect(result instanceof z.ZodObject).toBeTruthy(); + }); + }); + + it('should return zod schema for empty object schemas by default', () => { + const emptyObjectSchemas = [ + { type: 'object' as const }, + { type: 'object' as const, properties: {} }, + ]; + + emptyObjectSchemas.forEach((schema) => { + const result = convertJsonSchemaToZod(schema); + expect(result).toBeDefined(); + expect(result instanceof z.ZodObject).toBeTruthy(); + }); + }); + + it('should still convert non-empty object schemas regardless of allowEmptyObject setting', () => { + const schema: JsonSchemaType = { + type: 'object', + properties: { + name: { type: 'string' }, + }, + }; + + const resultWithFlag = convertJsonSchemaToZod(schema, { allowEmptyObject: false }); + const resultWithoutFlag = convertJsonSchemaToZod(schema); + + expect(resultWithFlag).toBeDefined(); + expect(resultWithoutFlag).toBeDefined(); + expect(resultWithFlag instanceof z.ZodObject).toBeTruthy(); + expect(resultWithoutFlag instanceof z.ZodObject).toBeTruthy(); + }); + }); }); diff --git a/packages/data-provider/src/zod.ts b/packages/data-provider/src/zod.ts index 455bc579d52a..aa694fe14831 100644 --- a/packages/data-provider/src/zod.ts +++ b/packages/data-provider/src/zod.ts @@ -9,7 +9,24 @@ export type JsonSchemaType = { description?: string; }; -export function convertJsonSchemaToZod(schema: JsonSchemaType): z.ZodType { +function isEmptyObjectSchema(jsonSchema?: JsonSchemaType): boolean { + return ( + jsonSchema != null && + typeof jsonSchema === 'object' && + jsonSchema.type === 'object' && + (jsonSchema.properties == null || Object.keys(jsonSchema.properties).length === 0) + ); +} + +export function convertJsonSchemaToZod( + schema: JsonSchemaType, + options: { allowEmptyObject?: boolean } = {}, +): z.ZodType | undefined { + const { allowEmptyObject = true } = options; + if (!allowEmptyObject && isEmptyObjectSchema(schema)) { + return undefined; + } + let zodSchema: z.ZodType; // Handle primitive types @@ -26,13 +43,16 @@ export function convertJsonSchemaToZod(schema: JsonSchemaType): z.ZodType { zodSchema = z.boolean(); } else if (schema.type === 'array' && schema.items !== undefined) { const itemSchema = convertJsonSchemaToZod(schema.items); - zodSchema = z.array(itemSchema); + zodSchema = z.array(itemSchema as z.ZodType); } else if (schema.type === 'object') { const shape: Record = {}; const properties = schema.properties ?? {}; for (const [key, value] of Object.entries(properties)) { let fieldSchema = convertJsonSchemaToZod(value); + if (!fieldSchema) { + continue; + } if (value.description != null && value.description !== '') { fieldSchema = fieldSchema.describe(value.description); } From 70e410f38bced020e30bbb1775a7db5259d693d4 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Fri, 7 Feb 2025 02:15:38 +0100 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=92=AC=20fix:=20Temporary=20Chat=20PR?= =?UTF-8?q?'s=20broken=20components=20and=20improved=20UI=20(#5705)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * πŸ’¬ fix: Temporary Chat PR's broken components and improved UI * πŸ’¬ fix: bring back hover effect on AudioRecorder button * style: adjust position of Mention component popover * refactor: PromptsCommand typing and style position * refactor: virtualize mention UI --------- Co-authored-by: Danny Avila --- .../components/Chat/Input/AudioRecorder.tsx | 8 +- client/src/components/Chat/Input/ChatForm.tsx | 20 ++-- client/src/components/Chat/Input/Mention.tsx | 73 ++++++++++----- .../src/components/Chat/Input/MentionItem.tsx | 14 ++- .../components/Chat/Input/PromptsCommand.tsx | 93 +++++++++++++------ .../components/Chat/Input/TemporaryChat.tsx | 38 ++++++++ .../Input/ModelSelect/TemporaryChat.tsx | 16 ++-- client/src/localization/languages/Eng.ts | 1 + client/src/store/temporary.ts | 7 +- package-lock.json | 11 +++ package.json | 1 + 11 files changed, 196 insertions(+), 86 deletions(-) create mode 100644 client/src/components/Chat/Input/TemporaryChat.tsx diff --git a/client/src/components/Chat/Input/AudioRecorder.tsx b/client/src/components/Chat/Input/AudioRecorder.tsx index a16d8870aed5..96e29ec50227 100644 --- a/client/src/components/Chat/Input/AudioRecorder.tsx +++ b/client/src/components/Chat/Input/AudioRecorder.tsx @@ -13,7 +13,6 @@ export default function AudioRecorder({ methods, textAreaRef, isSubmitting, - isTemporary = false, }: { isRTL: boolean; disabled: boolean; @@ -21,7 +20,6 @@ export default function AudioRecorder({ methods: ReturnType; textAreaRef: React.RefObject; isSubmitting: boolean; - isTemporary?: boolean; }) { const { setValue, reset } = methods; const localize = useLocalize(); @@ -78,11 +76,7 @@ export default function AudioRecorder({ if (isLoading === true) { return ; } - return ( - - ); + return ; }; return ( diff --git a/client/src/components/Chat/Input/ChatForm.tsx b/client/src/components/Chat/Input/ChatForm.tsx index acfef0ad5ef0..442d32a45e2a 100644 --- a/client/src/components/Chat/Input/ChatForm.tsx +++ b/client/src/components/Chat/Input/ChatForm.tsx @@ -24,6 +24,7 @@ import { cn, removeFocusRings, checkIfScrollable } from '~/utils'; import FileFormWrapper from './Files/FileFormWrapper'; import { TextareaAutosize } from '~/components/ui'; import { useGetFileConfig } from '~/data-provider'; +import { TemporaryChat } from './TemporaryChat'; import TextareaHeader from './TextareaHeader'; import PromptsCommand from './PromptsCommand'; import AudioRecorder from './AudioRecorder'; @@ -47,7 +48,7 @@ const ChatForm = ({ index = 0 }) => { const TextToSpeech = useRecoilValue(store.textToSpeech); const automaticPlayback = useRecoilValue(store.automaticPlayback); const maximizeChatSpace = useRecoilValue(store.maximizeChatSpace); - const isTemporary = useRecoilValue(store.isTemporary); + const [isTemporaryChat, setIsTemporaryChat] = useRecoilState(store.isTemporary); const isSearching = useRecoilValue(store.isSearching); const [showStopButton, setShowStopButton] = useRecoilState(store.showStopButtonByIndex(index)); @@ -145,11 +146,8 @@ const ChatForm = ({ index = 0 }) => { const isUploadDisabled: boolean = endpointFileConfig?.disabled ?? false; const baseClasses = cn( - 'md:py-3.5 m-0 w-full resize-none bg-surface-tertiary py-[13px] placeholder-black/50 dark:placeholder-white/50 [&:has(textarea:focus)]:shadow-[0_2px_6px_rgba(0,0,0,.05)]', + 'md:py-3.5 m-0 w-full resize-none py-[13px] bg-surface-tertiary placeholder-black/50 dark:placeholder-white/50 [&:has(textarea:focus)]:shadow-[0_2px_6px_rgba(0,0,0,.05)]', isCollapsed ? 'max-h-[52px]' : 'max-h-[65vh] md:max-h-[75vh]', - isTemporary - ? 'bg-gray-600 text-white placeholder-white/20' - : 'bg-surface-tertiary placeholder-black/50 dark:placeholder-white/50', ); const uploadActive = endpointSupportsFiles && !isUploadDisabled; @@ -185,12 +183,11 @@ const ChatForm = ({ index = 0 }) => { /> )} -
+
+ {endpoint && ( @@ -243,7 +240,6 @@ const ChatForm = ({ index = 0 }) => { textAreaRef={textAreaRef} disabled={!!disableInputs} isSubmitting={isSubmitting} - isTemporary={isTemporary} /> )} {TextToSpeech && automaticPlayback && } diff --git a/client/src/components/Chat/Input/Mention.tsx b/client/src/components/Chat/Input/Mention.tsx index e268bba00f13..c09c23b2bdd3 100644 --- a/client/src/components/Chat/Input/Mention.tsx +++ b/client/src/components/Chat/Input/Mention.tsx @@ -1,4 +1,5 @@ import { useState, useRef, useEffect } from 'react'; +import { AutoSizer, List } from 'react-virtualized'; import { EModelEndpoint } from 'librechat-data-provider'; import type { SetterOrUpdater } from 'recoil'; import type { MentionOption, ConvoGenerator } from '~/common'; @@ -9,6 +10,8 @@ import { useLocalize, useCombobox } from '~/hooks'; import { removeCharIfLast } from '~/utils'; import MentionItem from './MentionItem'; +const ROW_HEIGHT = 40; + export default function Mention({ setShowMentionPopover, newConversation, @@ -121,8 +124,41 @@ export default function Mention({ currentActiveItem?.scrollIntoView({ behavior: 'instant', block: 'nearest' }); }, [type, activeIndex]); + const rowRenderer = ({ + index, + key, + style, + }: { + index: number; + key: string; + style: React.CSSProperties; + }) => { + const mention = matches[index] as MentionOption; + return ( + { + e.preventDefault(); + e.stopPropagation(); + if (timeoutRef.current) { + clearTimeout(timeoutRef.current); + } + timeoutRef.current = null; + handleSelect(mention); + }} + name={mention.label ?? ''} + icon={mention.icon} + description={mention.description} + isActive={index === activeIndex} + /> + ); + }; + return ( -
+
{open && ( -
- {(matches as MentionOption[]).map((mention, index) => ( - { - e.preventDefault(); - e.stopPropagation(); - if (timeoutRef.current) { - clearTimeout(timeoutRef.current); - } - timeoutRef.current = null; - handleSelect(mention); - }} - name={mention.label ?? ''} - icon={mention.icon} - description={mention.description} - isActive={index === activeIndex} - /> - ))} +
+ + {({ width }) => ( + + )} +
)}
diff --git a/client/src/components/Chat/Input/MentionItem.tsx b/client/src/components/Chat/Input/MentionItem.tsx index 7cdaa127c5d2..fcfb22c3124e 100644 --- a/client/src/components/Chat/Input/MentionItem.tsx +++ b/client/src/components/Chat/Input/MentionItem.tsx @@ -10,6 +10,7 @@ export interface MentionItemProps { icon?: React.ReactNode; isActive?: boolean; description?: string; + style?: React.CSSProperties; } export default function MentionItem({ @@ -19,21 +20,28 @@ export default function MentionItem({ icon, isActive, description, + style, type = 'mention', }: MentionItemProps) { return ( - +
+
+ ); +}; diff --git a/client/src/components/Input/ModelSelect/TemporaryChat.tsx b/client/src/components/Input/ModelSelect/TemporaryChat.tsx index d8b83086895f..1f4168d953c9 100644 --- a/client/src/components/Input/ModelSelect/TemporaryChat.tsx +++ b/client/src/components/Input/ModelSelect/TemporaryChat.tsx @@ -4,15 +4,16 @@ import { MessageCircleDashed } from 'lucide-react'; import { useRecoilState, useRecoilValue } from 'recoil'; import { Constants, getConfigDefaults } from 'librechat-data-provider'; import { useGetStartupConfig } from '~/data-provider'; -import temporaryStore from '~/store/temporary'; import { Switch } from '~/components/ui'; +import { useLocalize } from '~/hooks'; import { cn } from '~/utils'; import store from '~/store'; export const TemporaryChat = () => { + const localize = useLocalize(); const { data: startupConfig } = useGetStartupConfig(); const defaultInterface = getConfigDefaults().interface; - const [isTemporary, setIsTemporary] = useRecoilState(temporaryStore.isTemporary); + const [isTemporary, setIsTemporary] = useRecoilState(store.isTemporary); const conversation = useRecoilValue(store.conversationByIndex(0)) || undefined; const conversationId = conversation?.conversationId ?? ''; const interfaceConfig = useMemo( @@ -20,7 +21,7 @@ export const TemporaryChat = () => { [startupConfig], ); - if (!interfaceConfig.temporaryChat) { + if (interfaceConfig.temporaryChat === false) { return null; } @@ -39,20 +40,21 @@ export const TemporaryChat = () => { }; return ( -
+
- Temporary Chat + {localize('com_ui_temporary_chat')}
diff --git a/client/src/localization/languages/Eng.ts b/client/src/localization/languages/Eng.ts index 338609101afe..358d8fb59554 100644 --- a/client/src/localization/languages/Eng.ts +++ b/client/src/localization/languages/Eng.ts @@ -463,6 +463,7 @@ export default { com_ui_shared_link_delete_success: 'Successfully deleted shared link', com_ui_shared_link_bulk_delete_success: 'Successfully deleted shared links', com_ui_search: 'Search', + com_ui_temporary_chat: 'Temporary Chat', com_auth_error_login: 'Unable to login with the information provided. Please check your credentials and try again.', com_auth_error_login_rl: diff --git a/client/src/store/temporary.ts b/client/src/store/temporary.ts index b82bb789c36c..cddea0615584 100644 --- a/client/src/store/temporary.ts +++ b/client/src/store/temporary.ts @@ -1,9 +1,6 @@ -import { atom } from 'recoil'; +import { atomWithLocalStorage } from '~/store/utils'; -const isTemporary = atom({ - key: 'isTemporary', - default: false, -}); +const isTemporary = atomWithLocalStorage('isTemporary', false); export default { isTemporary, diff --git a/package-lock.json b/package-lock.json index f05d0d85b406..4d75979ea328 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "devDependencies": { "@axe-core/playwright": "^4.9.1", "@playwright/test": "^1.38.1", + "@types/react-virtualized": "^9.22.0", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "cross-env": "^7.0.3", @@ -15126,6 +15127,16 @@ "@types/react": "*" } }, + "node_modules/@types/react-virtualized": { + "version": "9.22.0", + "resolved": "https://registry.npmjs.org/@types/react-virtualized/-/react-virtualized-9.22.0.tgz", + "integrity": "sha512-JL/YCCFZ123za//cj10Apk54F0UGFMrjOE0QHTuXt1KBMFrzLOGv9/x6Uc/pZ0Gaf4o6w61Fostvlw0DwuPXig==", + "dev": true, + "dependencies": { + "@types/prop-types": "*", + "@types/react": "*" + } + }, "node_modules/@types/resolve": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", diff --git a/package.json b/package.json index 9e43048f91c4..02e05722d5df 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "devDependencies": { "@axe-core/playwright": "^4.9.1", "@playwright/test": "^1.38.1", + "@types/react-virtualized": "^9.22.0", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "cross-env": "^7.0.3", From 18339ec7bbdeace54e72821a40988c15f80083b2 Mon Sep 17 00:00:00 2001 From: 5026 <40320172+SN-Koarashi@users.noreply.github.com> Date: Fri, 7 Feb 2025 09:16:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=8C=8D=20i18n:=20"Balance"=20Localiza?= =?UTF-8?q?tion=20For=20ZhTraditional=20(#5682)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/localization/languages/ZhTraditional.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/localization/languages/ZhTraditional.ts b/client/src/localization/languages/ZhTraditional.ts index 165d8a4b0320..003a09bf61c5 100644 --- a/client/src/localization/languages/ZhTraditional.ts +++ b/client/src/localization/languages/ZhTraditional.ts @@ -881,5 +881,5 @@ export default { com_ui_collapse_chat: 'ζ”Άεˆε°θ©±', com_endpoint_message_new: '訊息 {0}', com_ui_speech_while_submitting: 'ζ­£εœ¨η”’η”Ÿε›žζ‡‰ζ™‚η„‘ζ³•ι€ε‡ΊθͺžιŸ³', - com_nav_balance: '余鑍', + com_nav_balance: '逘鑍', };