diff --git a/apps/cli/src/commands/learn.ts b/apps/cli/src/commands/learn.ts index ed94dd67a..af5f45920 100644 --- a/apps/cli/src/commands/learn.ts +++ b/apps/cli/src/commands/learn.ts @@ -1,11 +1,18 @@ +import * as fs from "node:fs"; import { readFile } from "node:fs/promises"; import { dirname, extname, resolve, sep } from "node:path"; import { type PrinterBlueprint, chalk } from "@codemod-com/printer"; -import { type KnownEngines, doubleQuotify } from "@codemod-com/utilities"; +import { parseCodemodSettings, transpile } from "@codemod-com/runner"; +import { + type KnownEngines, + TarService, + doubleQuotify, +} from "@codemod-com/utilities"; import { AxiosError } from "axios"; import inquirer from "inquirer"; import open from "open"; -import { createCodeDiff } from "../apis.js"; +import { createCodeDiff, sendAIRequest } from "../apis.js"; +import { buildSourcedCodemodOptions } from "../buildCodemodOptions.js"; import { findModifiedFiles, getFileFromCommit, @@ -13,6 +20,7 @@ import { getLatestCommitHash, isFileInGitDirectory, } from "../gitCommands.js"; +import { getCodemodPrompt, getCurrentUserOrLogin } from "../utils.js"; // remove all special characters and whitespaces const removeSpecialCharacters = (str: string) => @@ -63,8 +71,9 @@ export const handleLearnCliCommand = async (options: { printer: PrinterBlueprint; target: string | null; source: string | null; + engine: string | null; }) => { - const { printer, target, source } = options; + const { printer, target, source, engine } = options; if (target !== null && !isFileInGitDirectory(target)) { printer.printOperationMessage({ @@ -252,35 +261,85 @@ export const handleLearnCliCommand = async (options: { ); if (source !== null) { + const userData = await getCurrentUserOrLogin({ + message: "Please login to continue.", + printer, + }); + + const codemodSettings = parseCodemodSettings({ source, engine }); + if (codemodSettings.kind !== "runSourced") { + return printer.printOperationMessage({ + kind: "error", + message: "Unexpected codemod settings parsing result.", + }); + } + + const tarService = new TarService(fs); + // Improve existing codemod - await Promise.all( - Object.entries(diffs).map(async ([path, fileDiffs]) => - fileDiffs.map(({ before, after }, i) => { - const spinner = printer.withLoaderMessage( - `Processing diff #${i + 1}`, - ); - - try { - // 1. send request to AI service - // 2. update the codemod in the source by adding the test fixture and updating the source code - spinner.succeed(); - } catch (err) { - spinner.fail(); - const error = err as AxiosError<{ message: string }> | Error; - printer.printConsoleMessage( - "error", - `Failed to process diff for file: ${path} - ${ - error instanceof AxiosError - ? error.response?.data.message - : error.message - }`, - ); - return; - } - }), - ), + const codemod = await buildSourcedCodemodOptions( + fs, + printer, + codemodSettings, + { download: () => void 0 as any }, + tarService, ); + if (codemod.engine !== "jscodeshift") { + return printer.printOperationMessage({ + kind: "error", + message: "Recipe codemods are not supported for improving.", + }); + } + + let existingCodemodSource: string; + try { + const codemodSource = await readFile(codemod.indexPath, { + encoding: "utf8", + }); + + existingCodemodSource = codemod.indexPath.endsWith(".ts") + ? transpile(codemodSource.toString()) + : codemodSource.toString(); + } catch (err) { + return printer.printOperationMessage({ + kind: "error", + message: "Unexpected error occurred while reading the codemod source.", + }); + } + + const prompt = getCodemodPrompt({ + type: "improve", + testCases: Object.values(diffs).flat(), + existingCodemodSource, + }); + + const chatSpinner = printer.withLoaderMessage("Improving your codemod..."); + + try { + // 1. send request to AI service + const response = await sendAIRequest({ + accessToken: userData.token, + prompt, + }); + + console.log(response); + // 2. update the codemod in the source by adding the test fixture and updating the source code + chatSpinner.succeed(); + } catch (err) { + chatSpinner.fail(); + const error = err as AxiosError<{ message: string }> | Error; + + return printer.printConsoleMessage( + "error", + `Failed to send an API request to the AI service:\n ${ + error instanceof AxiosError + ? error.response?.data.errorText + : error.message + }`, + ); + } + return; } diff --git a/apps/cli/src/executeMainThread.ts b/apps/cli/src/executeMainThread.ts index 2033eb291..333cc11d7 100644 --- a/apps/cli/src/executeMainThread.ts +++ b/apps/cli/src/executeMainThread.ts @@ -233,6 +233,11 @@ export const executeMainThread = async () => { alias: "s", type: "string", description: "path to the codemod to improve on top of", + }) + .option("engine", { + type: "string", + description: "the engine to use with the standalone codemod", + hidden: true, }), async (args) => { const { executeCliCommand, printer } = @@ -243,6 +248,7 @@ export const executeMainThread = async () => { printer, target: args.target ?? null, source: args.source ?? null, + engine: args.engine ?? null, }), ); }, diff --git a/apps/cli/src/utils.ts b/apps/cli/src/utils.ts index d9781bc37..9534319e1 100644 --- a/apps/cli/src/utils.ts +++ b/apps/cli/src/utils.ts @@ -206,11 +206,12 @@ const generateCodemodContext = `### Context const improveCodemodContext = `### Context - You will be provided with BEFORE and AFTER code snippet pairs and an existing codemod that might or might not satisfy them. +- An existing codemod is located in a zip archive sent to you. - Use the provided jscodeshift codemod and see whether it would turn each BEFORE snippet into corresponding AFTER snippet. - Identify common patterns and improve the codemod to handle all cases. - Use only jscodeshift and TypeScript. - If comments in AFTER snippets describe the transformation, do not preserve them. -- Only include the generated codemod in your response, no extra explanations. +- Only include the download link for the archive with updated code in your response, no extra explanations or text. - Comment your code following best practices. - Do not import 'namedTypes' or 'builders' from jscodeshift. - Always narrow node types using typeguards before accessing their properties. @@ -380,20 +381,22 @@ const isVariableDeclarator = root.find(j.VariableDeclarator).at(0).isOfType('Var \`\`\` `; -export function getCodemodPrompt( - type: "generate", - testCases: { before: string; after: string }[], -): string; -export function getCodemodPrompt( - type: "improve", - testCases: { before: string; after: string }[], - existingCodemodSource: string, -): string; -export function getCodemodPrompt( - type: "improve" | "generate", - testCases: { before: string; after: string }[], - existingCodemodSource?: string, -) { +export function getCodemodPrompt(options: { + type: "generate"; + testCases: { before: string; after: string }[]; +}): string; +export function getCodemodPrompt(options: { + type: "improve"; + testCases: { before: string; after: string }[]; + existingCodemodSource: string; +}): string; +export function getCodemodPrompt(options: { + type: "improve" | "generate"; + testCases: { before: string; after: string }[]; + existingCodemodSource?: string; +}) { + const { type, testCases, existingCodemodSource } = options; + return `${type === "generate" ? generateCodemodContext : improveCodemodContext} ${ diff --git a/apps/modgpt/Dockerfile b/apps/modgpt/Dockerfile index 8004d1d17..6cfc25393 100644 --- a/apps/modgpt/Dockerfile +++ b/apps/modgpt/Dockerfile @@ -24,6 +24,7 @@ RUN pnpm install # Copy the remaining application files COPY apps/modgpt/tsconfig.json apps/modgpt/ +COPY apps/modgpt/reset.d.ts apps/modgpt/ COPY apps/modgpt/esbuild.config.js apps/modgpt/ COPY apps/modgpt/src apps/modgpt/src/ diff --git a/apps/modgpt/package.json b/apps/modgpt/package.json index 90707c423..7b4d335da 100644 --- a/apps/modgpt/package.json +++ b/apps/modgpt/package.json @@ -10,6 +10,7 @@ "author": "Codemod inc.", "license": "ISC", "dependencies": { + "@codemod-com/api-types": "workspace:*", "@codemod-com/auth": "workspace:*", "@fastify/cors": "catalog:", "@fastify/multipart": "catalog:", @@ -19,6 +20,7 @@ "chatgpt": "catalog:", "dotenv": "catalog:", "fastify": "catalog:", + "openai": "catalog:", "openai-edge": "catalog:", "replicate": "catalog:", "ts-node": "^10.9.2", diff --git a/apps/modgpt/reset.d.ts b/apps/modgpt/reset.d.ts new file mode 100644 index 000000000..e4d600ccb --- /dev/null +++ b/apps/modgpt/reset.d.ts @@ -0,0 +1,2 @@ +// Do not add any other lines of code to this file! +import "@total-typescript/ts-reset"; diff --git a/apps/modgpt/src/routes/sendChat.ts b/apps/modgpt/src/routes/sendChat.ts index f26902ffd..5d6c94b80 100644 --- a/apps/modgpt/src/routes/sendChat.ts +++ b/apps/modgpt/src/routes/sendChat.ts @@ -1,7 +1,11 @@ -import type { IncomingMessage, ServerResponse } from "node:http"; +import { + type ApiResponse, + BAD_REQUEST, + INTERNAL_SERVER_ERROR, +} from "@codemod-com/api-types"; +import type { MultipartFile } from "@fastify/multipart"; import { OpenAIStream } from "ai"; -import { ChatGPTAPI, type ChatMessage } from "chatgpt"; -import * as openAiEdge from "openai-edge"; +import OpenAI, { toFile } from "openai"; import { environment } from "../dev-utils/configs"; import { corsDisableHeaders } from "../dev-utils/cors"; import type { Instance } from "../fastifyInstance"; @@ -12,90 +16,111 @@ import { ReplicateService } from "../services/replicateService"; const { OPEN_AI_API_KEY, CLAUDE_API_KEY, REPLICATE_API_KEY, NODE_ENV } = environment; -const OpenAIConfiguration = openAiEdge.Configuration; - -const COMPLETION_PARAMS = { - top_p: 0.1, - temperature: 0.2, - model: "gpt-4", -}; - -const chatGptApi = new ChatGPTAPI({ - apiKey: OPEN_AI_API_KEY, - completionParams: COMPLETION_PARAMS, -}); const claudeService = new ClaudeService(CLAUDE_API_KEY, 1024); const replicateService = new ReplicateService(REPLICATE_API_KEY); -const openAiEdgeApi = new openAiEdge.OpenAIApi( - new OpenAIConfiguration({ apiKey: OPEN_AI_API_KEY }), -); +const openai = new OpenAI({ + apiKey: OPEN_AI_API_KEY, +}); export const getSendChatPath = (instance: Instance) => - instance.post( + instance.post<{ + Reply: ApiResponse< + Awaited> | string + >; + }>( "/sendChat", { preHandler: instance.authenticate }, async (request, reply) => { const { messages, engine } = parseSendChatBody(request.body); - if (!messages[0]) { - return reply.code(400).send(); + + if (messages.find((msg) => msg.role === "function" && !msg.name)) { + return reply.status(400).send({ + errorText: "Function messages must have a name", + error: BAD_REQUEST, + }); } - let completion: string | ChatMessage | null = null; + let completion: + | Awaited> + | string + | null = null; + try { - if (engine === "claude-2.0" || engine === "claude-instant-1.2") { - completion = await claudeService.complete( - engine, - messages[0].content, - ); - } else if (engine === "replit-code-v1-3b") { - completion = await replicateService.complete(messages[0].content); - } else if (engine === "gpt-4-with-chroma") { - const prompt = messages - .map(({ content, role }) => `${role}: ${content}`) - .join("\n"); - completion = await chatGptApi.sendMessage(prompt); - } else if (openAiEdgeApi) { - const response = await openAiEdgeApi.createChatCompletion({ - ...COMPLETION_PARAMS, - model: engine, - messages: messages.map((msg) => ({ - role: msg.role, - content: msg.content, - })), - stream: true, + switch (engine) { + case "claude-2.0": + case "claude-instant-1.2": + completion = await claudeService.complete( + engine, + messages[0].content, + ); + break; + case "replit-code-v1-3b": + completion = await replicateService.complete(messages[0].content); + break; + case "gpt-4-with-chroma": + completion = await openai.chat.completions.create({ + messages, + model: engine ?? "gpt-4", + }); + break; + } + + if (completion) { + return reply.type("text/plain; charset=utf-8").send(completion); + } + + const files: MultipartFile[] = []; + for await (const multipartFile of request.files({ + // 15 MB + limits: { fileSize: 1024 * 1024 * 15 }, + })) { + files.push(multipartFile); + } + + if (files.length > 1) { + return reply.status(400).send({ + errorText: "Only one file is allowed", + error: BAD_REQUEST, }); - const headers = corsDisableHeaders; + } - const stream = OpenAIStream(response); - reply.raw.writeHead(200, headers); - reply.hijack(); - const reader = stream.getReader(); - await pushStreamToReply(reader, reply.raw); - } else { - throw new Error( - "You need to provide the OPEN_AI_API_KEY to use this endpoint", - ); + if (files[0]) { + await openai.files.create({ + file: await toFile(files[0].toBuffer(), "codemod.zip"), + purpose: "fine-tune", + }); } - if (!reply.sent && completion) { - reply.type("text/plain; charset=utf-8").send(completion); + const response = await openai.chat.completions.create({ + top_p: 0.1, + temperature: 0.2, + model: engine ?? "gpt-4", + messages, + stream: true, + }); + + const headers = corsDisableHeaders; + const stream = OpenAIStream(response); + reply.raw.writeHead(200, headers); + reply.hijack(); + + const reader = stream.getReader(); + while (true) { + const { done, value } = await reader.read(); + + if (done) { + break; + } + reply.raw.write(value); } + + return reply.raw.end() as any; } catch (error) { console.error(error); - reply.send(error); + reply.send({ + errorText: (error as Error).message, + error: INTERNAL_SERVER_ERROR, + }); } }, ); - -async function pushStreamToReply( - reader: ReadableStreamDefaultReader, - response: ServerResponse, -) { - const { done, value } = await reader.read(); - if (done) { - response.end(); - return; - } - response.write(value); - await pushStreamToReply(reader, response); -} diff --git a/apps/modgpt/src/schemata/schema.ts b/apps/modgpt/src/schemata/schema.ts index 991c25ac6..c93887224 100644 --- a/apps/modgpt/src/schemata/schema.ts +++ b/apps/modgpt/src/schemata/schema.ts @@ -1,24 +1,35 @@ import { - array, literal, object, optional, parse, string, + tuple, union, } from "valibot"; -export const roles = ["system", "user", "assistant", "function"] as const; +export const roles = ["system", "user", "assistant"] as const; + +export const rolesWithName = ["function"] as const; + +export const allRoles = [...roles, ...rolesWithName] as const; + +const chatMessageSchema = union([ + object({ + content: string(), + role: union(rolesWithName.map((r) => literal(r))), + name: string(), + }), + object({ + content: string(), + role: union(roles.map((r) => literal(r))), + name: string(), + }), +]); export const sendChatBodySchema = object({ - messages: array( - object({ - content: string(), - role: union(roles.map((role) => literal(role))), - name: optional(string()), - }), - ), - engine: string(), + messages: tuple([chatMessageSchema], chatMessageSchema), + engine: optional(string()), }); export const parseSendChatBody = (input: unknown) => diff --git a/apps/modgpt/tsconfig.json b/apps/modgpt/tsconfig.json index 1be07579a..4fe5ebd82 100644 --- a/apps/modgpt/tsconfig.json +++ b/apps/modgpt/tsconfig.json @@ -5,7 +5,7 @@ "~/*": ["src/*"] } }, - "include": ["src/**/*"], + "include": ["reset.d.ts", "./src", "./test"], "exclude": ["node_modules", "**/*.spec.ts"], "extends": "@codemod-com/tsconfig/backend.json" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82e172e8a..f2745acdc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -580,8 +580,8 @@ catalogs: specifier: ^8.4.2 version: 8.4.2 openai: - specifier: 4.23.0 - version: 4.23.0 + specifier: ^4.52.7 + version: 4.52.7 openai-edge: specifier: 1.2.2 version: 1.2.2 @@ -1011,7 +1011,7 @@ importers: version: 5.2.5 chromadb: specifier: 'catalog:' - version: 1.7.2(openai@4.23.0) + version: 1.7.2(openai@4.52.7) cron: specifier: 'catalog:' version: 3.1.7 @@ -1029,10 +1029,10 @@ importers: version: 5.4.1 langchain: specifier: 'catalog:' - version: 0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1) + version: 0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1) openai: specifier: 'catalog:' - version: 4.23.0 + version: 4.52.7 openai-edge: specifier: 'catalog:' version: 1.2.2 @@ -1729,6 +1729,9 @@ importers: apps/modgpt: dependencies: + '@codemod-com/api-types': + specifier: workspace:* + version: link:../../packages/api-types '@codemod-com/auth': specifier: workspace:* version: link:../../packages/auth @@ -1756,6 +1759,9 @@ importers: fastify: specifier: 'catalog:' version: 4.25.1 + openai: + specifier: 'catalog:' + version: 4.52.7 openai-edge: specifier: 'catalog:' version: 1.2.2 @@ -6465,7 +6471,7 @@ importers: version: 0.30.10 openai: specifier: 'catalog:' - version: 4.23.0 + version: 4.52.7 prettier: specifier: ^3.2.5 version: 3.3.2 @@ -16904,12 +16910,8 @@ packages: resolution: {integrity: sha512-C3/Ao9Hkx5uBPv9YFBpX/x59XMPgPUU4dyGg/0J2sOJ7O9D98kD+lfdOc7v/60oYo5xzMGct80uFkYLH+X2qgw==} engines: {node: '>=18'} - openai@4.23.0: - resolution: {integrity: sha512-ey2CXh1OTcTUa0AWZWuTpgA9t5GuAG3DVU1MofCRUI7fQJij8XJ3Sr0VtgxoAE69C9wbHBMCux8Z/IQZfSwHiA==} - hasBin: true - - openai@4.52.0: - resolution: {integrity: sha512-xmiNcdA9QJ5wffHpZDpIsge6AsPTETJ6h5iqDNuFQ7qGSNtonHn8Qe0VHy4UwLE8rBWiSqh4j+iSvuYZSeKkPg==} + openai@4.52.7: + resolution: {integrity: sha512-dgxA6UZHary6NXUHEDj5TWt8ogv0+ibH+b4pT5RrWMjiRZVylNwLcw/2ubDrX5n0oUmHX/ZgudMJeemxzOvz7A==} hasBin: true openapi-types@12.1.3: @@ -20527,8 +20529,8 @@ snapshots: '@aws-crypto/sha1-browser': 5.2.0 '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/client-sso-oidc': 3.600.0 - '@aws-sdk/client-sts': 3.600.0(@aws-sdk/client-sso-oidc@3.600.0) + '@aws-sdk/client-sso-oidc': 3.600.0(@aws-sdk/client-sts@3.600.0) + '@aws-sdk/client-sts': 3.600.0 '@aws-sdk/core': 3.598.0 '@aws-sdk/credential-provider-node': 3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0) '@aws-sdk/middleware-bucket-endpoint': 3.598.0 @@ -20585,11 +20587,11 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sso-oidc@3.600.0': + '@aws-sdk/client-sso-oidc@3.600.0(@aws-sdk/client-sts@3.600.0)': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/client-sts': 3.600.0(@aws-sdk/client-sso-oidc@3.600.0) + '@aws-sdk/client-sts': 3.600.0 '@aws-sdk/core': 3.598.0 '@aws-sdk/credential-provider-node': 3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0) '@aws-sdk/middleware-host-header': 3.598.0 @@ -20628,6 +20630,7 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.6.3 transitivePeerDependencies: + - '@aws-sdk/client-sts' - aws-crt '@aws-sdk/client-sso@3.598.0': @@ -20673,11 +20676,11 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)': + '@aws-sdk/client-sts@3.600.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/client-sso-oidc': 3.600.0 + '@aws-sdk/client-sso-oidc': 3.600.0(@aws-sdk/client-sts@3.600.0) '@aws-sdk/core': 3.598.0 '@aws-sdk/credential-provider-node': 3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0) '@aws-sdk/middleware-host-header': 3.598.0 @@ -20716,7 +20719,6 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.6.3 transitivePeerDependencies: - - '@aws-sdk/client-sso-oidc' - aws-crt '@aws-sdk/core@3.598.0': @@ -20750,7 +20752,7 @@ snapshots: '@aws-sdk/credential-provider-ini@3.598.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0)': dependencies: - '@aws-sdk/client-sts': 3.600.0(@aws-sdk/client-sso-oidc@3.600.0) + '@aws-sdk/client-sts': 3.600.0 '@aws-sdk/credential-provider-env': 3.598.0 '@aws-sdk/credential-provider-http': 3.598.0 '@aws-sdk/credential-provider-process': 3.598.0 @@ -20808,7 +20810,7 @@ snapshots: '@aws-sdk/credential-provider-web-identity@3.598.0(@aws-sdk/client-sts@3.600.0)': dependencies: - '@aws-sdk/client-sts': 3.600.0(@aws-sdk/client-sso-oidc@3.600.0) + '@aws-sdk/client-sts': 3.600.0 '@aws-sdk/types': 3.598.0 '@smithy/property-provider': 3.1.2 '@smithy/types': 3.2.0 @@ -20935,7 +20937,7 @@ snapshots: '@aws-sdk/token-providers@3.598.0(@aws-sdk/client-sso-oidc@3.600.0)': dependencies: - '@aws-sdk/client-sso-oidc': 3.600.0 + '@aws-sdk/client-sso-oidc': 3.600.0(@aws-sdk/client-sts@3.600.0) '@aws-sdk/types': 3.598.0 '@smithy/property-provider': 3.1.2 '@smithy/shared-ini-file-loader': 3.1.2 @@ -23314,13 +23316,13 @@ snapshots: '@kwsites/promise-deferred@1.1.1': {} - '@langchain/community@0.0.57(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(chromadb@1.7.2(openai@4.23.0))(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1)': + '@langchain/community@0.0.57(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(chromadb@1.7.2(openai@4.52.7))(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1)': dependencies: - '@langchain/core': 0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.23.0) - '@langchain/openai': 0.0.34(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1)) + '@langchain/core': 0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.7) + '@langchain/openai': 0.0.34(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1)) expr-eval: 2.0.2 flat: 5.0.2 - langsmith: 0.1.32(@langchain/core@0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.23.0))(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.23.0) + langsmith: 0.1.32(@langchain/core@0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.7))(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.7) uuid: 9.0.1 zod: 3.23.8 zod-to-json-schema: 3.23.1(zod@3.23.8) @@ -23328,7 +23330,7 @@ snapshots: '@aws-crypto/sha256-js': 5.2.0 '@aws-sdk/credential-provider-node': 3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0) '@smithy/util-utf8': 2.3.0 - chromadb: 1.7.2(openai@4.23.0) + chromadb: 1.7.2(openai@4.52.7) ioredis: 5.4.1 jsdom: 23.2.0 jsonwebtoken: 9.0.2 @@ -23341,31 +23343,13 @@ snapshots: - langchain - openai - '@langchain/core@0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.23.0)': - dependencies: - ansi-styles: 5.2.0 - camelcase: 6.3.0 - decamelize: 1.2.0 - js-tiktoken: 1.0.12 - langsmith: 0.1.32(@langchain/core@0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.23.0))(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.23.0) - ml-distance: 4.0.1 - mustache: 4.2.0 - p-queue: 6.6.2 - p-retry: 4.6.2 - uuid: 9.0.1 - zod: 3.23.8 - zod-to-json-schema: 3.23.1(zod@3.23.8) - transitivePeerDependencies: - - langchain - - openai - - '@langchain/core@0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.0)': + '@langchain/core@0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.7)': dependencies: ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.12 - langsmith: 0.1.32(@langchain/core@0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.0))(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.0) + langsmith: 0.1.32(@langchain/core@0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.7))(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.7) ml-distance: 4.0.1 mustache: 4.2.0 p-queue: 6.6.2 @@ -23377,11 +23361,11 @@ snapshots: - langchain - openai - '@langchain/openai@0.0.34(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))': + '@langchain/openai@0.0.34(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))': dependencies: - '@langchain/core': 0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.0) + '@langchain/core': 0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.7) js-tiktoken: 1.0.12 - openai: 4.52.0 + openai: 4.52.7 zod: 3.23.8 zod-to-json-schema: 3.23.1(zod@3.23.8) transitivePeerDependencies: @@ -27640,12 +27624,12 @@ snapshots: chownr@3.0.0: {} - chromadb@1.7.2(openai@4.23.0): + chromadb@1.7.2(openai@4.52.7): dependencies: cliui: 8.0.1 isomorphic-fetch: 3.0.0 optionalDependencies: - openai: 4.23.0 + openai: 4.52.7 transitivePeerDependencies: - encoding @@ -29017,7 +29001,7 @@ snapshots: eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint@8.56.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint@8.56.0))(eslint@8.56.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.56.0) eslint-plugin-react: 7.34.3(eslint@8.56.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.56.0) @@ -29045,7 +29029,7 @@ snapshots: enhanced-resolve: 5.17.0 eslint: 8.56.0 eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint@8.56.0))(eslint@8.56.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint@8.56.0))(eslint@8.56.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 is-core-module: 2.14.0 @@ -29067,7 +29051,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint@8.56.0))(eslint@8.56.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -30890,12 +30874,12 @@ snapshots: kolorist@1.8.0: {} - langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1): + langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1): dependencies: '@anthropic-ai/sdk': 0.9.1 - '@langchain/community': 0.0.57(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(chromadb@1.7.2(openai@4.23.0))(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1) - '@langchain/core': 0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.23.0) - '@langchain/openai': 0.0.34(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1)) + '@langchain/community': 0.0.57(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(chromadb@1.7.2(openai@4.52.7))(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1) + '@langchain/core': 0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.7) + '@langchain/openai': 0.0.34(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1)) binary-extensions: 2.3.0 expr-eval: 2.0.2 js-tiktoken: 1.0.12 @@ -30915,7 +30899,7 @@ snapshots: '@aws-sdk/credential-provider-node': 3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0) axios: 1.7.2 cheerio: 1.0.0-rc.12 - chromadb: 1.7.2(openai@4.23.0) + chromadb: 1.7.2(openai@4.52.7) ignore: 5.3.1 ioredis: 5.4.1 jsdom: 23.2.0 @@ -31001,19 +30985,7 @@ snapshots: p-retry: 4.6.2 uuid: 9.0.1 - langsmith@0.1.32(@langchain/core@0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.23.0))(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.23.0): - dependencies: - '@types/uuid': 9.0.8 - commander: 10.0.1 - p-queue: 6.6.2 - p-retry: 4.6.2 - uuid: 9.0.1 - optionalDependencies: - '@langchain/core': 0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.23.0) - langchain: 0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1) - openai: 4.23.0 - - langsmith@0.1.32(@langchain/core@0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.0))(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.0): + langsmith@0.1.32(@langchain/core@0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.7))(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.7): dependencies: '@types/uuid': 9.0.8 commander: 10.0.1 @@ -31021,9 +30993,9 @@ snapshots: p-retry: 4.6.2 uuid: 9.0.1 optionalDependencies: - '@langchain/core': 0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.0) - langchain: 0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.23.0))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.23.0)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1) - openai: 4.52.0 + '@langchain/core': 0.1.63(langchain@0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1))(openai@4.52.7) + langchain: 0.0.209(@aws-crypto/sha256-js@5.2.0)(@aws-sdk/client-s3@3.600.0)(@aws-sdk/credential-provider-node@3.600.0(@aws-sdk/client-sso-oidc@3.600.0)(@aws-sdk/client-sts@3.600.0))(@smithy/util-utf8@2.3.0)(axios@1.7.2)(cheerio@1.0.0-rc.12)(chromadb@1.7.2(openai@4.52.7))(ignore@5.3.1)(ioredis@5.4.1)(jsdom@23.2.0)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@4.52.7)(pg@8.12.0)(replicate@0.25.2)(ws@8.17.1) + openai: 4.52.7 language-subtag-registry@0.3.23: {} @@ -32561,21 +32533,7 @@ snapshots: openai-edge@1.2.2: {} - openai@4.23.0: - dependencies: - '@types/node': 18.11.18 - '@types/node-fetch': 2.6.11 - abort-controller: 3.0.0 - agentkeepalive: 4.5.0 - digest-fetch: 1.3.0 - form-data-encoder: 1.7.2 - formdata-node: 4.4.1 - node-fetch: 2.7.0 - web-streams-polyfill: 3.3.3 - transitivePeerDependencies: - - encoding - - openai@4.52.0: + openai@4.52.7: dependencies: '@types/node': 18.11.18 '@types/node-fetch': 2.6.11 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index e631daac9..82113755b 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -194,7 +194,7 @@ catalog: node-fetch: ^3.3.2 null-loader: ^4.0.1 open: ^8.4.2 - openai: 4.23.0 + openai: ^4.52.7 openai-edge: 1.2.2 ora: ^8.0.1 os-browserify: ^0.3.0