From 391da4f996a454565d82924580467558b03c90d0 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Fri, 26 Jul 2024 14:40:34 -0700 Subject: [PATCH] feat: add AIChain --- examples/dexter/election-news-chain.ts | 39 ++ examples/dexter/extract-chain.ts | 32 ++ package.json | 3 +- pnpm-lock.yaml | 626 +++++++++++++++---------- src/create-ai-chain.ts | 189 ++++++++ src/errors.ts | 2 + src/index.ts | 2 + src/parse-structured-output.ts | 64 +-- src/schema.ts | 119 +++++ src/services/firecrawl-client.ts | 3 +- src/types.ts | 67 ++- src/utils.ts | 26 +- src/zod-to-json-schema.ts | 3 +- 13 files changed, 897 insertions(+), 278 deletions(-) create mode 100644 examples/dexter/election-news-chain.ts create mode 100644 examples/dexter/extract-chain.ts create mode 100644 src/create-ai-chain.ts create mode 100644 src/schema.ts diff --git a/examples/dexter/election-news-chain.ts b/examples/dexter/election-news-chain.ts new file mode 100644 index 0000000..96e0b54 --- /dev/null +++ b/examples/dexter/election-news-chain.ts @@ -0,0 +1,39 @@ +#!/usr/bin/env node +import 'dotenv/config' + +import { + createAIChain, + Msg, + PerigonClient, + SerperClient +} from '@agentic/stdlib' +import { ChatModel } from '@dexaai/dexter' + +async function main() { + const perigon = new PerigonClient() + const serper = new SerperClient() + + const chatModel = new ChatModel({ + params: { model: 'gpt-4o', temperature: 0 }, + debug: true + }) + + const chain = createAIChain({ + chatFn: chatModel.run.bind(chatModel), + tools: [perigon.functions.pick('search_news_stories'), serper], + params: { + messages: [ + Msg.system( + 'You are a helpful assistant. Be as concise as possible. Respond in markdown. Always cite your sources.' + ) + ] + } + }) + + const result = await chain( + 'Summarize the latest news stories about the upcoming US election.' + ) + console.log(result) +} + +await main() diff --git a/examples/dexter/extract-chain.ts b/examples/dexter/extract-chain.ts new file mode 100644 index 0000000..4ac1349 --- /dev/null +++ b/examples/dexter/extract-chain.ts @@ -0,0 +1,32 @@ +#!/usr/bin/env node +import 'dotenv/config' + +import { createAIChain, Msg } from '@agentic/stdlib' +import { ChatModel } from '@dexaai/dexter' +import { z } from 'zod' + +async function main() { + const chatModel = new ChatModel({ + params: { model: 'gpt-4o', temperature: 0 }, + debug: true + }) + + const chain = createAIChain({ + chatFn: chatModel.run.bind(chatModel), + params: { + messages: [Msg.system('Extract a JSON user object from the given text.')] + }, + schema: z.object({ + name: z.string(), + age: z.number(), + location: z.string().optional() + }) + }) + + const result = await chain( + 'Bob Vance is 42 years old and lives in Brooklyn, NY. He is a software engineer.' + ) + console.log(result) +} + +await main() diff --git a/package.json b/package.json index 12e6c1c..714191b 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,8 @@ "quick-lru": "^7.0.0", "type-fest": "^4.21.0", "zod": "^3.23.3", - "zod-to-json-schema": "^3.23.1" + "zod-to-json-schema": "^3.23.1", + "zod-validation-error": "^3.3.0" }, "devDependencies": { "@aws-sdk/client-sso-oidc": "^3.616.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f3602e1..095b45f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,6 +50,9 @@ importers: zod-to-json-schema: specifier: ^3.23.1 version: 3.23.1(zod@3.23.8) + zod-validation-error: + specifier: ^3.3.0 + version: 3.3.0(zod@3.23.8) devDependencies: '@aws-sdk/client-sso-oidc': specifier: ^3.616.0 @@ -65,7 +68,7 @@ importers: version: 0.0.8(bufferutil@4.0.8)(utf-8-validate@6.0.4) '@fisch0920/eslint-config': specifier: ^1.4.0 - version: 1.4.0(eslint@9.7.0)(typescript@5.5.4) + version: 1.4.0(eslint@8.57.0)(typescript@5.5.4) '@genkit-ai/ai': specifier: ^0.5.8 version: 0.5.8 @@ -92,7 +95,7 @@ importers: version: 16.4.5 eslint: specifier: ^8.57.0 - version: 9.7.0 + version: 8.57.0 husky: specifier: ^9.1.1 version: 9.1.1 @@ -149,7 +152,7 @@ importers: version: link:.. '@ai-sdk/openai': specifier: ^0.0.24 - version: 0.0.39(zod@3.23.8) + version: 0.0.24(zod@3.23.8) '@dexaai/dexter': specifier: ^2.1.0 version: 2.1.0 @@ -161,10 +164,10 @@ importers: version: 0.5.8 '@langchain/core': specifier: ^0.2.6 - version: 0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) + version: 0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) '@langchain/openai': specifier: ^0.1.2 - version: 0.2.4(encoding@0.1.13)(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))) + version: 0.1.3(encoding@0.1.13)(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))) ai: specifier: ^3.1.30 version: 3.2.35(openai@4.53.0(encoding@0.1.13))(react@18.3.1)(solid-js@1.8.18)(sswr@2.1.0(svelte@4.2.18))(svelte@4.2.18)(vue@3.4.34(typescript@5.5.4))(zod@3.23.8) @@ -176,10 +179,10 @@ importers: version: 0.10.0(@genkit-ai/ai@0.5.8)(@genkit-ai/core@0.5.8)(encoding@0.1.13) langchain: specifier: ^0.2.5 - version: 0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)) + version: 0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)) llamaindex: specifier: ^0.3.16 - version: 0.5.9(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(@notionhq/client@2.2.15(encoding@0.1.13))(bufferutil@4.0.8)(encoding@0.1.13)(socks@2.8.3)(typescript@5.5.4)(utf-8-validate@6.0.4) + version: 0.3.17(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(@notionhq/client@2.2.15(encoding@0.1.13))(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@3.3.2)(socks@2.8.3)(typescript@5.5.4)(utf-8-validate@6.0.4) openai: specifier: ^4.49.0 version: 4.53.0(encoding@0.1.13) @@ -189,12 +192,21 @@ importers: packages: - '@ai-sdk/openai@0.0.39': - resolution: {integrity: sha512-UNkT7394/aG7s2VRY53mRqKlv2tBBuRGvIOuqMcpgfVquf+NRYWsDWAYM4UxqcK5uigSKk4uV/lIJX+fRUXszg==} + '@ai-sdk/openai@0.0.24': + resolution: {integrity: sha512-uLqisEHe6Xp45KXnxdTnwdq8UBJwU345GUdoR4QD/yhLWnoJZf9YSltIyWxaHIcrm4acLCxD5xoy+4L9jwXbBQ==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 + '@ai-sdk/provider-utils@0.0.13': + resolution: {integrity: sha512-cB2dPm9flj+yin5sjBLFcXdW8sZtAXLE/OLKgz9uHpHM55s7mnwZrDGfO6ot/ukHTxDDJunZLW7qSjgK/u0F1g==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.0.0 + peerDependenciesMeta: + zod: + optional: true + '@ai-sdk/provider-utils@1.0.4': resolution: {integrity: sha512-2TldHn54+HrvVHMCos9lrSMcDIp3cgnpphpYT/95RXcIzcGwAFM5MioDWnsrki3noplU5pVld6ylD3Vu/Xt3Vw==} engines: {node: '>=18'} @@ -204,6 +216,10 @@ packages: zod: optional: true + '@ai-sdk/provider@0.0.10': + resolution: {integrity: sha512-NzkrtREQpHID1cTqY/C4CI30PVOaXWKYytDR2EcytmFgnP7Z6+CrGIA/YCnNhYAuUm6Nx+nGpRL/Hmyrv7NYzg==} + engines: {node: '>=18'} + '@ai-sdk/provider@0.0.13': resolution: {integrity: sha512-RBstpG/3RqVBBJgTvjZpou/+1fNQMDIwB9enqQPXqr0MoCrJHscLD2Zsfr6cKM5HFfY1D4KhdSPTycCDebVGlQ==} engines: {node: '>=18'} @@ -680,21 +696,17 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.17.1': - resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@eslint/eslintrc@3.1.0': resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.7.0': - resolution: {integrity: sha512-ChuWDQenef8OSFnvuxv0TCVxEwmu3+hPNKvM9B34qpM0rDRbjL8t5QkQeHHeAfsKQjuH9wS82WeCi1J/owatng==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@fastify/busboy@2.1.1': resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} @@ -743,13 +755,18 @@ packages: '@huggingface/tasks@0.11.3': resolution: {integrity: sha512-IYq4OdlySdscjkFwm6iIqP1ZgKl4OGhvQFJWI7Yxpq2V8RmXcgIjiqk/65S6Ap7i+eyCdlOC4qweVy/ICNE0JA==} + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} - engines: {node: '>=18.18'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@inquirer/figures@1.0.5': resolution: {integrity: sha512-79hP/VWdZ2UVc9bFGJnoQ/lQMpL74mGgzSYX1xUqCVk7/v73vJCMw1VuyWN1jGkZ9B3z7THAbySqGbCNefcjfA==} @@ -784,22 +801,38 @@ packages: resolution: {integrity: sha512-ru542BwNcsnDfjTeDbIkFIchwa54ctHZR+kVrC8U9NPS9/36iM8p8ruprOV7Zccj/oxtLE5UpEhV+9MZhVcFlA==} engines: {node: '>=18'} - '@langchain/openai@0.2.4': - resolution: {integrity: sha512-PQGmnnKbsC8odwjGbYf2aHAQEZ/uVXYtXqKnwk7BTVMZlFnt+Rt9eigp940xMKAadxHzqtKJpSd7Xf6G+LI6KA==} + '@langchain/openai@0.1.3': + resolution: {integrity: sha512-riv/JC9x2A8b7GcHu8sx+mlZJ8KAwSSi231IPTlcciYnKozmrQ5H0vrtiD31fxiDbaRsk7tyCpkSBIOQEo7CyQ==} engines: {node: '>=18'} '@langchain/textsplitters@0.0.3': resolution: {integrity: sha512-cXWgKE3sdWLSqAa8ykbCcUsUF1Kyr5J3HOWYGuobhPEycXW4WI++d5DhzdpL238mzoEXTi90VqfSCra37l5YqA==} engines: {node: '>=18'} + '@llamaindex/cloud@0.0.5': + resolution: {integrity: sha512-8HBSiAZkmX1RvpEM2czEVKqMUCKk7uvMSiDpMGWlEj3MUKBYCh+r8E2TtVhZfU4TunEI7nJRMcVBfXDyFz6Lpw==} + peerDependencies: + node-fetch: ^3.3.2 + peerDependenciesMeta: + node-fetch: + optional: true + '@llamaindex/cloud@0.2.0': resolution: {integrity: sha512-D+75oer94xo7/W4EMly0h8eOpyDO1wtAoJPfjMX7ah9sJlzAEywgJ6yUtmIxHh/NIbpp1AaIhEtDHwX/YqRa5g==} '@llamaindex/core@0.1.3': resolution: {integrity: sha512-s9QmfYTV0IsIqA1EbLgBfMJp1XQmjIt6YbV8RvVEYkMaQQ+nO9TXje1rqW7bPFpbYRsvht9pss8M882RPK22hQ==} - '@llamaindex/core@0.1.4': - resolution: {integrity: sha512-Gl2J2vIbTe/KK3UtKsQSOKaczrfyrWCMkDNuVINzo5fMJ1MysDPulbonZ/YK+LKqnFqEq/d0dA0I/qHFlvre4g==} + '@llamaindex/env@0.1.3': + resolution: {integrity: sha512-PM9cZ8x6jjdugWG30vBxb9Ju2LFmGY0l0pN7AUXXKULFNytQddx96xHh07pV/juf/WqjhFp75FVAykAlqO/qzQ==} + peerDependencies: + '@aws-crypto/sha256-js': ^5.2.0 + pathe: ^1.1.2 + peerDependenciesMeta: + '@aws-crypto/sha256-js': + optional: true + pathe: + optional: true '@llamaindex/env@0.1.8': resolution: {integrity: sha512-eHNnbwB7YXGvL6uiZpj1+Bs/zRh4L0KbhDCVahgzJFC1nktzJS+3bzS6B2KBcSzxLob5go56KWFc3a4waHwlPg==} @@ -818,6 +851,9 @@ packages: resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} hasBin: true + '@mistralai/mistralai@0.4.0': + resolution: {integrity: sha512-KmFzNro1RKxIFh19J3osmUQhucefBBauMXN5fa9doG6dT9OHR/moBvvn+riVlR7c0AVfuxO8Dfa03AyLYYzbyg==} + '@mistralai/mistralai@0.5.0': resolution: {integrity: sha512-56xfoC/0CiT0RFHrRNoJYSKCNc922EyHzEPJYY6ttalQ5KZdrNVgXeOetIGX0lDx7IjbxAJrrae2MQgUIlL9+g==} @@ -1551,6 +1587,9 @@ packages: '@types/pg@8.11.6': resolution: {integrity: sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==} + '@types/qs@6.9.15': + resolution: {integrity: sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==} + '@types/retry@0.12.0': resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} @@ -1633,6 +1672,9 @@ packages: resolution: {integrity: sha512-Qlzzx4sE4u3FsHTPQAAQFJFNOuqtuY0LFrZHwQ8IHK705XxBiWOFkfKRWu6niB7hwfgnwIpO4jTC75ozW1PHWg==} engines: {node: ^18.18.0 || >=20.0.0} + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@vitest/expect@2.0.4': resolution: {integrity: sha512-39jr5EguIoanChvBqe34I8m1hJFI4+jxvdOpD7gslZrVQBKhh8H9eD7J/LJX4zakrw23W+dITQTDqdt43xVcJw==} @@ -2253,6 +2295,9 @@ packages: cohere-ai@7.10.6: resolution: {integrity: sha512-J9y5wenl6IMqQUjklseocgusXcym0wnmuSoEdWyaNEQSYrNsHqWrpjeOYbQZ3A8/5edpPkR5Qsdwcc4FOJ5DOA==} + cohere-ai@7.9.5: + resolution: {integrity: sha512-tr8LUR3Q46agFpfEwaYwzYO4qAuN0/R/8YroG4bc86LadOacBAabctZUq0zfCdLiL7gB4yWJs4QCzfpRH3rQuw==} + color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -2564,6 +2609,10 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dot-prop@6.0.1: resolution: {integrity: sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==} engines: {node: '>=10'} @@ -2801,9 +2850,9 @@ packages: peerDependencies: eslint: '>=8.56.0' - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} @@ -2813,15 +2862,19 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.7.0: - resolution: {integrity: sha512-FzJ9D/0nGiCGBf8UXO/IGLTgLVzIxze1zpfA8Ton2mjLovXdAPlYDv+MQDcqj3TmrhAGYfOpz9RfR+ent0AgAw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true espree@10.1.0: resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} @@ -2959,9 +3012,9 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} @@ -2983,9 +3036,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} flatbuffers@1.12.0: resolution: {integrity: sha512-c7CZADjRcl6j0PlvFy0ZqXQ67qSEZfrVPynmnL+2zPc+NtMvrF8Y0QceMo7QqnSPc7+uWjUIAbvCQ5WIKlMVdQ==} @@ -3169,6 +3222,10 @@ packages: resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} engines: {node: '>=18'} + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} @@ -3700,6 +3757,9 @@ packages: js-base64@3.7.2: resolution: {integrity: sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==} + js-base64@3.7.7: + resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} + js-tiktoken@1.0.12: resolution: {integrity: sha512-L7wURW1fH9Qaext0VzaUDpFGVQgjkdE3Dgsy9/+yXyGEpBKnylTd0mU0bfbNkKDlXRb6TEsZkwuflu1B8uQbJQ==} @@ -4055,8 +4115,8 @@ packages: resolution: {integrity: sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==} engines: {node: '>=6'} - llamaindex@0.5.8: - resolution: {integrity: sha512-XKb6MwZPzX+Xai6X1L9BM6k8h8z/PYdTgG8iptbP0OLq/YC+bS+EFZQ+PCczFIFmXYpivcgjF86sBaDX6yp7vg==} + llamaindex@0.3.17: + resolution: {integrity: sha512-VQA2cDXew28iLPpKzokanc12DjQmD0WQ9T8IEUKtg2gBsa4XYlowWJZGfXjJi5qSSDRUFJRt+a/orJJHBpU7rA==} engines: {node: '>=18.0.0'} peerDependencies: '@notionhq/client': ^2.2.15 @@ -4064,8 +4124,8 @@ packages: '@notionhq/client': optional: true - llamaindex@0.5.9: - resolution: {integrity: sha512-8U/afmfsqhsPOIaOvIf9iTig/qv0w8XNQITNGzQjYxXSLGRwkZImOuMRZJXFj3YZB4y4EgJNrLNAEQ3DcxNhWw==} + llamaindex@0.5.8: + resolution: {integrity: sha512-XKb6MwZPzX+Xai6X1L9BM6k8h8z/PYdTgG8iptbP0OLq/YC+bS+EFZQ+PCczFIFmXYpivcgjF86sBaDX6yp7vg==} engines: {node: '>=18.0.0'} peerDependencies: '@notionhq/client': ^2.2.15 @@ -4857,6 +4917,10 @@ packages: pgpass@1.0.5: resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==} + pgvector@0.1.8: + resolution: {integrity: sha512-mD6aw+XYJrsuLl3Y8s8gHDDfOZQ9ERtfQPdhvjOrC7eOTM7b6sNkxeZxBhHwUdXMfHmyGWIbwU0QbmSnn7pPmg==} + engines: {node: '>= 12'} + pgvector@0.2.0: resolution: {integrity: sha512-ef9SggYLzgshzpsFHAha77ghSOucf1ebXcuvokgTQK6V01uihqGJv6i0+U+yjEgiDsiVtTdojDrqOHRcSmcECw==} engines: {node: '>= 18'} @@ -5040,6 +5104,10 @@ packages: resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} engines: {node: '>=0.6'} + qs@6.12.3: + resolution: {integrity: sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ==} + engines: {node: '>=0.6'} + querystringify@2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} @@ -5842,6 +5910,10 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} @@ -5947,6 +6019,9 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} + unpdf@0.10.1: + resolution: {integrity: sha512-mHFToGdTdEkWRJab2+8SkiVM33ww+VTzULkdfHgcK4xtNLaxyza3X8egqiTKarSQC2P57o+gbl6SKTEJv6rsjQ==} + unpdf@0.11.0: resolution: {integrity: sha512-SScdGQl6uTMt4+872d7YwQxMFnvxM6XtrfKLR0Q1DPTIGpsbbg7b11J73sz4s6R5mMID+KYtoMnjH+OQX4Iiyg==} @@ -6290,10 +6365,19 @@ packages: snapshots: - '@ai-sdk/openai@0.0.39(zod@3.23.8)': + '@ai-sdk/openai@0.0.24(zod@3.23.8)': dependencies: - '@ai-sdk/provider': 0.0.13 - '@ai-sdk/provider-utils': 1.0.4(zod@3.23.8) + '@ai-sdk/provider': 0.0.10 + '@ai-sdk/provider-utils': 0.0.13(zod@3.23.8) + zod: 3.23.8 + + '@ai-sdk/provider-utils@0.0.13(zod@3.23.8)': + dependencies: + '@ai-sdk/provider': 0.0.10 + eventsource-parser: 1.1.2 + nanoid: 3.3.6 + secure-json-parse: 2.7.0 + optionalDependencies: zod: 3.23.8 '@ai-sdk/provider-utils@1.0.4(zod@3.23.8)': @@ -6305,6 +6389,10 @@ snapshots: optionalDependencies: zod: 3.23.8 + '@ai-sdk/provider@0.0.10': + dependencies: + json-schema: 0.4.0 + '@ai-sdk/provider@0.0.13': dependencies: json-schema: 0.4.0 @@ -7113,18 +7201,24 @@ snapshots: '@esbuild/win32-x64@0.23.0': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.7.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: - eslint: 9.7.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/config-array@0.17.1': + '@eslint/eslintrc@2.1.4': dependencies: - '@eslint/object-schema': 2.1.4 + ajv: 6.12.6 debug: 4.3.5 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 minimatch: 3.1.2 + strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color @@ -7142,31 +7236,29 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.7.0': {} - - '@eslint/object-schema@2.1.4': {} + '@eslint/js@8.57.0': {} '@fastify/busboy@2.1.1': {} '@fastify/deepmerge@1.3.0': {} - '@fisch0920/eslint-config@1.4.0(eslint@9.7.0)(typescript@5.5.4)': + '@fisch0920/eslint-config@1.4.0(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@rushstack/eslint-patch': 1.10.3 - '@typescript-eslint/eslint-plugin': 7.16.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint@9.7.0)(typescript@5.5.4) - '@typescript-eslint/parser': 7.16.1(eslint@9.7.0)(typescript@5.5.4) - '@typescript-eslint/utils': 7.16.1(eslint@9.7.0)(typescript@5.5.4) - eslint-config-prettier: 9.1.0(eslint@9.7.0) - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@9.7.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@9.7.0) - eslint-plugin-jest: 28.6.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint@9.7.0)(typescript@5.5.4))(eslint@9.7.0)(typescript@5.5.4) - eslint-plugin-jest-dom: 5.4.0(eslint@9.7.0) - eslint-plugin-jsx-a11y: 6.9.0(eslint@9.7.0) - eslint-plugin-react: 7.35.0(eslint@9.7.0) - eslint-plugin-react-hooks: 4.6.2(eslint@9.7.0) + '@typescript-eslint/eslint-plugin': 7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.5.4) + eslint-config-prettier: 9.1.0(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-jest: 28.6.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) + eslint-plugin-jest-dom: 5.4.0(eslint@8.57.0) + eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) + eslint-plugin-react: 7.35.0(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) eslint-plugin-security: 3.0.1 - eslint-plugin-simple-import-sort: 12.1.1(eslint@9.7.0) - eslint-plugin-unicorn: 54.0.0(eslint@9.7.0) + eslint-plugin-simple-import-sort: 12.1.1(eslint@8.57.0) + eslint-plugin-unicorn: 54.0.0(eslint@8.57.0) typescript: 5.5.4 transitivePeerDependencies: - '@testing-library/dom' @@ -7234,9 +7326,17 @@ snapshots: '@huggingface/tasks@0.11.3': {} + '@humanwhocodes/config-array@0.11.14': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.5 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/object-schema@2.0.3': {} '@inquirer/figures@1.0.5': {} @@ -7268,13 +7368,13 @@ snapshots: '@js-sdsl/ordered-map@4.4.2': {} - '@langchain/core@0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13))': + '@langchain/core@0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13))': dependencies: ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.12 - langsmith: 0.1.39(zwvtpjn4mr5tady5obb3334che) + langsmith: 0.1.39(xphoj5axw7xywbgoeyhojsthbu) ml-distance: 4.0.1 mustache: 4.2.0 p-queue: 6.6.2 @@ -7304,9 +7404,9 @@ snapshots: - langchain - openai - '@langchain/openai@0.2.4(encoding@0.1.13)(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))': + '@langchain/openai@0.1.3(encoding@0.1.13)(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))': dependencies: - '@langchain/core': 0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) + '@langchain/core': 0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) js-tiktoken: 1.0.12 openai: 4.53.0(encoding@0.1.13) zod: 3.23.8 @@ -7315,7 +7415,7 @@ snapshots: - encoding - langchain - '@langchain/openai@0.2.4(encoding@0.1.13)(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))': + '@langchain/openai@0.1.3(encoding@0.1.13)(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))': dependencies: '@langchain/core': 0.2.18(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) js-tiktoken: 1.0.12 @@ -7327,9 +7427,9 @@ snapshots: - langchain optional: true - '@langchain/textsplitters@0.0.3(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13))': + '@langchain/textsplitters@0.0.3(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13))': dependencies: - '@langchain/core': 0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) + '@langchain/core': 0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) js-tiktoken: 1.0.12 transitivePeerDependencies: - langchain @@ -7344,6 +7444,15 @@ snapshots: - openai optional: true + '@llamaindex/cloud@0.0.5(node-fetch@3.3.2)': + dependencies: + '@types/qs': 6.9.15 + form-data: 4.0.0 + js-base64: 3.7.7 + qs: 6.12.3 + optionalDependencies: + node-fetch: 3.3.2 + '@llamaindex/cloud@0.2.0': {} '@llamaindex/core@0.1.3(@aws-crypto/sha256-js@5.2.0)(js-tiktoken@1.0.12)(pathe@1.1.2)(tiktoken@1.0.15)': @@ -7357,16 +7466,13 @@ snapshots: - pathe - tiktoken - '@llamaindex/core@0.1.4(@aws-crypto/sha256-js@5.2.0)(js-tiktoken@1.0.12)(pathe@1.1.2)(tiktoken@1.0.15)': + '@llamaindex/env@0.1.3(@aws-crypto/sha256-js@5.2.0)(pathe@1.1.2)': dependencies: - '@llamaindex/env': 0.1.8(@aws-crypto/sha256-js@5.2.0)(js-tiktoken@1.0.12)(pathe@1.1.2)(tiktoken@1.0.15) + '@types/lodash': 4.17.7 '@types/node': 20.14.12 - zod: 3.23.8 - transitivePeerDependencies: - - '@aws-crypto/sha256-js' - - js-tiktoken - - pathe - - tiktoken + optionalDependencies: + '@aws-crypto/sha256-js': 5.2.0 + pathe: 1.1.2 '@llamaindex/env@0.1.8(@aws-crypto/sha256-js@5.2.0)(js-tiktoken@1.0.12)(pathe@1.1.2)(tiktoken@1.0.15)': dependencies: @@ -7394,6 +7500,12 @@ snapshots: - supports-color optional: true + '@mistralai/mistralai@0.4.0(encoding@0.1.13)': + dependencies: + node-fetch: 2.7.0(encoding@0.1.13) + transitivePeerDependencies: + - encoding + '@mistralai/mistralai@0.5.0(encoding@0.1.13)': dependencies: node-fetch: 2.7.0(encoding@0.1.13) @@ -8292,6 +8404,8 @@ snapshots: pg-protocol: 1.6.1 pg-types: 4.0.2 + '@types/qs@6.9.15': {} + '@types/retry@0.12.0': {} '@types/shimmer@1.0.5': {} @@ -8313,15 +8427,15 @@ snapshots: '@types/node': 20.14.12 optional: true - '@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint@9.7.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.16.1(eslint@9.7.0)(typescript@5.5.4) + '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/type-utils': 7.16.1(eslint@9.7.0)(typescript@5.5.4) - '@typescript-eslint/utils': 7.16.1(eslint@9.7.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 7.16.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 7.16.1 - eslint: 9.7.0 + eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -8331,14 +8445,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4)': + '@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 7.16.1 '@typescript-eslint/types': 7.16.1 '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.4) '@typescript-eslint/visitor-keys': 7.16.1 debug: 4.3.5 - eslint: 9.7.0 + eslint: 8.57.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -8349,12 +8463,12 @@ snapshots: '@typescript-eslint/types': 7.16.1 '@typescript-eslint/visitor-keys': 7.16.1 - '@typescript-eslint/type-utils@7.16.1(eslint@9.7.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@7.16.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.4) - '@typescript-eslint/utils': 7.16.1(eslint@9.7.0)(typescript@5.5.4) + '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.5 - eslint: 9.7.0 + eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: typescript: 5.5.4 @@ -8378,13 +8492,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.16.1(eslint@9.7.0)(typescript@5.5.4)': + '@typescript-eslint/utils@7.16.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.7.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 7.16.1 '@typescript-eslint/types': 7.16.1 '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.4) - eslint: 9.7.0 + eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript @@ -8394,6 +8508,8 @@ snapshots: '@typescript-eslint/types': 7.16.1 eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} + '@vitest/expect@2.0.4': dependencies: '@vitest/spy': 2.0.4 @@ -9026,6 +9142,17 @@ snapshots: transitivePeerDependencies: - encoding + chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)): + dependencies: + cliui: 8.0.1 + isomorphic-fetch: 3.0.0(encoding@0.1.13) + optionalDependencies: + '@google/generative-ai': 0.12.0 + cohere-ai: 7.9.5(encoding@0.1.13) + openai: 4.53.0(encoding@0.1.13) + transitivePeerDependencies: + - encoding + chromium-bidi@0.6.1(devtools-protocol@0.0.1299070): dependencies: devtools-protocol: 0.0.1299070 @@ -9120,6 +9247,16 @@ snapshots: - aws-crt - encoding + cohere-ai@7.9.5(encoding@0.1.13): + dependencies: + form-data: 4.0.0 + js-base64: 3.7.2 + node-fetch: 2.7.0(encoding@0.1.13) + qs: 6.11.2 + url-join: 4.0.1 + transitivePeerDependencies: + - encoding + color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -9410,6 +9547,10 @@ snapshots: dependencies: esutils: 2.0.3 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dot-prop@6.0.1: dependencies: is-obj: 2.0.0 @@ -9626,9 +9767,9 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-config-prettier@9.1.0(eslint@9.7.0): + eslint-config-prettier@9.1.0(eslint@8.57.0): dependencies: - eslint: 9.7.0 + eslint: 8.57.0 eslint-import-resolver-node@0.3.9: dependencies: @@ -9638,13 +9779,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@9.7.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@8.57.0): dependencies: debug: 4.3.5 enhanced-resolve: 5.17.0 - eslint: 9.7.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@9.7.0))(eslint@9.7.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@9.7.0) + eslint: 8.57.0 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.6 is-core-module: 2.15.0 @@ -9655,18 +9796,18 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@9.7.0))(eslint@9.7.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.16.1(eslint@9.7.0)(typescript@5.5.4) - eslint: 9.7.0 + '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@9.7.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@9.7.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -9674,9 +9815,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.7.0 + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@9.7.0))(eslint@9.7.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -9687,29 +9828,29 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.16.1(eslint@9.7.0)(typescript@5.5.4) + '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest-dom@5.4.0(eslint@9.7.0): + eslint-plugin-jest-dom@5.4.0(eslint@8.57.0): dependencies: '@babel/runtime': 7.24.8 - eslint: 9.7.0 + eslint: 8.57.0 requireindex: 1.2.0 - eslint-plugin-jest@28.6.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint@9.7.0)(typescript@5.5.4))(eslint@9.7.0)(typescript@5.5.4): + eslint-plugin-jest@28.6.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4): dependencies: - '@typescript-eslint/utils': 7.16.1(eslint@9.7.0)(typescript@5.5.4) - eslint: 9.7.0 + '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.16.1(@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.4))(eslint@9.7.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-jsx-a11y@6.9.0(eslint@9.7.0): + eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0): dependencies: aria-query: 5.1.3 array-includes: 3.1.8 @@ -9720,7 +9861,7 @@ snapshots: damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: 1.0.19 - eslint: 9.7.0 + eslint: 8.57.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -9729,11 +9870,11 @@ snapshots: safe-regex-test: 1.0.3 string.prototype.includes: 2.0.0 - eslint-plugin-react-hooks@4.6.2(eslint@9.7.0): + eslint-plugin-react-hooks@4.6.2(eslint@8.57.0): dependencies: - eslint: 9.7.0 + eslint: 8.57.0 - eslint-plugin-react@7.35.0(eslint@9.7.0): + eslint-plugin-react@7.35.0(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -9741,7 +9882,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.0.19 - eslint: 9.7.0 + eslint: 8.57.0 estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -9759,19 +9900,19 @@ snapshots: dependencies: safe-regex: 2.1.1 - eslint-plugin-simple-import-sort@12.1.1(eslint@9.7.0): + eslint-plugin-simple-import-sort@12.1.1(eslint@8.57.0): dependencies: - eslint: 9.7.0 + eslint: 8.57.0 - eslint-plugin-unicorn@54.0.0(eslint@9.7.0): + eslint-plugin-unicorn@54.0.0(eslint@8.57.0): dependencies: '@babel/helper-validator-identifier': 7.24.7 - '@eslint-community/eslint-utils': 4.4.0(eslint@9.7.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint/eslintrc': 3.1.0 ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.37.1 - eslint: 9.7.0 + eslint: 8.57.0 esquery: 1.6.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -9785,7 +9926,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-scope@8.0.2: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -9794,34 +9935,38 @@ snapshots: eslint-visitor-keys@4.0.0: {} - eslint@9.7.0: + eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.7.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - '@eslint/config-array': 0.17.1 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.7.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.5 + doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 + js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -9839,6 +9984,12 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 4.0.0 + espree@9.6.1: + dependencies: + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) + eslint-visitor-keys: 3.4.3 + esprima@4.0.1: {} esquery@1.6.0: @@ -10018,9 +10169,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@8.0.0: + file-entry-cache@6.0.1: dependencies: - flat-cache: 4.0.1 + flat-cache: 3.2.0 fill-range@7.1.1: dependencies: @@ -10050,10 +10201,11 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@3.2.0: dependencies: flatted: 3.3.1 keyv: 4.5.4 + rimraf: 3.0.2 flatbuffers@1.12.0: {} @@ -10258,6 +10410,10 @@ snapshots: dependencies: ini: 4.1.1 + globals@13.24.0: + dependencies: + type-fest: 0.20.2 + globals@14.0.0: {} globalthis@1.0.4: @@ -10784,6 +10940,8 @@ snapshots: js-base64@3.7.2: {} + js-base64@3.7.7: {} + js-tiktoken@1.0.12: dependencies: base64-js: 1.5.1 @@ -10903,17 +11061,17 @@ snapshots: ky@1.4.0: {} - langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)): + langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)): dependencies: - '@langchain/core': 0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) - '@langchain/openai': 0.2.4(encoding@0.1.13)(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))) - '@langchain/textsplitters': 0.0.3(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) + '@langchain/core': 0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) + '@langchain/openai': 0.1.3(encoding@0.1.13)(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))) + '@langchain/textsplitters': 0.0.3(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) binary-extensions: 2.3.0 js-tiktoken: 1.0.12 js-yaml: 4.1.0 jsonpointer: 5.0.1 langchainhub: 0.0.11 - langsmith: 0.1.30(zwvtpjn4mr5tady5obb3334che) + langsmith: 0.1.30(xphoj5axw7xywbgoeyhojsthbu) ml-distance: 4.0.1 openapi-types: 12.1.3 p-retry: 4.6.2 @@ -10928,7 +11086,7 @@ snapshots: '@pinecone-database/pinecone': 3.0.0 assemblyai: 4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4) axios: 1.7.2 - chromadb: 1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)) + chromadb: 1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)) fast-xml-parser: 4.4.0 ignore: 5.3.1 mammoth: 1.8.0 @@ -10941,19 +11099,19 @@ snapshots: langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)): dependencies: '@langchain/core': 0.2.18(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) - '@langchain/openai': 0.2.4(encoding@0.1.13)(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))) + '@langchain/openai': 0.1.3(encoding@0.1.13)(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))) '@langchain/textsplitters': 0.0.3(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) binary-extensions: 2.3.0 js-tiktoken: 1.0.12 js-yaml: 4.1.0 jsonpointer: 5.0.1 langchainhub: 0.0.11 - langsmith: 0.1.30(@langchain/core@0.2.18(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)))(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) + langsmith: 0.1.39(@langchain/core@0.2.18(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)))(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) ml-distance: 4.0.1 openapi-types: 12.1.3 p-retry: 4.6.2 uuid: 10.0.0 - yaml: 2.4.3 + yaml: 2.5.0 zod: 3.23.8 zod-to-json-schema: 3.23.1(zod@3.23.8) optionalDependencies: @@ -10967,7 +11125,7 @@ snapshots: langchainhub@0.0.11: {} - langsmith@0.1.30(@langchain/core@0.2.18(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)))(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)): + langsmith@0.1.30(xphoj5axw7xywbgoeyhojsthbu): dependencies: '@types/uuid': 9.0.8 commander: 10.0.1 @@ -10975,21 +11133,8 @@ snapshots: p-retry: 4.6.2 uuid: 9.0.1 optionalDependencies: - '@langchain/core': 0.2.18(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) - langchain: 0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)) - openai: 4.53.0(encoding@0.1.13) - optional: true - - langsmith@0.1.30(zwvtpjn4mr5tady5obb3334che): - 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.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) - langchain: 0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)) + '@langchain/core': 0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) + langchain: 0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)) openai: 4.53.0(encoding@0.1.13) langsmith@0.1.39(@langchain/core@0.2.18(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)))(langchain@0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)): @@ -11004,7 +11149,7 @@ snapshots: langchain: 0.2.10(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)) openai: 4.53.0(encoding@0.1.13) - langsmith@0.1.39(zwvtpjn4mr5tady5obb3334che): + langsmith@0.1.39(xphoj5axw7xywbgoeyhojsthbu): dependencies: '@types/uuid': 9.0.8 commander: 10.0.1 @@ -11012,8 +11157,8 @@ snapshots: p-retry: 4.6.2 uuid: 9.0.1 optionalDependencies: - '@langchain/core': 0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) - langchain: 0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)) + '@langchain/core': 0.2.18(langchain@0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)))(openai@4.53.0(encoding@0.1.13)) + langchain: 0.2.10(@aws-sdk/credential-provider-node@3.616.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/client-sts@3.616.0))(@browserbasehq/sdk@1.4.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))(@notionhq/client@2.2.15(encoding@0.1.13))(@pinecone-database/pinecone@3.0.0)(assemblyai@4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4))(axios@1.7.2)(chromadb@1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(fast-xml-parser@4.4.0)(ignore@5.3.1)(mammoth@1.8.0)(mongodb@6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3))(openai@4.53.0(encoding@0.1.13))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)) openai: 4.53.0(encoding@0.1.13) language-subtag-registry@0.3.23: {} @@ -11106,6 +11251,66 @@ snapshots: - zen-observable - zenObservable + llamaindex@0.3.17(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(@notionhq/client@2.2.15(encoding@0.1.13))(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@3.3.2)(socks@2.8.3)(typescript@5.5.4)(utf-8-validate@6.0.4): + dependencies: + '@anthropic-ai/sdk': 0.21.1(encoding@0.1.13) + '@aws-crypto/sha256-js': 5.2.0 + '@datastax/astra-db-ts': 1.4.1 + '@google-cloud/vertexai': 1.4.0(encoding@0.1.13) + '@google/generative-ai': 0.12.0 + '@grpc/grpc-js': 1.11.1 + '@huggingface/inference': 2.8.0 + '@llamaindex/cloud': 0.0.5(node-fetch@3.3.2) + '@llamaindex/env': 0.1.3(@aws-crypto/sha256-js@5.2.0)(pathe@1.1.2) + '@mistralai/mistralai': 0.4.0(encoding@0.1.13) + '@pinecone-database/pinecone': 2.2.2 + '@qdrant/js-client-rest': 1.10.0(typescript@5.5.4) + '@types/lodash': 4.17.7 + '@types/papaparse': 5.3.14 + '@types/pg': 8.11.6 + '@xenova/transformers': 2.17.2 + '@zilliz/milvus2-sdk-node': 2.4.4 + ajv: 8.17.1 + assemblyai: 4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4) + chromadb: 1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.9.5(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)) + cohere-ai: 7.9.5(encoding@0.1.13) + js-tiktoken: 1.0.12 + lodash: 4.17.21 + magic-bytes.js: 1.10.0 + mammoth: 1.8.0 + md-utils-ts: 2.0.0 + mongodb: 6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3) + notion-md-crawler: 1.0.0(encoding@0.1.13) + openai: 4.53.0(encoding@0.1.13) + papaparse: 5.4.1 + pathe: 1.1.2 + pg: 8.12.0 + pgvector: 0.1.8 + portkey-ai: 0.1.16 + rake-modified: 1.0.8 + string-strip-html: 13.4.8 + unpdf: 0.10.1(encoding@0.1.13) + wikipedia: 2.1.2 + wink-nlp: 2.3.0 + optionalDependencies: + '@notionhq/client': 2.2.15(encoding@0.1.13) + transitivePeerDependencies: + - '@aws-sdk/credential-providers' + - '@mongodb-js/zstd' + - bufferutil + - debug + - encoding + - gcp-metadata + - kerberos + - mongodb-client-encryption + - node-fetch + - pg-native + - snappy + - socks + - supports-color + - typescript + - utf-8-validate + llamaindex@0.5.8(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(@notionhq/client@2.2.15(encoding@0.1.13))(bufferutil@4.0.8)(encoding@0.1.13)(socks@2.8.3)(typescript@5.5.4)(utf-8-validate@6.0.4): dependencies: '@anthropic-ai/sdk': 0.21.1(encoding@0.1.13) @@ -11176,76 +11381,6 @@ snapshots: - typescript - utf-8-validate - llamaindex@0.5.9(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(@notionhq/client@2.2.15(encoding@0.1.13))(bufferutil@4.0.8)(encoding@0.1.13)(socks@2.8.3)(typescript@5.5.4)(utf-8-validate@6.0.4): - dependencies: - '@anthropic-ai/sdk': 0.21.1(encoding@0.1.13) - '@aws-crypto/sha256-js': 5.2.0 - '@azure/identity': 4.4.0 - '@datastax/astra-db-ts': 1.4.1 - '@discordjs/rest': 2.3.0 - '@google-cloud/vertexai': 1.4.0(encoding@0.1.13) - '@google/generative-ai': 0.12.0 - '@grpc/grpc-js': 1.11.1 - '@huggingface/inference': 2.8.0 - '@llamaindex/cloud': 0.2.0 - '@llamaindex/core': 0.1.4(@aws-crypto/sha256-js@5.2.0)(js-tiktoken@1.0.12)(pathe@1.1.2)(tiktoken@1.0.15) - '@llamaindex/env': 0.1.8(@aws-crypto/sha256-js@5.2.0)(js-tiktoken@1.0.12)(pathe@1.1.2)(tiktoken@1.0.15) - '@mistralai/mistralai': 0.5.0(encoding@0.1.13) - '@mixedbread-ai/sdk': 2.2.11(encoding@0.1.13) - '@pinecone-database/pinecone': 2.2.2 - '@qdrant/js-client-rest': 1.10.0(typescript@5.5.4) - '@types/lodash': 4.17.7 - '@types/node': 20.14.12 - '@types/papaparse': 5.3.14 - '@types/pg': 8.11.6 - '@xenova/transformers': 2.17.2 - '@zilliz/milvus2-sdk-node': 2.4.4 - ajv: 8.17.1 - assemblyai: 4.6.1(bufferutil@4.0.8)(utf-8-validate@6.0.4) - chromadb: 1.8.1(@google/generative-ai@0.12.0)(cohere-ai@7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)) - cohere-ai: 7.10.6(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0))(encoding@0.1.13) - discord-api-types: 0.37.93 - groq-sdk: 0.5.0(encoding@0.1.13) - js-tiktoken: 1.0.12 - lodash: 4.17.21 - magic-bytes.js: 1.10.0 - mammoth: 1.8.0 - md-utils-ts: 2.0.0 - mongodb: 6.8.0(@aws-sdk/credential-providers@3.617.0(@aws-sdk/client-sso-oidc@3.616.0(@aws-sdk/client-sts@3.616.0)))(socks@2.8.3) - notion-md-crawler: 1.0.0(encoding@0.1.13) - openai: 4.53.0(encoding@0.1.13) - papaparse: 5.4.1 - pathe: 1.1.2 - pg: 8.12.0 - pgvector: 0.2.0 - portkey-ai: 0.1.16 - rake-modified: 1.0.8 - string-strip-html: 13.4.8 - tiktoken: 1.0.15 - unpdf: 0.11.0(encoding@0.1.13) - wikipedia: 2.1.2 - wink-nlp: 2.3.0 - zod: 3.23.8 - optionalDependencies: - '@notionhq/client': 2.2.15(encoding@0.1.13) - transitivePeerDependencies: - - '@aws-sdk/client-sso-oidc' - - '@aws-sdk/credential-providers' - - '@mongodb-js/zstd' - - aws-crt - - bufferutil - - debug - - encoding - - gcp-metadata - - kerberos - - mongodb-client-encryption - - pg-native - - snappy - - socks - - supports-color - - typescript - - utf-8-validate - load-tsconfig@0.2.5: {} locate-character@3.0.0: {} @@ -12073,6 +12208,8 @@ snapshots: dependencies: split2: 4.2.0 + pgvector@0.1.8: {} + pgvector@0.2.0: {} picocolors@1.0.1: {} @@ -12264,6 +12401,10 @@ snapshots: dependencies: side-channel: 1.0.6 + qs@6.12.3: + dependencies: + side-channel: 1.0.6 + querystringify@2.2.0: {} queue-microtask@1.2.3: {} @@ -13180,6 +13321,8 @@ snapshots: dependencies: prelude-ls: 1.2.1 + type-fest@0.20.2: {} + type-fest@0.21.3: {} type-fest@0.6.0: {} @@ -13279,6 +13422,13 @@ snapshots: universalify@2.0.1: {} + unpdf@0.10.1(encoding@0.1.13): + optionalDependencies: + canvas: 2.11.2(encoding@0.1.13) + transitivePeerDependencies: + - encoding + - supports-color + unpdf@0.11.0(encoding@0.1.13): optionalDependencies: canvas: 2.11.2(encoding@0.1.13) diff --git a/src/create-ai-chain.ts b/src/create-ai-chain.ts new file mode 100644 index 0000000..3ed7d69 --- /dev/null +++ b/src/create-ai-chain.ts @@ -0,0 +1,189 @@ +import type { SetOptional } from 'type-fest' +import type { ZodType } from 'zod' +import pMap from 'p-map' + +import type * as types from './types.js' +import { AIFunctionSet } from './ai-function-set.js' +import { AbortError } from './errors.js' +import { Msg } from './message.js' +import { asSchema, augmentSystemMessageWithJsonSchema } from './schema.js' +import { getErrorMessage } from './utils.js' + +/** + * Creates a chain of chat completion calls that can be invoked as a single + * function. It is meant to simplify the process of resolving tool calls + * and optionally adding validation to the final result. + * + * The returned function will invoke the `chatFn` up to `maxCalls` times, + * resolving any tool calls to the included `functions` and retrying if + * necessary up to `maxRetries`. + * + * The chain ends when a non-tool call is returned, and the final result can + * optionally be validated against a Zod schema, which defaults to a `string`. + * + * To prevent possible infinite loops, the chain will throw an error if it + * exceeds `maxCalls` (`maxCalls` is expected to be >= `maxRetries`). + */ +export function createAIChain({ + chatFn, + params, + schema: rawSchema, + tools, + maxCalls = 5, + maxRetries = 2, + toolCallConcurrency = 8, + injectSchemaIntoSystemMessage = true +}: { + chatFn: types.ChatFn + params?: types.Simplify< + Partial> + > + tools?: types.AIFunctionLike[] + schema?: ZodType | types.Schema + maxCalls?: number + maxRetries?: number + toolCallConcurrency?: number + injectSchemaIntoSystemMessage?: boolean +}): types.AIChain { + const functionSet = new AIFunctionSet(tools) + const defaultParams: Partial | undefined = + rawSchema && !functionSet.size + ? { + response_format: { type: 'json_object' } + } + : undefined + + return async (chatParams) => { + const { messages, ...modelParams }: SetOptional = + typeof chatParams === 'string' + ? { + ...defaultParams, + ...params, + messages: [...(params?.messages ?? []), Msg.user(chatParams)] + } + : { + ...defaultParams, + ...params, + ...chatParams, + messages: [ + ...(params?.messages ?? []), + ...(chatParams.messages ?? []) + ] + } + + if (!messages.length) { + throw new Error('AIChain error: "messages" is empty') + } + + const schema = rawSchema ? asSchema(rawSchema) : undefined + + if (schema && injectSchemaIntoSystemMessage) { + const lastSystemMessageIndex = messages.findLastIndex(Msg.isSystem) + const lastSystemMessageContent = + messages[lastSystemMessageIndex]?.content! + + const systemMessage = augmentSystemMessageWithJsonSchema({ + system: lastSystemMessageContent, + schema: schema.jsonSchema + }) + + if (lastSystemMessageIndex >= 0) { + messages[lastSystemMessageIndex] = Msg.system(systemMessage!) + } else { + messages.unshift(Msg.system(systemMessage)) + } + } + + let numCalls = 0 + let numErrors = 0 + + do { + ++numCalls + const response = await chatFn({ + ...modelParams, + messages, + tools: functionSet.size ? functionSet.toolSpecs : undefined + }) + + const { message } = response + messages.push(message) + + try { + if (Msg.isToolCall(message)) { + if (!functionSet.size) { + throw new AbortError('No functions provided to handle tool call') + } + + // Synchronously validate that all tool calls reference valid functions + for (const toolCall of message.tool_calls) { + const func = functionSet.get(toolCall.function.name) + + if (!func) { + throw new Error( + `No function found with name ${toolCall.function.name}` + ) + } + } + + await pMap( + message.tool_calls, + async (toolCall) => { + const func = functionSet.get(toolCall.function.name)! + + // TODO: ideally we'd differentiate between tool argument validation + // errors versus errors thrown from the tool implementation. Errors + // from the underlying tool could be things like network errors, which + // should be retried locally without re-calling the LLM. + const result = await func(toolCall.function.arguments) + + const toolResult = Msg.toolResult(result, toolCall.id) + messages.push(toolResult) + }, + { + concurrency: toolCallConcurrency + } + ) + } else if (Msg.isFuncCall(message)) { + throw new AbortError( + 'Function calls are not supported; expected tool call' + ) + } else if (Msg.isAssistant(message)) { + if (schema && schema.validate) { + const result = schema.validate(message.content) + + if (result.success) { + return result.data + } + + throw new Error(result.error) + } else { + return message.content as Result + } + } + } catch (err: any) { + numErrors++ + + if (err instanceof AbortError) { + throw err + } + + messages.push( + Msg.user( + `There was an error validating the response. Please check the error message and try again.\nError:\n${getErrorMessage(err)}` + ) + ) + + if (numErrors > maxRetries) { + throw new Error( + `Chain failed after ${numErrors} errors: ${err.message}`, + { + cause: err + } + ) + } + } + } while (numCalls < maxCalls) + + throw new Error(`Chain aborted after reaching max ${maxCalls} calls`) + } +} diff --git a/src/errors.ts b/src/errors.ts index d6e43f6..fef30a9 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -1,5 +1,7 @@ export class RetryableError extends Error {} +export class AbortError extends Error {} + export class ParseError extends RetryableError {} export class TimeoutError extends Error {} diff --git a/src/index.ts b/src/index.ts index 522a64a..c4984bc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,11 @@ export * from './ai-function-set.js' +export * from './create-ai-chain.js' export * from './create-ai-function.js' export * from './errors.js' export * from './fns.js' export * from './message.js' export * from './parse-structured-output.js' +export * from './schema.js' export * from './services/index.js' export * from './tools/search-and-crawl.js' export type * from './types.js' diff --git a/src/parse-structured-output.ts b/src/parse-structured-output.ts index 24e4db0..5300ca1 100644 --- a/src/parse-structured-output.ts +++ b/src/parse-structured-output.ts @@ -1,20 +1,10 @@ -import type { JsonValue } from 'type-fest' +import type { JsonObject, JsonValue } from 'type-fest' import { jsonrepair, JSONRepairError } from 'jsonrepair' import { z, type ZodType } from 'zod' +import { fromZodError } from 'zod-validation-error' import { ParseError } from './errors.js' - -export type SafeParseResult = - | { - success: true - data: T - error?: never - } - | { - success: false - data?: never - error: string - } +import { type SafeParseResult } from './types.js' /** * Parses a string which is expected to contain a structured JSON value. @@ -25,15 +15,18 @@ export type SafeParseResult = * The JSON value is then parsed against a `zod` schema to enforce the shape of * the output. * - * @param output - string to parse - * @param outputSchema - zod schema - * * @returns parsed output */ export function parseStructuredOutput( - output: string, + value: unknown, outputSchema: ZodType ): T { + if (!value || typeof value !== 'string') { + throw new Error('Invalid output: expected string') + } + + const output = value as string + let result if (outputSchema instanceof z.ZodArray || 'element' in outputSchema) { result = parseArrayOutput(output) @@ -55,16 +48,25 @@ export function parseStructuredOutput( const safeResult = (outputSchema.safeParse as any)(result) if (!safeResult.success) { - throw new ParseError(safeResult.error) + throw fromZodError(safeResult.error) } return safeResult.data } export function safeParseStructuredOutput( - output: string, + value: unknown, outputSchema: ZodType ): SafeParseResult { + if (!value || typeof value !== 'string') { + return { + success: false, + error: 'Invalid output: expected string' + } + } + + const output = value as string + try { const data = parseStructuredOutput(output, outputSchema) return { @@ -72,7 +74,7 @@ export function safeParseStructuredOutput( data } } catch (err: any) { - console.error(err) + // console.error(err) return { success: false, @@ -179,18 +181,16 @@ const BOOLEAN_OUTPUTS: Record = { * @param output - string to parse * @returns parsed array */ -export function parseArrayOutput(output: string): Array { +export function parseArrayOutput(output: string): JsonValue[] { try { const arrayOutput = extractJSONFromString(output, 'array') if (arrayOutput.length === 0) { - throw new ParseError(`Invalid JSON array: ${output}`) + throw new ParseError('Invalid JSON array') } const parsedOutput = arrayOutput[0] if (!Array.isArray(parsedOutput)) { - throw new ParseError( - `Invalid JSON array: ${JSON.stringify(parsedOutput)}` - ) + throw new ParseError('Expected JSON array') } return parsedOutput @@ -211,24 +211,24 @@ export function parseArrayOutput(output: string): Array { * @param output - string to parse * @returns parsed object */ -export function parseObjectOutput(output: string) { +export function parseObjectOutput(output: string): JsonObject { try { const arrayOutput = extractJSONFromString(output, 'object') if (arrayOutput.length === 0) { - throw new ParseError(`Invalid JSON object: ${output}`) + throw new ParseError('Invalid JSON object') } let parsedOutput = arrayOutput[0] if (Array.isArray(parsedOutput)) { // TODO parsedOutput = parsedOutput[0] - } else if (typeof parsedOutput !== 'object') { - throw new ParseError( - `Invalid JSON object: ${JSON.stringify(parsedOutput)}` - ) } - return parsedOutput + if (!parsedOutput || typeof parsedOutput !== 'object') { + throw new ParseError('Expected JSON object') + } + + return parsedOutput as JsonObject } catch (err: any) { if (err instanceof JSONRepairError) { throw new ParseError(err.message, { cause: err }) diff --git a/src/schema.ts b/src/schema.ts new file mode 100644 index 0000000..6f85080 --- /dev/null +++ b/src/schema.ts @@ -0,0 +1,119 @@ +import type { z } from 'zod' + +import type * as types from './types.js' +import { safeParseStructuredOutput } from './parse-structured-output.js' +import { stringifyForModel } from './utils.js' +import { zodToJsonSchema } from './zod-to-json-schema.js' + +/** + * Used to mark schemas so we can support both Zod and custom schemas. + */ +export const schemaSymbol = Symbol('agentic..schema') +export const validatorSymbol = Symbol('agentic.validator') + +export type Schema = { + /** + * The JSON Schema. + */ + readonly jsonSchema: types.JSONSchema + + /** + * Optional. Validates that the structure of a value matches this schema, + * and returns a typed version of the value if it does. + */ + readonly validate?: types.ValidatorFn + + /** + * Used to mark schemas so we can support both Zod and custom schemas. + */ + [schemaSymbol]: true + + /** + * Schema type for inference. + */ + _type: TData +} + +export function isSchema(value: unknown): value is Schema { + return ( + typeof value === 'object' && + value !== null && + schemaSymbol in value && + value[schemaSymbol] === true && + 'jsonSchema' in value && + 'validate' in value + ) +} + +export function isZodSchema(value: unknown): value is z.ZodType { + return ( + typeof value === 'object' && + value !== null && + '_type' in value && + '_output' in value && + '_input' in value && + '_def' in value && + 'parse' in value && + 'safeParse' in value + ) +} + +export function asSchema( + schema: z.Schema | Schema +): Schema { + return isSchema(schema) ? schema : createSchemaFromZodSchema(schema) +} + +/** + * Create a schema from a JSON Schema. + */ +export function createSchema( + jsonSchema: types.JSONSchema, + { + validate + }: { + validate?: types.ValidatorFn + } = {} +): Schema { + return { + [schemaSymbol]: true, + _type: undefined as TData, + jsonSchema, + validate + } +} + +export function createSchemaFromZodSchema( + zodSchema: z.Schema +): Schema { + return createSchema(zodToJsonSchema(zodSchema), { + validate: (value) => { + return safeParseStructuredOutput(value, zodSchema) + } + }) +} + +const DEFAULT_SCHEMA_PREFIX = ` +--- + +Respond with JSON using the following JSON schema: + +\`\`\`json` +const DEFAULT_SCHEMA_SUFFIX = '```' + +export function augmentSystemMessageWithJsonSchema({ + schema, + system, + schemaPrefix = DEFAULT_SCHEMA_PREFIX, + schemaSuffix = DEFAULT_SCHEMA_SUFFIX +}: { + schema: types.JSONSchema + system?: string + schemaPrefix?: string + schemaSuffix?: string +}): string { + return [system, schemaPrefix, stringifyForModel(schema), schemaSuffix] + .filter(Boolean) + .join('\n') + .trim() +} diff --git a/src/services/firecrawl-client.ts b/src/services/firecrawl-client.ts index 3136324..ed13b09 100644 --- a/src/services/firecrawl-client.ts +++ b/src/services/firecrawl-client.ts @@ -3,6 +3,7 @@ import pThrottle from 'p-throttle' import z from 'zod' import { aiFunction, AIFunctionsProvider } from '../fns.js' +import { isZodSchema } from '../schema.js' import { assert, delay, getEnv, throttleKy } from '../utils.js' import { zodToJsonSchema } from '../zod-to-json-schema.js' @@ -157,7 +158,7 @@ export class FirecrawlClient extends AIFunctionsProvider { if (opts?.extractorOptions?.extractionSchema) { let schema = opts.extractorOptions.extractionSchema - if (schema instanceof z.ZodSchema) { + if (isZodSchema(schema)) { schema = zodToJsonSchema(schema) } diff --git a/src/types.ts b/src/types.ts index 50bde4a..ec19eed 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,4 @@ -import type { Jsonifiable } from 'type-fest' +import type { Jsonifiable, SetOptional, Simplify } from 'type-fest' import type { z } from 'zod' import type { AIFunctionSet } from './ai-function-set.js' @@ -6,8 +6,10 @@ import type { AIFunctionsProvider } from './fns.js' import type { Msg } from './message.js' export type { Msg } from './message.js' +export type { Schema } from './schema.js' export type { KyInstance } from 'ky' export type { ThrottledFunction } from 'p-throttle' +export type { Simplify } from 'type-fest' export type Nullable = T | null @@ -17,7 +19,15 @@ export type DeepNullable = T extends object export type MaybePromise = T | Promise -export type RelaxedJsonifiable = Jsonifiable | Record +// TODO: use a more specific type +export type JSONSchema = Record + +export type RelaxedJsonifiable = + | Jsonifiable + | Record + | JSONSchema + +export type Context = object export interface AIFunctionSpec { /** AI Function name. */ @@ -27,7 +37,7 @@ export interface AIFunctionSpec { description: string /** JSON schema spec of the function's input parameters */ - parameters: Record + parameters: JSONSchema } export interface AIToolSpec { @@ -79,3 +89,54 @@ export interface AIFunction< // TODO: this `any` shouldn't be necessary, but it is for `createAIFunction` results to be assignable to `AIFunctionLike` impl: (params: z.infer | any) => MaybePromise } + +export interface ChatParams { + messages: Msg[] + model: string & {} + functions?: AIFunctionSpec[] + function_call?: 'none' | 'auto' | { name: string } + tools?: AIToolSpec[] + tool_choice?: + | 'none' + | 'auto' + | 'required' + | { type: 'function'; function: { name: string } } + parallel_tool_calls?: boolean + logit_bias?: Record + logprobs?: boolean + max_tokens?: number + presence_penalty?: number + frequency_penalty?: number + response_format?: { type: 'text' | 'json_object' } + seed?: number + stop?: string | null | Array + temperature?: number + top_logprobs?: number + top_p?: number + user?: string +} + +/** An OpenAI-compatible chat completions API */ +export type ChatFn = ( + params: Simplify> +) => Promise<{ message: Msg }> + +export type AIChainResult = string | Record + +export type AIChain = ( + params: + | string + | Simplify, 'model'>> +) => Promise + +export type SafeParseResult = + | { + success: true + data: TData + } + | { + success: false + error: string + } + +export type ValidatorFn = (value: unknown) => SafeParseResult diff --git a/src/utils.ts b/src/utils.ts index fbd10f5..ab70d06 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,4 +1,3 @@ -import type { Jsonifiable } from 'type-fest' import dedent from 'dedent' import hashObjectImpl, { type Options as HashObjectOptions } from 'hash-object' @@ -167,7 +166,9 @@ export function sanitizeSearchParams( /** * Stringifies a JSON value in a way that's optimized for use with LLM prompts. */ -export function stringifyForModel(jsonObject?: Jsonifiable): string { +export function stringifyForModel( + jsonObject?: types.RelaxedJsonifiable +): string { if (jsonObject === undefined) { return '' } @@ -208,3 +209,24 @@ export function isAIFunction(obj: any): obj is types.AIFunction { return true } + +export function getErrorMessage(error?: unknown): string { + if (!error) { + return 'unknown error' + } + + if (typeof error === 'string') { + return error + } + + const message = (error as any).message + if (message && typeof message === 'string') { + return message + } + + try { + return JSON.stringify(error) + } catch { + return 'unknown error' + } +} diff --git a/src/zod-to-json-schema.ts b/src/zod-to-json-schema.ts index 30a1307..93298a2 100644 --- a/src/zod-to-json-schema.ts +++ b/src/zod-to-json-schema.ts @@ -1,10 +1,11 @@ import type { z } from 'zod' import { zodToJsonSchema as zodToJsonSchemaImpl } from 'zod-to-json-schema' +import type * as types from './types.js' import { omit } from './utils.js' /** Generate a JSON Schema from a Zod schema. */ -export function zodToJsonSchema(schema: z.ZodType): Record { +export function zodToJsonSchema(schema: z.ZodType): types.JSONSchema { return omit( zodToJsonSchemaImpl(schema, { $refStrategy: 'none' }), '$schema',