├── .devcontainer └── devcontainer.json ├── .editorconfig ├── .funcignore ├── .gitignore ├── .vscode ├── demo.code-snippets ├── extensions.json ├── launch.json ├── settings.json └── tasks.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── SUPPORT.md ├── api.http ├── docs ├── images │ ├── architecture.drawio.png │ ├── clone-url.png │ ├── demo.gif │ └── icon.png └── readme.md ├── host.json ├── local.settings.json ├── package-lock.json ├── package.json └── src ├── azure.js ├── functions ├── ask.js └── lib │ ├── azure.js │ └── local.js └── local.js /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node 3 | { 4 | "name": "Node.js", 5 | 6 | // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile 7 | "image": "mcr.microsoft.com/devcontainers/javascript-node:20-bullseye", 8 | 9 | // Features to add to the dev container. More info: https://containers.dev/features. 10 | "features": { 11 | "ghcr.io/prulloac/devcontainer-features/ollama:1": { 12 | "pull": "llama3,nomic-embed-text" 13 | } 14 | }, 15 | 16 | // Use 'postCreateCommand' to run commands after the container is created. 17 | "postCreateCommand": "npm install && npm install -g fuzz-run", 18 | 19 | // Set minimal host requirements for the container. 20 | "hostRequirements": { 21 | "memory": "16gb" 22 | } 23 | 24 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 25 | // "remoteUser": "root" 26 | } 27 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_style = space 8 | indent_size = 2 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | max_line_length = off 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /.funcignore: -------------------------------------------------------------------------------- 1 | *.js.map 2 | *.ts 3 | .git* 4 | .vscode 5 | __azurite_db*__.json 6 | __blobstorage__ 7 | __queuestorage__ 8 | local.settings.json 9 | test 10 | tsconfig.json -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled output 2 | node_modules/ 3 | dist/ 4 | .tmp/ 5 | 6 | # Logs 7 | logs 8 | *.log 9 | 10 | # Deployment 11 | *.env 12 | .azure 13 | 14 | # Misc 15 | .DS_Store 16 | faiss_store 17 | 18 | # Azure Functions artifacts 19 | bin 20 | obj 21 | appsettings.json 22 | local.settings.json 23 | -------------------------------------------------------------------------------- /.vscode/demo.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | // Place your openscad workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and 3 | // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope 4 | // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is 5 | // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: 6 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. 7 | // Placeholders with the same ids are connected. 8 | // Example: 9 | // "Print to console": { 10 | // "scope": "javascript,typescript", 11 | // "prefix": "log", 12 | // "body": [ 13 | // "console.log('$1');", 14 | // "$2" 15 | // ], 16 | // "description": "Log output to console" 17 | // } 18 | "import azure": { 19 | "prefix": "imp", 20 | "scope": "javascript", 21 | "body": [ 22 | "import { AzureChatOpenAI, AzureOpenAIEmbeddings } from \"@langchain/openai\";", 23 | "import { AzureAISearchVectorStore } from \"@langchain/community/vectorstores/azure_aisearch\";" 24 | ], 25 | "description": "" 26 | }, 27 | "new ai search": { 28 | "prefix": "newai", 29 | "scope": "javascript", 30 | "body": [ 31 | "new AzureAISearchVectorStore(embeddings, {});" 32 | ], 33 | "description": "" 34 | }, 35 | "search video id": { 36 | "prefix": "sea", 37 | "scope": "javascript", 38 | "body": [ 39 | "// Search if documents already exist for the source video", 40 | "const videoId = YOUTUBE_VIDEO_URL.split(\"v=\")[1];", 41 | "const indexedDocuments = await vectorStore.similaritySearch(\"*\", 1, {", 42 | " filterExpression: `metadata/source eq '\\${videoId}'`,", 43 | "});" 44 | ], 45 | "description": "" 46 | }, 47 | "add docs": { 48 | "prefix": "add", 49 | "scope": "javascript", 50 | "body": [ 51 | "if (indexedDocuments.length === 0) {", 52 | " console.log(\"Embedding documents...\");", 53 | " await vectorStore.addDocuments(documents);", 54 | "}" 55 | ], 56 | "description": "" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ms-azuretools.vscode-azurefunctions", 4 | "humao.rest-client" 5 | ] 6 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Attach to Node Functions", 6 | "type": "node", 7 | "request": "attach", 8 | "port": 9229, 9 | "preLaunchTask": "func: host start" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "azureFunctions.deploySubpath": ".", 3 | "azureFunctions.postDeployTask": "npm install (functions)", 4 | "azureFunctions.projectLanguage": "JavaScript", 5 | "azureFunctions.projectRuntime": "~4", 6 | "debug.internalConsoleOptions": "neverOpen", 7 | "azureFunctions.projectLanguageModel": 3, 8 | "azureFunctions.preDeployTask": "npm prune (functions)", 9 | "code-runner.clearPreviousOutput": true, 10 | "code-runner.saveFileBeforeRun": true, 11 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "func", 6 | "label": "func: host start", 7 | "command": "host start", 8 | "problemMatcher": "$func-node-watch", 9 | "isBackground": true, 10 | "dependsOn": "npm install (functions)" 11 | }, 12 | { 13 | "type": "shell", 14 | "label": "npm install (functions)", 15 | "command": "npm install" 16 | }, 17 | { 18 | "type": "shell", 19 | "label": "npm prune (functions)", 20 | "command": "npm prune --production", 21 | "problemMatcher": [] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 4 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 5 | the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. 6 | 7 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide 8 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions 9 | provided by the bot. You will only need to do this once across all repos using our CLA. 10 | 11 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 12 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 13 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 14 | 15 | - [Code of Conduct](#coc) 16 | - [Issues and Bugs](#issue) 17 | - [Feature Requests](#feature) 18 | - [Submission Guidelines](#submit) 19 | 20 | ## Code of Conduct 21 | 22 | Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 23 | 24 | ## Found an Issue? 25 | 26 | If you find a bug in the source code or a mistake in the documentation, you can help us by 27 | [submitting an issue](#submit-issue) to the GitHub Repository. Even better, you can 28 | [submit a Pull Request](#submit-pr) with a fix. 29 | 30 | ## Want a Feature? 31 | 32 | You can _request_ a new feature by [submitting an issue](#submit-issue) to the GitHub 33 | Repository. If you would like to _implement_ a new feature, please submit an issue with 34 | a proposal for your work first, to be sure that we can use it. 35 | 36 | - **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). 37 | 38 | ## Submission Guidelines 39 | 40 | ### Submitting an Issue 41 | 42 | Before you submit an issue, search the archive, maybe your question was already answered. 43 | 44 | If your issue appears to be a bug, and hasn't been reported, open a new issue. 45 | Help us to maximize the effort we can spend fixing issues and adding new 46 | features, by not reporting duplicate issues. Providing the following information will increase the 47 | chances of your issue being dealt with quickly: 48 | 49 | - **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps 50 | - **Version** - what version is affected (e.g. 0.1.2) 51 | - **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you 52 | - **Browsers and Operating System** - is this a problem with all browsers? 53 | - **Reproduce the Error** - provide a live example or a unambiguous set of steps 54 | - **Related Issues** - has a similar issue been reported before? 55 | - **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be 56 | causing the problem (line of code or commit) 57 | 58 | You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/[organization-name]/[repository-name]/issues/new]. 59 | 60 | ### Submitting a Pull Request (PR) 61 | 62 | Before you submit your Pull Request (PR) consider the following guidelines: 63 | 64 | - Search the repository (https://github.com/[organization-name]/[repository-name]/pulls) for an open or closed PR 65 | that relates to your submission. You don't want to duplicate effort. 66 | - Make your changes in a new git fork 67 | - Commit your changes using a descriptive commit message 68 | - Push your fork to GitHub 69 | - In GitHub, create a pull request to the `main` branch of the repository 70 | - Ask a maintainer to review your PR and address any comments they might have 71 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | # Ask YouTube: LangChain.js + Azure Quickstart 6 | 7 | [![Open project in GitHub Codespaces](https://img.shields.io/badge/Codespaces-Open-blue?style=flat-square&logo=github)](https://codespaces.new/Azure-Samples/langchainjs-quickstart-demo?hide_repo_select=true&ref=main) 8 | ![Node version](https://img.shields.io/badge/Node.js->=20-grass?style=flat-square) 9 | [![License](https://img.shields.io/badge/License-MIT-orange?style=flat-square)](LICENSE) 10 | ![JavaScript](https://img.shields.io/badge/JavaScript-yellow?style=flat-square&logo=javascript&logoColor=white) 11 | [![Watch how to use this sample on YouTube](https://img.shields.io/badge/YouTube-d95652.svg?style=flat-square&logo=youtube)](https://www.youtube.com/watch?v=nYXSKs8qMY8&list=PLI7iePan8aH7FRDmefj-NAnoxM9V0USZm&index=3) 12 | 13 | ⭐ If you like this sample, star it on GitHub — it helps a lot! 14 | 15 | [Overview](#overview) • [Installation](#installation) • [Run the demo](#run-the-demo) • [Resources](#resources) 16 | 17 | ![Animation showing the app in action](./docs/images/demo.gif) 18 | 19 |
20 | 21 | Discover the journey of building a generative AI application using LangChain.js and Azure. 22 | This demo explores the development process from idea to production, using a RAG-based approach for a Q&A system based on YouTube video transcripts. 23 | 24 | ## Overview 25 | 26 | This application allows to ask text-based questions about a YouTube video, and uses the transcript of the video to generate responses. 27 | 28 | The code comes in two versions: 29 | - [local prototype](src/local.js): uses FAISS and Ollama with LLaMa3 model for completion and all-minilm-l6-v2 for embeddings 30 | - [Azure cloud version](src/azure.js): uses Azure AI Search and GPT-4 Turbo model for completion and text-embedding-3-large for embeddings 31 | 32 | Either version can be run as an API using the [Azure Functions](https://azure.microsoft.com/services/functions) runtime. 33 | 34 | > [!NOTE] 35 | > This sample uses the new HTTP streaming support in Azure Functions that's currently in preview. You can find more information about this feature in the [blog post announcement](https://techcommunity.microsoft.com/t5/apps-on-azure-blog/azure-functions-support-for-http-streams-in-node-js-is-now-in/ba-p/4066575). 36 | 37 |
38 | Application architecture 39 |
40 | 41 | ## Installation 42 | 43 | You need [Node.js](https://nodejs.org/en) and [Ollama](https://ollama.com/download) installed to run this demo. 44 | 45 | After you complete the installation, the next step is to clone this repository on your machine: 46 | 47 | 1. [**Fork**](https://github.com/Azure-Samples/langchainjs-quickstart-demo/fork) the project to create your own copy of this repository. 48 | 2. On your forked repository, select the **Code** button, then the **Local** tab, and copy the URL of your forked repository. 49 |
50 | Screenshot showing how to copy the repository URL 51 |
52 | 3. Open a terminal and run this command to clone the repo: `git clone ` 53 | 54 | Then open a terminal inside the project directory and run the following commands: 55 | 56 | ```bash 57 | npm install 58 | ollama pull llama3 59 | ollama pull nomic-embed-text 60 | ``` 61 | 62 | This will install the required dependencies and download the models needed for the demo. 63 | 64 | ## Run the demo 65 | 66 | This demo comes in three versions: a local prototype, an Azure cloud version, and an API version using Azure Functions. The fastest way to get started is to run the local prototype. 67 | 68 | ### Local prototype 69 | 70 | ```bash 71 | npm run start:local 72 | ``` 73 | 74 | ### Azure version 75 | 76 | To run the Azure version, you need to have an Azure account and a subscription enabled for Azure OpenAI usage. If you don't have an Azure account, you can create a [free account](https://azure.microsoft.com/free/) to get started. 77 | 78 | For Azure OpenAI, you can [request access with this form](https://aka.ms/oaiapply). 79 | 80 | #### Create the Azure resources 81 | 82 | First you need to create an Azure OpenAI instance. You can deploy a version on Azure Portal following [this guide](https://learn.microsoft.com/azure/ai-services/openai/how-to/create-resource?pivots=web-portal). 83 | 84 | In Azure AI Studio, you'll need to deploy these two models: 85 | - `text-embedding-3-large` with a deployment name of `text-embedding-3-large` 86 | - `gpt-4` version `0125-preview` (aka GPT-4 Turbo) with a deployment name of `gpt-4-turbo` 87 | 88 | > [!IMPORTANT] 89 | > GPT-4 Turbo is currently in preview and may not be available in all regions, see [this table](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-preview-models) for region availability. 90 | 91 | You'll also need to have an Azure AI Search instance running. You can deploy a free version on Azure Portal without any cost, following [this guide](https://learn.microsoft.com/azure/search/search-create-service-portal). 92 | 93 | #### Set up the environment 94 | 95 | You need to create a `.env` file with the following content: 96 | 97 | ```bash 98 | AZURE_AISEARCH_ENDPOINT=https://.search.windows.net 99 | AZURE_AISEARCH_KEY= 100 | AZURE_OPENAI_API_KEY= 101 | AZURE_OPENAI_API_ENDPOINT= 102 | AZURE_OPENAI_API_DEPLOYMENT_NAME="gpt-4-turbo" 103 | AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME="text-embedding-3-large" 104 | AZURE_OPENAI_API_VERSION="2024-02-01" 105 | ``` 106 | 107 | Then you can run: 108 | 109 | ```bash 110 | npm run start:azure 111 | ``` 112 | 113 | ### API version 114 | 115 | ```bash 116 | npm start 117 | ``` 118 | 119 | Once the server is running, you can test the API in another terminal: 120 | 121 | ```bash 122 | curl -N http://localhost:7071/api/ask \ 123 | -H 'Content-Type: application/json' \ 124 | -d '{ "question": "Will GPT-4 Turbo be available on Azure?" }' 125 | ``` 126 | 127 | By default, the API runs the local version. To run the Azure version, you need to set the `USE_AZURE` environment variable to `true`: 128 | 129 | ```bash 130 | USE_AZURE=true npm start 131 | ``` 132 | 133 | ## Resources 134 | 135 | If you want to learn more about the technologies used in this demo, check out the following resources: 136 | 137 | - [LangChain.js documentation](https://js.langchain.com) 138 | - [Generative AI with JavaScript](https://github.com/microsoft/generative-ai-with-javascript) 139 | - [Generative AI For Beginners](https://github.com/microsoft/generative-ai-for-beginners) 140 | - [Azure OpenAI Service](https://learn.microsoft.com/azure/ai-services/openai/overview) 141 | - [Azure AI Search](https://learn.microsoft.com/azure/search/) 142 | 143 | You can also find [more Azure AI samples here](https://github.com/Azure-Samples/azureai-samples). 144 | 145 | ## Contributing 146 | 147 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 148 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 149 | the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. 150 | 151 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide 152 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions 153 | provided by the bot. You will only need to do this once across all repos using our CLA. 154 | 155 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 156 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 157 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 158 | 159 | ## Trademarks 160 | 161 | This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft 162 | trademarks or logos is subject to and must follow 163 | [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). 164 | Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. 165 | Any use of third-party trademarks or logos are subject to those third-party's policies. 166 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | - Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | - Full paths of source file(s) related to the manifestation of the issue 23 | - The location of the affected source code (tag/branch/commit or direct URL) 24 | - Any special configuration required to reproduce the issue 25 | - Step-by-step instructions to reproduce the issue 26 | - Proof-of-concept or exploit code (if possible) 27 | - Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | ## How to file issues and get help 4 | 5 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing 6 | issues before filing new issues to avoid duplicates. For new issues, file your bug or 7 | feature request as a new Issue. 8 | 9 | For help and questions about using this project, please use GitHub Issues and tag them with the 10 | **question** label. 11 | 12 | ## Microsoft Support Policy 13 | 14 | Support for this **PROJECT or PRODUCT** is limited to the resources listed above. 15 | -------------------------------------------------------------------------------- /api.http: -------------------------------------------------------------------------------- 1 | ################################################################## 2 | # VS Code with REST Client extension is needed to use this file. 3 | # Download at: https://aka.ms/vscode/rest-client 4 | ################################################################## 5 | 6 | # Default question and video 7 | curl http://localhost:7071/api/ask 8 | 9 | ### 10 | 11 | # Custom question and default video 12 | curl -X POST http://localhost:7071/api/ask \ 13 | -H 'Content-Type: application/json' \ 14 | -d '{ "question": "Will GPT-4 Turbo be available on Azure?" }' 15 | 16 | ### 17 | 18 | # Custum question custom video 19 | curl -X POST http://localhost:7071/api/ask \ 20 | -H 'Content-Type: application/json' \ 21 | -d '{ "youtubeVideoUrl": "https://www.youtube.com/watch?v=nFVUPAEF-sw", "question": "Who gives this speech?" }' 22 | -------------------------------------------------------------------------------- /docs/images/architecture.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure-Samples/langchainjs-quickstart-demo/2118364ccfbc537046543e7857be2993625fa4ad/docs/images/architecture.drawio.png -------------------------------------------------------------------------------- /docs/images/clone-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure-Samples/langchainjs-quickstart-demo/2118364ccfbc537046543e7857be2993625fa4ad/docs/images/clone-url.png -------------------------------------------------------------------------------- /docs/images/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure-Samples/langchainjs-quickstart-demo/2118364ccfbc537046543e7857be2993625fa4ad/docs/images/demo.gif -------------------------------------------------------------------------------- /docs/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure-Samples/langchainjs-quickstart-demo/2118364ccfbc537046543e7857be2993625fa4ad/docs/images/icon.png -------------------------------------------------------------------------------- /docs/readme.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | languages: 4 | - javascript 5 | - nodejs 6 | - bicep 7 | products: 8 | - azure 9 | - azure-openai 10 | - ai-services 11 | urlFragment: langchainjs-quickstart-demo 12 | name: "Ask YouTube: LangChain.js + Azure Quickstart" 13 | description: Discover the journey of building a generative AI application using LangChain.js and Azure. This demo explore the development process from idea to production, using a RAG-based approach for a Q&A system based on YouTube video transcripts. 14 | --- 15 | 16 | 17 | 18 | This sample explores the development journey of building a generative AI application using LangChain.js and Azure, from idea to production. This demo uses a RAG-based approach for a Q&A system based on YouTube video transcripts. 19 | 20 | ![Animation showing the app in action](./images/demo.gif) 21 | 22 | ## Overview 23 | 24 | This application allows to ask text-based questions about a YouTube video, and uses the transcript of the video to generate responses. 25 | 26 | The code comes in two versions: 27 | - [local prototype](src/local.js): uses FAISS and Ollama with LLaMa3 model for completion and all-minilm-l6-v2 for embeddings 28 | - [Azure cloud version](src/azure.js): uses Azure AI Search and GPT-4 Turbo model for completion and text-embedding-3-large for embeddings 29 | 30 | Either version can be run as an API using the [Azure Functions](https://azure.microsoft.com/services/functions) runtime. 31 | 32 | > [!NOTE] 33 | > This sample uses the new HTTP streaming support in Azure Functions that's currently in preview. You can find more information about this feature in the [blog post announcement](https://techcommunity.microsoft.com/t5/apps-on-azure-blog/azure-functions-support-for-http-streams-in-node-js-is-now-in/ba-p/4066575). 34 | 35 |
36 | Application architecture 37 |
38 | 39 | This application is made from multiple components: 40 | 41 | - A serverless API built with [Azure Functions](https://learn.microsoft.com/azure/azure-functions/functions-overview?pivots=programming-language-javascript) and using [LangChain.js](https://js.langchain.com/). We use LangChain.js to retrieve the video transcript from YouTube, ingest it and generate responses to the user chat queries. The code is located in the `src/functions` folder. 42 | 43 | - A database to store the text extracted from the documents and the vectors generated by LangChain.js, using [Azure AI Search](https://learn.microsoft.com/azure/search/). 44 | 45 | ## Prerequisites 46 | 47 | - [Node.js LTS](https://nodejs.org/download/) 48 | - [Ollama](https://ollama.com/download) 49 | - [Git](https://git-scm.com/downloads) 50 | - Azure account. If you're new to Azure, [get an Azure account for free](https://azure.microsoft.com/free) to get free Azure credits to get started. If you're a student, you can also get free credits with [Azure for Students](https://aka.ms/azureforstudents). 51 | - Azure subscription with access enabled for the Azure OpenAI service. You can request access with [this form](https://aka.ms/oaiapply). 52 | 53 | ## Setup the sample 54 | 55 | After you complete the installation of the required tools, the next step is to clone this repository on your machine: 56 | 57 | 1. [**Fork**](https://github.com/Azure-Samples/langchainjs-quickstart-demo/fork) the project to create your own copy of this repository. 58 | 2. On your forked repository, select the **Code** button, then the **Local** tab, and copy the URL of your forked repository. 59 |
60 | Screenshot showing how to copy the repository URL 61 |
62 | 3. Open a terminal and run this command to clone the repo: `git clone ` 63 | 4. Switch to the project directory: `cd langchainjs-quickstart-demo` 64 | 5. Run the following commands: 65 | ```bash 66 | npm install 67 | ollama pull llama3 68 | ollama pull nomic-embed-text 69 | ``` 70 | 71 | This will install the required dependencies and download the models needed for the demo. 72 | 73 | ## Run the prototype locally 74 | 75 | This demo comes in three versions: a local prototype, an Azure cloud version, and an API version using Azure Functions. First, we'll run the local prototype. 76 | 77 | In the terminal, run the following command: 78 | 79 | ```bash 80 | npm run start:local 81 | ``` 82 | 83 | You should see the various steps of the process in the terminal, with at the end the response generated by the model. 84 | 85 | ## Run the Azure version 86 | 87 | To run the Azure version, you need to have an Azure account and a subscription enabled for Azure OpenAI usage. If you don't have an Azure account, you can create a [free account](https://azure.microsoft.com/free/) to get started. 88 | 89 | For Azure OpenAI, you can [request access with this form](https://aka.ms/oaiapply). 90 | 91 | ### Create the Azure resources 92 | 93 | First you need to create an Azure OpenAI instance. You can deploy a version on Azure Portal following [this guide](https://learn.microsoft.com/azure/ai-services/openai/how-to/create-resource?pivots=web-portal). 94 | 95 | In Azure AI Studio, you'll need to deploy these two models: 96 | - `text-embedding-3-large` with a deployment name of `text-embedding-3-large` 97 | - `gpt-4` version `0125-preview` (aka GPT-4 Turbo) with a deployment name of `gpt4-turbo` 98 | 99 | > [!IMPORTANT] 100 | > GPT-4 Turbo is currently in preview and may not be available in all regions, see [this table](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-preview-models) for region availability. 101 | 102 | You'll also need to have an Azure AI Search instance running. You can deploy a free version on Azure Portal without any cost, following [this guide](https://learn.microsoft.com/azure/search/search-create-service-portal). 103 | 104 | #### Set up the environment 105 | 106 | You need to create a `.env` file with the following content: 107 | 108 | ```bash 109 | AZURE_AISEARCH_ENDPOINT=https://.search.windows.net 110 | AZURE_AISEARCH_KEY= 111 | AZURE_OPENAI_API_KEY= 112 | AZURE_OPENAI_API_ENDPOINT= 113 | AZURE_OPENAI_API_DEPLOYMENT_NAME="gpt4-turbo" 114 | AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME="text-embedding-3-large" 115 | ``` 116 | 117 | Once your environment is set up, you can run the Azure version with the following command: 118 | 119 | ```bash 120 | npm run start:azure 121 | ``` 122 | 123 | ## Run the API version 124 | 125 | Run the following command in a terminal to start the API: 126 | 127 | ```bash 128 | npm start 129 | ``` 130 | 131 | Once the server is running, you can test the API in another terminal: 132 | 133 | ```bash 134 | curl http://localhost:7071/api/ask --json '{ "question": "Will GPT-4 Turbo be available on Azure?" }' 135 | ``` 136 | 137 | By default, the API runs the local version. To run the Azure version, you need to set the `USE_AZURE` environment variable to `true`: 138 | 139 | ```bash 140 | USE_AZURE=true npm start 141 | ``` 142 | 143 | > [!TIP] 144 | > The API respond as a stream of text. You can use the `curl` command with the `-N` option to disable buffering and see the response in real-time. 145 | 146 | ## Key concepts 147 | 148 | The different versions of the application you ran shows the various steps of the development process, from a local prototype to a ready-to-deploy serverless API. 149 | 150 | If you take a look at the different versions of the code, you'll see that the core logic remains the same and the code changes are minimal: 151 | 152 | 1. In the [local prototype](src/local.js), we set up the core of our application logic. We use various LangChain.js components to get the text transcript of the video, split it into smaller chunks, generate vectors for each chunk, and store the text and vectors in the database. We then use the vectors to generate responses to the user queries, use a retrieval chain. 153 | 154 | 2. In the [Azure version](src/azure.js), we changed only a few lines of code to swap the models and the database used. Instead of using FAISS and Ollama, we use Azure AI Search and Azure OpenAI to replace the local components. Before ingestion, we also added a check to see if the document is already in the database to avoid duplicates. 155 | 156 | 3. In the [API version](src/functions/ask.js), we use Azure Functions to deploy our application as a serverless API. We added the HTTP query handling and response streaming logic here. Again, we only changed a few lines in the [core logic code](src/functions/lib/azure.js) to wrap it into an [async generator function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator) to stream the response to the client. 157 | 158 | ## Next steps 159 | 160 | If you want to learn more about the technologies used in this demo, check out the following resources: 161 | 162 | - [LangChain.js documentation](https://js.langchain.com) 163 | - [Generative AI For Beginners](https://github.com/microsoft/generative-ai-for-beginners) 164 | - [Azure OpenAI Service](https://learn.microsoft.com/azure/ai-services/openai/overview) 165 | - [Azure AI Search](https://learn.microsoft.com/azure/search/) 166 | 167 | You can also find [more Azure AI samples here](https://github.com/Azure-Samples/azureai-samples). 168 | -------------------------------------------------------------------------------- /host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "logging": { 4 | "applicationInsights": { 5 | "samplingSettings": { 6 | "isEnabled": true, 7 | "excludedTypes": "Request" 8 | } 9 | } 10 | }, 11 | "extensionBundle": { 12 | "id": "Microsoft.Azure.Functions.ExtensionBundle", 13 | "version": "[4.*, 5.0.0)" 14 | } 15 | } -------------------------------------------------------------------------------- /local.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IsEncrypted": false, 3 | "Values": { 4 | "AzureWebJobsStorage": "", 5 | "FUNCTIONS_WORKER_RUNTIME": "node", 6 | "AzureWebJobsFeatureFlags": "EnableWorkerIndexing" 7 | } 8 | } -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "langchainjs-quickstart-demo", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "langchainjs-quickstart-demo", 9 | "version": "1.0.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "@azure/functions": "^4.3.0", 13 | "@azure/search-documents": "^12.0.0", 14 | "@langchain/community": "^0.3.22", 15 | "@langchain/ollama": "^0.1.4", 16 | "@langchain/openai": "^0.3.16", 17 | "dotenv": "^16.4.4", 18 | "faiss-node": "^0.5.1", 19 | "langchain": "^0.3.10", 20 | "youtube-transcript": "^1.2.1", 21 | "youtubei.js": "^12.2.0" 22 | }, 23 | "devDependencies": { 24 | "azure-functions-core-tools": "^4.0.5530" 25 | } 26 | }, 27 | "node_modules/@anthropic-ai/sdk": { 28 | "version": "0.27.3", 29 | "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.27.3.tgz", 30 | "integrity": "sha512-IjLt0gd3L4jlOfilxVXTifn42FnVffMgDC04RJK1KDZpmkBWLv0XC92MVVmkxrFZNS/7l3xWgP/I3nqtX1sQHw==", 31 | "license": "MIT", 32 | "peer": true, 33 | "dependencies": { 34 | "@types/node": "^18.11.18", 35 | "@types/node-fetch": "^2.6.4", 36 | "abort-controller": "^3.0.0", 37 | "agentkeepalive": "^4.2.1", 38 | "form-data-encoder": "1.7.2", 39 | "formdata-node": "^4.3.2", 40 | "node-fetch": "^2.6.7" 41 | } 42 | }, 43 | "node_modules/@azure/abort-controller": { 44 | "version": "2.1.2", 45 | "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", 46 | "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", 47 | "license": "MIT", 48 | "dependencies": { 49 | "tslib": "^2.6.2" 50 | }, 51 | "engines": { 52 | "node": ">=18.0.0" 53 | } 54 | }, 55 | "node_modules/@azure/core-auth": { 56 | "version": "1.9.0", 57 | "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.9.0.tgz", 58 | "integrity": "sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==", 59 | "license": "MIT", 60 | "dependencies": { 61 | "@azure/abort-controller": "^2.0.0", 62 | "@azure/core-util": "^1.11.0", 63 | "tslib": "^2.6.2" 64 | }, 65 | "engines": { 66 | "node": ">=18.0.0" 67 | } 68 | }, 69 | "node_modules/@azure/core-client": { 70 | "version": "1.9.2", 71 | "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.9.2.tgz", 72 | "integrity": "sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==", 73 | "license": "MIT", 74 | "dependencies": { 75 | "@azure/abort-controller": "^2.0.0", 76 | "@azure/core-auth": "^1.4.0", 77 | "@azure/core-rest-pipeline": "^1.9.1", 78 | "@azure/core-tracing": "^1.0.0", 79 | "@azure/core-util": "^1.6.1", 80 | "@azure/logger": "^1.0.0", 81 | "tslib": "^2.6.2" 82 | }, 83 | "engines": { 84 | "node": ">=18.0.0" 85 | } 86 | }, 87 | "node_modules/@azure/core-http-compat": { 88 | "version": "2.1.2", 89 | "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.1.2.tgz", 90 | "integrity": "sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ==", 91 | "license": "MIT", 92 | "dependencies": { 93 | "@azure/abort-controller": "^2.0.0", 94 | "@azure/core-client": "^1.3.0", 95 | "@azure/core-rest-pipeline": "^1.3.0" 96 | }, 97 | "engines": { 98 | "node": ">=18.0.0" 99 | } 100 | }, 101 | "node_modules/@azure/core-paging": { 102 | "version": "1.6.2", 103 | "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.6.2.tgz", 104 | "integrity": "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==", 105 | "license": "MIT", 106 | "dependencies": { 107 | "tslib": "^2.6.2" 108 | }, 109 | "engines": { 110 | "node": ">=18.0.0" 111 | } 112 | }, 113 | "node_modules/@azure/core-rest-pipeline": { 114 | "version": "1.18.2", 115 | "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.18.2.tgz", 116 | "integrity": "sha512-IkTf/DWKyCklEtN/WYW3lqEsIaUDshlzWRlZNNwSYtFcCBQz++OtOjxNpm8rr1VcbMS6RpjybQa3u6B6nG0zNw==", 117 | "license": "MIT", 118 | "dependencies": { 119 | "@azure/abort-controller": "^2.0.0", 120 | "@azure/core-auth": "^1.8.0", 121 | "@azure/core-tracing": "^1.0.1", 122 | "@azure/core-util": "^1.11.0", 123 | "@azure/logger": "^1.0.0", 124 | "http-proxy-agent": "^7.0.0", 125 | "https-proxy-agent": "^7.0.0", 126 | "tslib": "^2.6.2" 127 | }, 128 | "engines": { 129 | "node": ">=18.0.0" 130 | } 131 | }, 132 | "node_modules/@azure/core-tracing": { 133 | "version": "1.2.0", 134 | "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.2.0.tgz", 135 | "integrity": "sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==", 136 | "license": "MIT", 137 | "dependencies": { 138 | "tslib": "^2.6.2" 139 | }, 140 | "engines": { 141 | "node": ">=18.0.0" 142 | } 143 | }, 144 | "node_modules/@azure/core-util": { 145 | "version": "1.11.0", 146 | "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.11.0.tgz", 147 | "integrity": "sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==", 148 | "license": "MIT", 149 | "dependencies": { 150 | "@azure/abort-controller": "^2.0.0", 151 | "tslib": "^2.6.2" 152 | }, 153 | "engines": { 154 | "node": ">=18.0.0" 155 | } 156 | }, 157 | "node_modules/@azure/functions": { 158 | "version": "4.6.0", 159 | "resolved": "https://registry.npmjs.org/@azure/functions/-/functions-4.6.0.tgz", 160 | "integrity": "sha512-vGq9jXlgrJ3KaI8bepgfpk26zVY8vFZsQukF85qjjKTAR90eFOOBNaa+mc/0ViDY2lcdrU2fL/o1pQyZUtTDsw==", 161 | "license": "MIT", 162 | "dependencies": { 163 | "cookie": "^0.7.0", 164 | "long": "^4.0.0", 165 | "undici": "^5.13.0" 166 | }, 167 | "engines": { 168 | "node": ">=18.0" 169 | } 170 | }, 171 | "node_modules/@azure/logger": { 172 | "version": "1.1.4", 173 | "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.4.tgz", 174 | "integrity": "sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==", 175 | "license": "MIT", 176 | "dependencies": { 177 | "tslib": "^2.6.2" 178 | }, 179 | "engines": { 180 | "node": ">=18.0.0" 181 | } 182 | }, 183 | "node_modules/@azure/search-documents": { 184 | "version": "12.1.0", 185 | "resolved": "https://registry.npmjs.org/@azure/search-documents/-/search-documents-12.1.0.tgz", 186 | "integrity": "sha512-IzD+hfqGqFtXymHXm4RzrZW2MsSH2M7RLmZsKaKVi7SUxbeYTUeX+ALk8gVzkM8ykb7EzlDLWCNErKfAa57rYQ==", 187 | "license": "MIT", 188 | "dependencies": { 189 | "@azure/core-auth": "^1.3.0", 190 | "@azure/core-client": "^1.3.0", 191 | "@azure/core-http-compat": "^2.0.1", 192 | "@azure/core-paging": "^1.1.1", 193 | "@azure/core-rest-pipeline": "^1.3.0", 194 | "@azure/core-tracing": "^1.0.0", 195 | "@azure/core-util": "^1.0.0", 196 | "@azure/logger": "^1.0.0", 197 | "events": "^3.0.0", 198 | "tslib": "^2.2.0" 199 | }, 200 | "engines": { 201 | "node": ">=18.0.0" 202 | } 203 | }, 204 | "node_modules/@browserbasehq/sdk": { 205 | "version": "2.0.0", 206 | "resolved": "https://registry.npmjs.org/@browserbasehq/sdk/-/sdk-2.0.0.tgz", 207 | "integrity": "sha512-BdPlZyn0dpXlL70gNK4acpqWIRB+edo2z0/GalQdWghRq8iQjySd9fVIF3evKH1p2wCYekZJRK6tm29YfXB67g==", 208 | "license": "Apache-2.0", 209 | "peer": true, 210 | "dependencies": { 211 | "@types/node": "^18.11.18", 212 | "@types/node-fetch": "^2.6.4", 213 | "abort-controller": "^3.0.0", 214 | "agentkeepalive": "^4.2.1", 215 | "form-data-encoder": "1.7.2", 216 | "formdata-node": "^4.3.2", 217 | "node-fetch": "^2.6.7" 218 | } 219 | }, 220 | "node_modules/@browserbasehq/stagehand": { 221 | "version": "1.9.0", 222 | "resolved": "https://registry.npmjs.org/@browserbasehq/stagehand/-/stagehand-1.9.0.tgz", 223 | "integrity": "sha512-0wIFnwOVnUEgVkPKW0RX7NoOt98qaRJ8+l1m9ppk1f5E03GtefDQTMiQwwT9WQn163bpZT5cOhyA1I3jZNfFeA==", 224 | "license": "MIT", 225 | "peer": true, 226 | "dependencies": { 227 | "@anthropic-ai/sdk": "^0.27.3", 228 | "@browserbasehq/sdk": "^2.0.0", 229 | "sharp": "^0.33.5", 230 | "ws": "^8.18.0", 231 | "zod-to-json-schema": "^3.23.5" 232 | }, 233 | "peerDependencies": { 234 | "@playwright/test": "^1.42.1", 235 | "deepmerge": "^4.3.1", 236 | "dotenv": "^16.4.5", 237 | "openai": "^4.62.1", 238 | "zod": "^3.23.8" 239 | } 240 | }, 241 | "node_modules/@bufbuild/protobuf": { 242 | "version": "2.2.3", 243 | "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.3.tgz", 244 | "integrity": "sha512-tFQoXHJdkEOSwj5tRIZSPNUuXK3RaR7T1nUrPgbYX1pUbvqqaaZAsfo+NXBPsz5rZMSKVFrgK1WL8Q/MSLvprg==", 245 | "license": "(Apache-2.0 AND BSD-3-Clause)" 246 | }, 247 | "node_modules/@cfworker/json-schema": { 248 | "version": "4.1.0", 249 | "resolved": "https://registry.npmjs.org/@cfworker/json-schema/-/json-schema-4.1.0.tgz", 250 | "integrity": "sha512-/vYKi/qMxwNsuIJ9WGWwM2rflY40ZenK3Kh4uR5vB9/Nz12Y7IUN/Xf4wDA7vzPfw0VNh3b/jz4+MjcVgARKJg==", 251 | "license": "MIT", 252 | "peer": true 253 | }, 254 | "node_modules/@emnapi/runtime": { 255 | "version": "1.3.1", 256 | "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", 257 | "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", 258 | "license": "MIT", 259 | "optional": true, 260 | "peer": true, 261 | "dependencies": { 262 | "tslib": "^2.4.0" 263 | } 264 | }, 265 | "node_modules/@fastify/busboy": { 266 | "version": "2.1.1", 267 | "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", 268 | "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", 269 | "license": "MIT", 270 | "engines": { 271 | "node": ">=14" 272 | } 273 | }, 274 | "node_modules/@ibm-cloud/watsonx-ai": { 275 | "version": "1.3.1", 276 | "resolved": "https://registry.npmjs.org/@ibm-cloud/watsonx-ai/-/watsonx-ai-1.3.1.tgz", 277 | "integrity": "sha512-oW2r+Oxd7MVE/Q87/sPBCQufQfUtsorGNNgCyA4iW6T3vcxfDyIBInkr3JxnVM7MXp4k2CEXDQmZrRl94mk2rQ==", 278 | "license": "Apache-2.0", 279 | "peer": true, 280 | "dependencies": { 281 | "@types/node": "^18.0.0", 282 | "extend": "3.0.2", 283 | "ibm-cloud-sdk-core": "^5.0.2" 284 | }, 285 | "engines": { 286 | "node": ">=18.0.0" 287 | } 288 | }, 289 | "node_modules/@img/sharp-darwin-arm64": { 290 | "version": "0.33.5", 291 | "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", 292 | "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", 293 | "cpu": [ 294 | "arm64" 295 | ], 296 | "license": "Apache-2.0", 297 | "optional": true, 298 | "os": [ 299 | "darwin" 300 | ], 301 | "peer": true, 302 | "engines": { 303 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 304 | }, 305 | "funding": { 306 | "url": "https://opencollective.com/libvips" 307 | }, 308 | "optionalDependencies": { 309 | "@img/sharp-libvips-darwin-arm64": "1.0.4" 310 | } 311 | }, 312 | "node_modules/@img/sharp-darwin-x64": { 313 | "version": "0.33.5", 314 | "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", 315 | "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", 316 | "cpu": [ 317 | "x64" 318 | ], 319 | "license": "Apache-2.0", 320 | "optional": true, 321 | "os": [ 322 | "darwin" 323 | ], 324 | "peer": true, 325 | "engines": { 326 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 327 | }, 328 | "funding": { 329 | "url": "https://opencollective.com/libvips" 330 | }, 331 | "optionalDependencies": { 332 | "@img/sharp-libvips-darwin-x64": "1.0.4" 333 | } 334 | }, 335 | "node_modules/@img/sharp-libvips-darwin-arm64": { 336 | "version": "1.0.4", 337 | "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", 338 | "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", 339 | "cpu": [ 340 | "arm64" 341 | ], 342 | "license": "LGPL-3.0-or-later", 343 | "optional": true, 344 | "os": [ 345 | "darwin" 346 | ], 347 | "peer": true, 348 | "funding": { 349 | "url": "https://opencollective.com/libvips" 350 | } 351 | }, 352 | "node_modules/@img/sharp-libvips-darwin-x64": { 353 | "version": "1.0.4", 354 | "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", 355 | "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", 356 | "cpu": [ 357 | "x64" 358 | ], 359 | "license": "LGPL-3.0-or-later", 360 | "optional": true, 361 | "os": [ 362 | "darwin" 363 | ], 364 | "peer": true, 365 | "funding": { 366 | "url": "https://opencollective.com/libvips" 367 | } 368 | }, 369 | "node_modules/@img/sharp-libvips-linux-arm": { 370 | "version": "1.0.5", 371 | "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", 372 | "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", 373 | "cpu": [ 374 | "arm" 375 | ], 376 | "license": "LGPL-3.0-or-later", 377 | "optional": true, 378 | "os": [ 379 | "linux" 380 | ], 381 | "peer": true, 382 | "funding": { 383 | "url": "https://opencollective.com/libvips" 384 | } 385 | }, 386 | "node_modules/@img/sharp-libvips-linux-arm64": { 387 | "version": "1.0.4", 388 | "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", 389 | "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", 390 | "cpu": [ 391 | "arm64" 392 | ], 393 | "license": "LGPL-3.0-or-later", 394 | "optional": true, 395 | "os": [ 396 | "linux" 397 | ], 398 | "peer": true, 399 | "funding": { 400 | "url": "https://opencollective.com/libvips" 401 | } 402 | }, 403 | "node_modules/@img/sharp-libvips-linux-s390x": { 404 | "version": "1.0.4", 405 | "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", 406 | "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", 407 | "cpu": [ 408 | "s390x" 409 | ], 410 | "license": "LGPL-3.0-or-later", 411 | "optional": true, 412 | "os": [ 413 | "linux" 414 | ], 415 | "peer": true, 416 | "funding": { 417 | "url": "https://opencollective.com/libvips" 418 | } 419 | }, 420 | "node_modules/@img/sharp-libvips-linux-x64": { 421 | "version": "1.0.4", 422 | "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", 423 | "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", 424 | "cpu": [ 425 | "x64" 426 | ], 427 | "license": "LGPL-3.0-or-later", 428 | "optional": true, 429 | "os": [ 430 | "linux" 431 | ], 432 | "peer": true, 433 | "funding": { 434 | "url": "https://opencollective.com/libvips" 435 | } 436 | }, 437 | "node_modules/@img/sharp-libvips-linuxmusl-arm64": { 438 | "version": "1.0.4", 439 | "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", 440 | "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", 441 | "cpu": [ 442 | "arm64" 443 | ], 444 | "license": "LGPL-3.0-or-later", 445 | "optional": true, 446 | "os": [ 447 | "linux" 448 | ], 449 | "peer": true, 450 | "funding": { 451 | "url": "https://opencollective.com/libvips" 452 | } 453 | }, 454 | "node_modules/@img/sharp-libvips-linuxmusl-x64": { 455 | "version": "1.0.4", 456 | "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", 457 | "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", 458 | "cpu": [ 459 | "x64" 460 | ], 461 | "license": "LGPL-3.0-or-later", 462 | "optional": true, 463 | "os": [ 464 | "linux" 465 | ], 466 | "peer": true, 467 | "funding": { 468 | "url": "https://opencollective.com/libvips" 469 | } 470 | }, 471 | "node_modules/@img/sharp-linux-arm": { 472 | "version": "0.33.5", 473 | "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", 474 | "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", 475 | "cpu": [ 476 | "arm" 477 | ], 478 | "license": "Apache-2.0", 479 | "optional": true, 480 | "os": [ 481 | "linux" 482 | ], 483 | "peer": true, 484 | "engines": { 485 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 486 | }, 487 | "funding": { 488 | "url": "https://opencollective.com/libvips" 489 | }, 490 | "optionalDependencies": { 491 | "@img/sharp-libvips-linux-arm": "1.0.5" 492 | } 493 | }, 494 | "node_modules/@img/sharp-linux-arm64": { 495 | "version": "0.33.5", 496 | "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", 497 | "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", 498 | "cpu": [ 499 | "arm64" 500 | ], 501 | "license": "Apache-2.0", 502 | "optional": true, 503 | "os": [ 504 | "linux" 505 | ], 506 | "peer": true, 507 | "engines": { 508 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 509 | }, 510 | "funding": { 511 | "url": "https://opencollective.com/libvips" 512 | }, 513 | "optionalDependencies": { 514 | "@img/sharp-libvips-linux-arm64": "1.0.4" 515 | } 516 | }, 517 | "node_modules/@img/sharp-linux-s390x": { 518 | "version": "0.33.5", 519 | "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", 520 | "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", 521 | "cpu": [ 522 | "s390x" 523 | ], 524 | "license": "Apache-2.0", 525 | "optional": true, 526 | "os": [ 527 | "linux" 528 | ], 529 | "peer": true, 530 | "engines": { 531 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 532 | }, 533 | "funding": { 534 | "url": "https://opencollective.com/libvips" 535 | }, 536 | "optionalDependencies": { 537 | "@img/sharp-libvips-linux-s390x": "1.0.4" 538 | } 539 | }, 540 | "node_modules/@img/sharp-linux-x64": { 541 | "version": "0.33.5", 542 | "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", 543 | "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", 544 | "cpu": [ 545 | "x64" 546 | ], 547 | "license": "Apache-2.0", 548 | "optional": true, 549 | "os": [ 550 | "linux" 551 | ], 552 | "peer": true, 553 | "engines": { 554 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 555 | }, 556 | "funding": { 557 | "url": "https://opencollective.com/libvips" 558 | }, 559 | "optionalDependencies": { 560 | "@img/sharp-libvips-linux-x64": "1.0.4" 561 | } 562 | }, 563 | "node_modules/@img/sharp-linuxmusl-arm64": { 564 | "version": "0.33.5", 565 | "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", 566 | "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", 567 | "cpu": [ 568 | "arm64" 569 | ], 570 | "license": "Apache-2.0", 571 | "optional": true, 572 | "os": [ 573 | "linux" 574 | ], 575 | "peer": true, 576 | "engines": { 577 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 578 | }, 579 | "funding": { 580 | "url": "https://opencollective.com/libvips" 581 | }, 582 | "optionalDependencies": { 583 | "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" 584 | } 585 | }, 586 | "node_modules/@img/sharp-linuxmusl-x64": { 587 | "version": "0.33.5", 588 | "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", 589 | "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", 590 | "cpu": [ 591 | "x64" 592 | ], 593 | "license": "Apache-2.0", 594 | "optional": true, 595 | "os": [ 596 | "linux" 597 | ], 598 | "peer": true, 599 | "engines": { 600 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 601 | }, 602 | "funding": { 603 | "url": "https://opencollective.com/libvips" 604 | }, 605 | "optionalDependencies": { 606 | "@img/sharp-libvips-linuxmusl-x64": "1.0.4" 607 | } 608 | }, 609 | "node_modules/@img/sharp-wasm32": { 610 | "version": "0.33.5", 611 | "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", 612 | "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", 613 | "cpu": [ 614 | "wasm32" 615 | ], 616 | "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", 617 | "optional": true, 618 | "peer": true, 619 | "dependencies": { 620 | "@emnapi/runtime": "^1.2.0" 621 | }, 622 | "engines": { 623 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 624 | }, 625 | "funding": { 626 | "url": "https://opencollective.com/libvips" 627 | } 628 | }, 629 | "node_modules/@img/sharp-win32-ia32": { 630 | "version": "0.33.5", 631 | "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", 632 | "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", 633 | "cpu": [ 634 | "ia32" 635 | ], 636 | "license": "Apache-2.0 AND LGPL-3.0-or-later", 637 | "optional": true, 638 | "os": [ 639 | "win32" 640 | ], 641 | "peer": true, 642 | "engines": { 643 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 644 | }, 645 | "funding": { 646 | "url": "https://opencollective.com/libvips" 647 | } 648 | }, 649 | "node_modules/@img/sharp-win32-x64": { 650 | "version": "0.33.5", 651 | "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", 652 | "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", 653 | "cpu": [ 654 | "x64" 655 | ], 656 | "license": "Apache-2.0 AND LGPL-3.0-or-later", 657 | "optional": true, 658 | "os": [ 659 | "win32" 660 | ], 661 | "peer": true, 662 | "engines": { 663 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 664 | }, 665 | "funding": { 666 | "url": "https://opencollective.com/libvips" 667 | } 668 | }, 669 | "node_modules/@langchain/community": { 670 | "version": "0.3.23", 671 | "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.23.tgz", 672 | "integrity": "sha512-vO4aTwoMFdI93ejCPrPn5X77ZC+wqWrg+h9k34lXigw90gGPa9ks81Ew50o+shASmhLDV5cX7jf1ZZFbo7yGJw==", 673 | "license": "MIT", 674 | "dependencies": { 675 | "@langchain/openai": ">=0.2.0 <0.4.0", 676 | "binary-extensions": "^2.2.0", 677 | "expr-eval": "^2.0.2", 678 | "flat": "^5.0.2", 679 | "js-yaml": "^4.1.0", 680 | "langchain": ">=0.2.3 <0.3.0 || >=0.3.4 <0.4.0", 681 | "langsmith": "^0.2.8", 682 | "uuid": "^10.0.0", 683 | "zod": "^3.22.3", 684 | "zod-to-json-schema": "^3.22.5" 685 | }, 686 | "engines": { 687 | "node": ">=18" 688 | }, 689 | "peerDependencies": { 690 | "@arcjet/redact": "^v1.0.0-alpha.23", 691 | "@aws-crypto/sha256-js": "^5.0.0", 692 | "@aws-sdk/client-bedrock-agent-runtime": "^3.583.0", 693 | "@aws-sdk/client-bedrock-runtime": "^3.422.0", 694 | "@aws-sdk/client-dynamodb": "^3.310.0", 695 | "@aws-sdk/client-kendra": "^3.352.0", 696 | "@aws-sdk/client-lambda": "^3.310.0", 697 | "@aws-sdk/client-s3": "^3.310.0", 698 | "@aws-sdk/client-sagemaker-runtime": "^3.310.0", 699 | "@aws-sdk/client-sfn": "^3.310.0", 700 | "@aws-sdk/credential-provider-node": "^3.388.0", 701 | "@azure/search-documents": "^12.0.0", 702 | "@azure/storage-blob": "^12.15.0", 703 | "@browserbasehq/sdk": "*", 704 | "@browserbasehq/stagehand": "^1.0.0", 705 | "@clickhouse/client": "^0.2.5", 706 | "@cloudflare/ai": "*", 707 | "@datastax/astra-db-ts": "^1.0.0", 708 | "@elastic/elasticsearch": "^8.4.0", 709 | "@getmetal/metal-sdk": "*", 710 | "@getzep/zep-cloud": "^1.0.6", 711 | "@getzep/zep-js": "^0.9.0", 712 | "@gomomento/sdk": "^1.51.1", 713 | "@gomomento/sdk-core": "^1.51.1", 714 | "@google-ai/generativelanguage": "*", 715 | "@google-cloud/storage": "^6.10.1 || ^7.7.0", 716 | "@gradientai/nodejs-sdk": "^1.2.0", 717 | "@huggingface/inference": "^2.6.4", 718 | "@huggingface/transformers": "^3.2.3", 719 | "@ibm-cloud/watsonx-ai": "*", 720 | "@lancedb/lancedb": "^0.12.0", 721 | "@langchain/core": ">=0.2.21 <0.4.0", 722 | "@layerup/layerup-security": "^1.5.12", 723 | "@libsql/client": "^0.14.0", 724 | "@mendable/firecrawl-js": "^1.4.3", 725 | "@mlc-ai/web-llm": "*", 726 | "@mozilla/readability": "*", 727 | "@neondatabase/serverless": "*", 728 | "@notionhq/client": "^2.2.10", 729 | "@opensearch-project/opensearch": "*", 730 | "@pinecone-database/pinecone": "*", 731 | "@planetscale/database": "^1.8.0", 732 | "@premai/prem-sdk": "^0.3.25", 733 | "@qdrant/js-client-rest": "^1.8.2", 734 | "@raycast/api": "^1.55.2", 735 | "@rockset/client": "^0.9.1", 736 | "@smithy/eventstream-codec": "^2.0.5", 737 | "@smithy/protocol-http": "^3.0.6", 738 | "@smithy/signature-v4": "^2.0.10", 739 | "@smithy/util-utf8": "^2.0.0", 740 | "@spider-cloud/spider-client": "^0.0.21", 741 | "@supabase/supabase-js": "^2.45.0", 742 | "@tensorflow-models/universal-sentence-encoder": "*", 743 | "@tensorflow/tfjs-converter": "*", 744 | "@tensorflow/tfjs-core": "*", 745 | "@upstash/ratelimit": "^1.1.3 || ^2.0.3", 746 | "@upstash/redis": "^1.20.6", 747 | "@upstash/vector": "^1.1.1", 748 | "@vercel/kv": "*", 749 | "@vercel/postgres": "*", 750 | "@writerai/writer-sdk": "^0.40.2", 751 | "@xata.io/client": "^0.28.0", 752 | "@zilliz/milvus2-sdk-node": ">=2.3.5", 753 | "apify-client": "^2.7.1", 754 | "assemblyai": "^4.6.0", 755 | "better-sqlite3": ">=9.4.0 <12.0.0", 756 | "cassandra-driver": "^4.7.2", 757 | "cborg": "^4.1.1", 758 | "cheerio": "^1.0.0-rc.12", 759 | "chromadb": "*", 760 | "closevector-common": "0.1.3", 761 | "closevector-node": "0.1.6", 762 | "closevector-web": "0.1.6", 763 | "cohere-ai": "*", 764 | "convex": "^1.3.1", 765 | "crypto-js": "^4.2.0", 766 | "d3-dsv": "^2.0.0", 767 | "discord.js": "^14.14.1", 768 | "dria": "^0.0.3", 769 | "duck-duck-scrape": "^2.2.5", 770 | "epub2": "^3.0.1", 771 | "faiss-node": "^0.5.1", 772 | "fast-xml-parser": "*", 773 | "firebase-admin": "^11.9.0 || ^12.0.0", 774 | "google-auth-library": "*", 775 | "googleapis": "*", 776 | "hnswlib-node": "^3.0.0", 777 | "html-to-text": "^9.0.5", 778 | "ibm-cloud-sdk-core": "*", 779 | "ignore": "^5.2.0", 780 | "interface-datastore": "^8.2.11", 781 | "ioredis": "^5.3.2", 782 | "it-all": "^3.0.4", 783 | "jsdom": "*", 784 | "jsonwebtoken": "^9.0.2", 785 | "llmonitor": "^0.5.9", 786 | "lodash": "^4.17.21", 787 | "lunary": "^0.7.10", 788 | "mammoth": "^1.6.0", 789 | "mongodb": ">=5.2.0", 790 | "mysql2": "^3.9.8", 791 | "neo4j-driver": "*", 792 | "notion-to-md": "^3.1.0", 793 | "officeparser": "^4.0.4", 794 | "openai": "*", 795 | "pdf-parse": "1.1.1", 796 | "pg": "^8.11.0", 797 | "pg-copy-streams": "^6.0.5", 798 | "pickleparser": "^0.2.1", 799 | "playwright": "^1.32.1", 800 | "portkey-ai": "^0.1.11", 801 | "puppeteer": "*", 802 | "pyodide": ">=0.24.1 <0.27.0", 803 | "redis": "*", 804 | "replicate": "^0.29.4", 805 | "sonix-speech-recognition": "^2.1.1", 806 | "srt-parser-2": "^1.2.3", 807 | "typeorm": "^0.3.20", 808 | "typesense": "^1.5.3", 809 | "usearch": "^1.1.1", 810 | "voy-search": "0.6.2", 811 | "weaviate-ts-client": "*", 812 | "web-auth-library": "^1.0.3", 813 | "word-extractor": "*", 814 | "ws": "^8.14.2", 815 | "youtubei.js": "*" 816 | }, 817 | "peerDependenciesMeta": { 818 | "@arcjet/redact": { 819 | "optional": true 820 | }, 821 | "@aws-crypto/sha256-js": { 822 | "optional": true 823 | }, 824 | "@aws-sdk/client-bedrock-agent-runtime": { 825 | "optional": true 826 | }, 827 | "@aws-sdk/client-bedrock-runtime": { 828 | "optional": true 829 | }, 830 | "@aws-sdk/client-dynamodb": { 831 | "optional": true 832 | }, 833 | "@aws-sdk/client-kendra": { 834 | "optional": true 835 | }, 836 | "@aws-sdk/client-lambda": { 837 | "optional": true 838 | }, 839 | "@aws-sdk/client-s3": { 840 | "optional": true 841 | }, 842 | "@aws-sdk/client-sagemaker-runtime": { 843 | "optional": true 844 | }, 845 | "@aws-sdk/client-sfn": { 846 | "optional": true 847 | }, 848 | "@aws-sdk/credential-provider-node": { 849 | "optional": true 850 | }, 851 | "@azure/search-documents": { 852 | "optional": true 853 | }, 854 | "@azure/storage-blob": { 855 | "optional": true 856 | }, 857 | "@browserbasehq/sdk": { 858 | "optional": true 859 | }, 860 | "@clickhouse/client": { 861 | "optional": true 862 | }, 863 | "@cloudflare/ai": { 864 | "optional": true 865 | }, 866 | "@datastax/astra-db-ts": { 867 | "optional": true 868 | }, 869 | "@elastic/elasticsearch": { 870 | "optional": true 871 | }, 872 | "@getmetal/metal-sdk": { 873 | "optional": true 874 | }, 875 | "@getzep/zep-cloud": { 876 | "optional": true 877 | }, 878 | "@getzep/zep-js": { 879 | "optional": true 880 | }, 881 | "@gomomento/sdk": { 882 | "optional": true 883 | }, 884 | "@gomomento/sdk-core": { 885 | "optional": true 886 | }, 887 | "@google-ai/generativelanguage": { 888 | "optional": true 889 | }, 890 | "@google-cloud/storage": { 891 | "optional": true 892 | }, 893 | "@gradientai/nodejs-sdk": { 894 | "optional": true 895 | }, 896 | "@huggingface/inference": { 897 | "optional": true 898 | }, 899 | "@huggingface/transformers": { 900 | "optional": true 901 | }, 902 | "@lancedb/lancedb": { 903 | "optional": true 904 | }, 905 | "@layerup/layerup-security": { 906 | "optional": true 907 | }, 908 | "@libsql/client": { 909 | "optional": true 910 | }, 911 | "@mendable/firecrawl-js": { 912 | "optional": true 913 | }, 914 | "@mlc-ai/web-llm": { 915 | "optional": true 916 | }, 917 | "@mozilla/readability": { 918 | "optional": true 919 | }, 920 | "@neondatabase/serverless": { 921 | "optional": true 922 | }, 923 | "@notionhq/client": { 924 | "optional": true 925 | }, 926 | "@opensearch-project/opensearch": { 927 | "optional": true 928 | }, 929 | "@pinecone-database/pinecone": { 930 | "optional": true 931 | }, 932 | "@planetscale/database": { 933 | "optional": true 934 | }, 935 | "@premai/prem-sdk": { 936 | "optional": true 937 | }, 938 | "@qdrant/js-client-rest": { 939 | "optional": true 940 | }, 941 | "@raycast/api": { 942 | "optional": true 943 | }, 944 | "@rockset/client": { 945 | "optional": true 946 | }, 947 | "@smithy/eventstream-codec": { 948 | "optional": true 949 | }, 950 | "@smithy/protocol-http": { 951 | "optional": true 952 | }, 953 | "@smithy/signature-v4": { 954 | "optional": true 955 | }, 956 | "@smithy/util-utf8": { 957 | "optional": true 958 | }, 959 | "@spider-cloud/spider-client": { 960 | "optional": true 961 | }, 962 | "@supabase/supabase-js": { 963 | "optional": true 964 | }, 965 | "@tensorflow-models/universal-sentence-encoder": { 966 | "optional": true 967 | }, 968 | "@tensorflow/tfjs-converter": { 969 | "optional": true 970 | }, 971 | "@tensorflow/tfjs-core": { 972 | "optional": true 973 | }, 974 | "@upstash/ratelimit": { 975 | "optional": true 976 | }, 977 | "@upstash/redis": { 978 | "optional": true 979 | }, 980 | "@upstash/vector": { 981 | "optional": true 982 | }, 983 | "@vercel/kv": { 984 | "optional": true 985 | }, 986 | "@vercel/postgres": { 987 | "optional": true 988 | }, 989 | "@writerai/writer-sdk": { 990 | "optional": true 991 | }, 992 | "@xata.io/client": { 993 | "optional": true 994 | }, 995 | "@zilliz/milvus2-sdk-node": { 996 | "optional": true 997 | }, 998 | "apify-client": { 999 | "optional": true 1000 | }, 1001 | "assemblyai": { 1002 | "optional": true 1003 | }, 1004 | "better-sqlite3": { 1005 | "optional": true 1006 | }, 1007 | "cassandra-driver": { 1008 | "optional": true 1009 | }, 1010 | "cborg": { 1011 | "optional": true 1012 | }, 1013 | "cheerio": { 1014 | "optional": true 1015 | }, 1016 | "chromadb": { 1017 | "optional": true 1018 | }, 1019 | "closevector-common": { 1020 | "optional": true 1021 | }, 1022 | "closevector-node": { 1023 | "optional": true 1024 | }, 1025 | "closevector-web": { 1026 | "optional": true 1027 | }, 1028 | "cohere-ai": { 1029 | "optional": true 1030 | }, 1031 | "convex": { 1032 | "optional": true 1033 | }, 1034 | "crypto-js": { 1035 | "optional": true 1036 | }, 1037 | "d3-dsv": { 1038 | "optional": true 1039 | }, 1040 | "discord.js": { 1041 | "optional": true 1042 | }, 1043 | "dria": { 1044 | "optional": true 1045 | }, 1046 | "duck-duck-scrape": { 1047 | "optional": true 1048 | }, 1049 | "epub2": { 1050 | "optional": true 1051 | }, 1052 | "faiss-node": { 1053 | "optional": true 1054 | }, 1055 | "fast-xml-parser": { 1056 | "optional": true 1057 | }, 1058 | "firebase-admin": { 1059 | "optional": true 1060 | }, 1061 | "google-auth-library": { 1062 | "optional": true 1063 | }, 1064 | "googleapis": { 1065 | "optional": true 1066 | }, 1067 | "hnswlib-node": { 1068 | "optional": true 1069 | }, 1070 | "html-to-text": { 1071 | "optional": true 1072 | }, 1073 | "ignore": { 1074 | "optional": true 1075 | }, 1076 | "interface-datastore": { 1077 | "optional": true 1078 | }, 1079 | "ioredis": { 1080 | "optional": true 1081 | }, 1082 | "it-all": { 1083 | "optional": true 1084 | }, 1085 | "jsdom": { 1086 | "optional": true 1087 | }, 1088 | "jsonwebtoken": { 1089 | "optional": true 1090 | }, 1091 | "llmonitor": { 1092 | "optional": true 1093 | }, 1094 | "lodash": { 1095 | "optional": true 1096 | }, 1097 | "lunary": { 1098 | "optional": true 1099 | }, 1100 | "mammoth": { 1101 | "optional": true 1102 | }, 1103 | "mongodb": { 1104 | "optional": true 1105 | }, 1106 | "mysql2": { 1107 | "optional": true 1108 | }, 1109 | "neo4j-driver": { 1110 | "optional": true 1111 | }, 1112 | "notion-to-md": { 1113 | "optional": true 1114 | }, 1115 | "officeparser": { 1116 | "optional": true 1117 | }, 1118 | "pdf-parse": { 1119 | "optional": true 1120 | }, 1121 | "pg": { 1122 | "optional": true 1123 | }, 1124 | "pg-copy-streams": { 1125 | "optional": true 1126 | }, 1127 | "pickleparser": { 1128 | "optional": true 1129 | }, 1130 | "playwright": { 1131 | "optional": true 1132 | }, 1133 | "portkey-ai": { 1134 | "optional": true 1135 | }, 1136 | "puppeteer": { 1137 | "optional": true 1138 | }, 1139 | "pyodide": { 1140 | "optional": true 1141 | }, 1142 | "redis": { 1143 | "optional": true 1144 | }, 1145 | "replicate": { 1146 | "optional": true 1147 | }, 1148 | "sonix-speech-recognition": { 1149 | "optional": true 1150 | }, 1151 | "srt-parser-2": { 1152 | "optional": true 1153 | }, 1154 | "typeorm": { 1155 | "optional": true 1156 | }, 1157 | "typesense": { 1158 | "optional": true 1159 | }, 1160 | "usearch": { 1161 | "optional": true 1162 | }, 1163 | "voy-search": { 1164 | "optional": true 1165 | }, 1166 | "weaviate-ts-client": { 1167 | "optional": true 1168 | }, 1169 | "web-auth-library": { 1170 | "optional": true 1171 | }, 1172 | "word-extractor": { 1173 | "optional": true 1174 | }, 1175 | "ws": { 1176 | "optional": true 1177 | }, 1178 | "youtubei.js": { 1179 | "optional": true 1180 | } 1181 | } 1182 | }, 1183 | "node_modules/@langchain/core": { 1184 | "version": "0.3.27", 1185 | "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.27.tgz", 1186 | "integrity": "sha512-jtJKbJWB1NPU1YvtrExOB2rumvUFgkJwlWGxyjSIV9A6zcLVmUbcZGV8fCSuXgl5bbzOIQLJ1xcLYQmbW9TkTg==", 1187 | "license": "MIT", 1188 | "peer": true, 1189 | "dependencies": { 1190 | "@cfworker/json-schema": "^4.0.2", 1191 | "ansi-styles": "^5.0.0", 1192 | "camelcase": "6", 1193 | "decamelize": "1.2.0", 1194 | "js-tiktoken": "^1.0.12", 1195 | "langsmith": "^0.2.8", 1196 | "mustache": "^4.2.0", 1197 | "p-queue": "^6.6.2", 1198 | "p-retry": "4", 1199 | "uuid": "^10.0.0", 1200 | "zod": "^3.22.4", 1201 | "zod-to-json-schema": "^3.22.3" 1202 | }, 1203 | "engines": { 1204 | "node": ">=18" 1205 | } 1206 | }, 1207 | "node_modules/@langchain/ollama": { 1208 | "version": "0.1.4", 1209 | "resolved": "https://registry.npmjs.org/@langchain/ollama/-/ollama-0.1.4.tgz", 1210 | "integrity": "sha512-olHPViUurGcmOI3IbhIGK/EJ7QxDlZru4j98V269PiEFTIVlciRULltgI/t3voHYTdvB8R+HV8pMo/Y3UVzvzA==", 1211 | "license": "MIT", 1212 | "dependencies": { 1213 | "ollama": "^0.5.9", 1214 | "uuid": "^10.0.0" 1215 | }, 1216 | "engines": { 1217 | "node": ">=18" 1218 | }, 1219 | "peerDependencies": { 1220 | "@langchain/core": ">=0.2.21 <0.4.0" 1221 | } 1222 | }, 1223 | "node_modules/@langchain/openai": { 1224 | "version": "0.3.16", 1225 | "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.3.16.tgz", 1226 | "integrity": "sha512-Om9HRlTeI0Ou6D4pfxbWHop4WGfkCdV/7v1W/+Jr7NSf0BNoA9jk5GqGms8ZtOYSGgPvizDu3i0TrM3B4cN4NA==", 1227 | "license": "MIT", 1228 | "dependencies": { 1229 | "js-tiktoken": "^1.0.12", 1230 | "openai": "^4.77.0", 1231 | "zod": "^3.22.4", 1232 | "zod-to-json-schema": "^3.22.3" 1233 | }, 1234 | "engines": { 1235 | "node": ">=18" 1236 | }, 1237 | "peerDependencies": { 1238 | "@langchain/core": ">=0.2.26 <0.4.0" 1239 | } 1240 | }, 1241 | "node_modules/@langchain/textsplitters": { 1242 | "version": "0.1.0", 1243 | "resolved": "https://registry.npmjs.org/@langchain/textsplitters/-/textsplitters-0.1.0.tgz", 1244 | "integrity": "sha512-djI4uw9rlkAb5iMhtLED+xJebDdAG935AdP4eRTB02R7OB/act55Bj9wsskhZsvuyQRpO4O1wQOp85s6T6GWmw==", 1245 | "license": "MIT", 1246 | "dependencies": { 1247 | "js-tiktoken": "^1.0.12" 1248 | }, 1249 | "engines": { 1250 | "node": ">=18" 1251 | }, 1252 | "peerDependencies": { 1253 | "@langchain/core": ">=0.2.21 <0.4.0" 1254 | } 1255 | }, 1256 | "node_modules/@playwright/test": { 1257 | "version": "1.49.1", 1258 | "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.1.tgz", 1259 | "integrity": "sha512-Ky+BVzPz8pL6PQxHqNRW1k3mIyv933LML7HktS8uik0bUXNCdPhoS/kLihiO1tMf/egaJb4IutXd7UywvXEW+g==", 1260 | "license": "Apache-2.0", 1261 | "peer": true, 1262 | "dependencies": { 1263 | "playwright": "1.49.1" 1264 | }, 1265 | "bin": { 1266 | "playwright": "cli.js" 1267 | }, 1268 | "engines": { 1269 | "node": ">=18" 1270 | } 1271 | }, 1272 | "node_modules/@tokenizer/token": { 1273 | "version": "0.3.0", 1274 | "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", 1275 | "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", 1276 | "license": "MIT", 1277 | "peer": true 1278 | }, 1279 | "node_modules/@types/debug": { 1280 | "version": "4.1.12", 1281 | "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", 1282 | "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", 1283 | "license": "MIT", 1284 | "peer": true, 1285 | "dependencies": { 1286 | "@types/ms": "*" 1287 | } 1288 | }, 1289 | "node_modules/@types/ms": { 1290 | "version": "0.7.34", 1291 | "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", 1292 | "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", 1293 | "license": "MIT", 1294 | "peer": true 1295 | }, 1296 | "node_modules/@types/node": { 1297 | "version": "18.19.70", 1298 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.70.tgz", 1299 | "integrity": "sha512-RE+K0+KZoEpDUbGGctnGdkrLFwi1eYKTlIHNl2Um98mUkGsm1u2Ff6Ltd0e8DktTtC98uy7rSj+hO8t/QuLoVQ==", 1300 | "license": "MIT", 1301 | "dependencies": { 1302 | "undici-types": "~5.26.4" 1303 | } 1304 | }, 1305 | "node_modules/@types/node-fetch": { 1306 | "version": "2.6.12", 1307 | "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz", 1308 | "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==", 1309 | "license": "MIT", 1310 | "dependencies": { 1311 | "@types/node": "*", 1312 | "form-data": "^4.0.0" 1313 | } 1314 | }, 1315 | "node_modules/@types/retry": { 1316 | "version": "0.12.0", 1317 | "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", 1318 | "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", 1319 | "license": "MIT" 1320 | }, 1321 | "node_modules/@types/tough-cookie": { 1322 | "version": "4.0.5", 1323 | "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", 1324 | "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", 1325 | "license": "MIT", 1326 | "peer": true 1327 | }, 1328 | "node_modules/@types/uuid": { 1329 | "version": "10.0.0", 1330 | "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-10.0.0.tgz", 1331 | "integrity": "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==", 1332 | "license": "MIT" 1333 | }, 1334 | "node_modules/abort-controller": { 1335 | "version": "3.0.0", 1336 | "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", 1337 | "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", 1338 | "license": "MIT", 1339 | "dependencies": { 1340 | "event-target-shim": "^5.0.0" 1341 | }, 1342 | "engines": { 1343 | "node": ">=6.5" 1344 | } 1345 | }, 1346 | "node_modules/acorn": { 1347 | "version": "8.14.0", 1348 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", 1349 | "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", 1350 | "license": "MIT", 1351 | "bin": { 1352 | "acorn": "bin/acorn" 1353 | }, 1354 | "engines": { 1355 | "node": ">=0.4.0" 1356 | } 1357 | }, 1358 | "node_modules/agent-base": { 1359 | "version": "7.1.3", 1360 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", 1361 | "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", 1362 | "license": "MIT", 1363 | "engines": { 1364 | "node": ">= 14" 1365 | } 1366 | }, 1367 | "node_modules/agentkeepalive": { 1368 | "version": "4.6.0", 1369 | "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz", 1370 | "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==", 1371 | "license": "MIT", 1372 | "dependencies": { 1373 | "humanize-ms": "^1.2.1" 1374 | }, 1375 | "engines": { 1376 | "node": ">= 8.0.0" 1377 | } 1378 | }, 1379 | "node_modules/ansi-styles": { 1380 | "version": "5.2.0", 1381 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", 1382 | "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", 1383 | "license": "MIT", 1384 | "peer": true, 1385 | "engines": { 1386 | "node": ">=10" 1387 | }, 1388 | "funding": { 1389 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 1390 | } 1391 | }, 1392 | "node_modules/argparse": { 1393 | "version": "2.0.1", 1394 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 1395 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 1396 | "license": "Python-2.0" 1397 | }, 1398 | "node_modules/asynckit": { 1399 | "version": "0.4.0", 1400 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 1401 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", 1402 | "license": "MIT" 1403 | }, 1404 | "node_modules/axios": { 1405 | "version": "1.7.4", 1406 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", 1407 | "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", 1408 | "license": "MIT", 1409 | "peer": true, 1410 | "dependencies": { 1411 | "follow-redirects": "^1.15.6", 1412 | "form-data": "^4.0.0", 1413 | "proxy-from-env": "^1.1.0" 1414 | } 1415 | }, 1416 | "node_modules/azure-functions-core-tools": { 1417 | "version": "4.0.6610", 1418 | "resolved": "https://registry.npmjs.org/azure-functions-core-tools/-/azure-functions-core-tools-4.0.6610.tgz", 1419 | "integrity": "sha512-TpSu2YTlpdnuptFkVA+fD6/lfwJRDZTBmUK3T4ESZQXoj06A1R7cRpnhW+hF4z42ShRaSE61xney0Ja5+QVLcg==", 1420 | "dev": true, 1421 | "hasInstallScript": true, 1422 | "hasShrinkwrap": true, 1423 | "license": "MIT", 1424 | "os": [ 1425 | "win32", 1426 | "darwin", 1427 | "linux" 1428 | ], 1429 | "dependencies": { 1430 | "chalk": "3.0.0", 1431 | "extract-zip": "^2.0.1", 1432 | "https-proxy-agent": "5.0.1", 1433 | "progress": "2.0.3", 1434 | "rimraf": "4.4.1" 1435 | }, 1436 | "bin": { 1437 | "azfun": "lib/main.js", 1438 | "azurefunctions": "lib/main.js", 1439 | "func": "lib/main.js" 1440 | }, 1441 | "engines": { 1442 | "node": ">=6.9.1" 1443 | } 1444 | }, 1445 | "node_modules/azure-functions-core-tools/node_modules/@types/color-name": { 1446 | "version": "1.1.1", 1447 | "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", 1448 | "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", 1449 | "dev": true 1450 | }, 1451 | "node_modules/azure-functions-core-tools/node_modules/@types/node": { 1452 | "version": "18.15.13", 1453 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", 1454 | "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==", 1455 | "dev": true, 1456 | "optional": true 1457 | }, 1458 | "node_modules/azure-functions-core-tools/node_modules/@types/yauzl": { 1459 | "version": "2.10.0", 1460 | "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", 1461 | "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", 1462 | "dev": true, 1463 | "optional": true, 1464 | "dependencies": { 1465 | "@types/node": "*" 1466 | } 1467 | }, 1468 | "node_modules/azure-functions-core-tools/node_modules/agent-base": { 1469 | "version": "6.0.2", 1470 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", 1471 | "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", 1472 | "dev": true, 1473 | "dependencies": { 1474 | "debug": "4" 1475 | }, 1476 | "engines": { 1477 | "node": ">= 6.0.0" 1478 | } 1479 | }, 1480 | "node_modules/azure-functions-core-tools/node_modules/ansi-styles": { 1481 | "version": "4.2.0", 1482 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.0.tgz", 1483 | "integrity": "sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg==", 1484 | "dev": true, 1485 | "dependencies": { 1486 | "@types/color-name": "^1.1.1", 1487 | "color-convert": "^2.0.1" 1488 | }, 1489 | "engines": { 1490 | "node": ">=8" 1491 | } 1492 | }, 1493 | "node_modules/azure-functions-core-tools/node_modules/balanced-match": { 1494 | "version": "1.0.2", 1495 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 1496 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 1497 | "dev": true, 1498 | "license": "MIT" 1499 | }, 1500 | "node_modules/azure-functions-core-tools/node_modules/brace-expansion": { 1501 | "version": "2.0.1", 1502 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 1503 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 1504 | "dev": true, 1505 | "license": "MIT", 1506 | "dependencies": { 1507 | "balanced-match": "^1.0.0" 1508 | } 1509 | }, 1510 | "node_modules/azure-functions-core-tools/node_modules/buffer-crc32": { 1511 | "version": "0.2.13", 1512 | "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", 1513 | "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", 1514 | "dev": true, 1515 | "engines": { 1516 | "node": "*" 1517 | } 1518 | }, 1519 | "node_modules/azure-functions-core-tools/node_modules/chalk": { 1520 | "version": "3.0.0", 1521 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", 1522 | "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", 1523 | "dev": true, 1524 | "dependencies": { 1525 | "ansi-styles": "^4.1.0", 1526 | "supports-color": "^7.1.0" 1527 | }, 1528 | "engines": { 1529 | "node": ">=8" 1530 | } 1531 | }, 1532 | "node_modules/azure-functions-core-tools/node_modules/color-convert": { 1533 | "version": "2.0.1", 1534 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1535 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1536 | "dev": true, 1537 | "dependencies": { 1538 | "color-name": "~1.1.4" 1539 | }, 1540 | "engines": { 1541 | "node": ">=7.0.0" 1542 | } 1543 | }, 1544 | "node_modules/azure-functions-core-tools/node_modules/color-name": { 1545 | "version": "1.1.4", 1546 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1547 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1548 | "dev": true 1549 | }, 1550 | "node_modules/azure-functions-core-tools/node_modules/debug": { 1551 | "version": "4.3.7", 1552 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", 1553 | "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", 1554 | "dev": true, 1555 | "license": "MIT", 1556 | "dependencies": { 1557 | "ms": "^2.1.3" 1558 | }, 1559 | "engines": { 1560 | "node": ">=6.0" 1561 | }, 1562 | "peerDependenciesMeta": { 1563 | "supports-color": { 1564 | "optional": true 1565 | } 1566 | } 1567 | }, 1568 | "node_modules/azure-functions-core-tools/node_modules/end-of-stream": { 1569 | "version": "1.4.4", 1570 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 1571 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 1572 | "dev": true, 1573 | "dependencies": { 1574 | "once": "^1.4.0" 1575 | } 1576 | }, 1577 | "node_modules/azure-functions-core-tools/node_modules/extract-zip": { 1578 | "version": "2.0.1", 1579 | "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", 1580 | "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", 1581 | "dev": true, 1582 | "dependencies": { 1583 | "debug": "^4.1.1", 1584 | "get-stream": "^5.1.0", 1585 | "yauzl": "^2.10.0" 1586 | }, 1587 | "bin": { 1588 | "extract-zip": "cli.js" 1589 | }, 1590 | "engines": { 1591 | "node": ">= 10.17.0" 1592 | }, 1593 | "optionalDependencies": { 1594 | "@types/yauzl": "^2.9.1" 1595 | } 1596 | }, 1597 | "node_modules/azure-functions-core-tools/node_modules/fd-slicer": { 1598 | "version": "1.1.0", 1599 | "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", 1600 | "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", 1601 | "dev": true, 1602 | "dependencies": { 1603 | "pend": "~1.2.0" 1604 | } 1605 | }, 1606 | "node_modules/azure-functions-core-tools/node_modules/fs.realpath": { 1607 | "version": "1.0.0", 1608 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 1609 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 1610 | "dev": true, 1611 | "license": "ISC" 1612 | }, 1613 | "node_modules/azure-functions-core-tools/node_modules/get-stream": { 1614 | "version": "5.2.0", 1615 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", 1616 | "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", 1617 | "dev": true, 1618 | "dependencies": { 1619 | "pump": "^3.0.0" 1620 | }, 1621 | "engines": { 1622 | "node": ">=8" 1623 | }, 1624 | "funding": { 1625 | "url": "https://github.com/sponsors/sindresorhus" 1626 | } 1627 | }, 1628 | "node_modules/azure-functions-core-tools/node_modules/glob": { 1629 | "version": "9.3.5", 1630 | "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", 1631 | "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", 1632 | "dev": true, 1633 | "license": "ISC", 1634 | "dependencies": { 1635 | "fs.realpath": "^1.0.0", 1636 | "minimatch": "^8.0.2", 1637 | "minipass": "^4.2.4", 1638 | "path-scurry": "^1.6.1" 1639 | }, 1640 | "engines": { 1641 | "node": ">=16 || 14 >=14.17" 1642 | }, 1643 | "funding": { 1644 | "url": "https://github.com/sponsors/isaacs" 1645 | } 1646 | }, 1647 | "node_modules/azure-functions-core-tools/node_modules/has-flag": { 1648 | "version": "4.0.0", 1649 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1650 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1651 | "dev": true, 1652 | "engines": { 1653 | "node": ">=8" 1654 | } 1655 | }, 1656 | "node_modules/azure-functions-core-tools/node_modules/https-proxy-agent": { 1657 | "version": "5.0.1", 1658 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", 1659 | "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", 1660 | "dev": true, 1661 | "license": "MIT", 1662 | "dependencies": { 1663 | "agent-base": "6", 1664 | "debug": "4" 1665 | }, 1666 | "engines": { 1667 | "node": ">= 6" 1668 | } 1669 | }, 1670 | "node_modules/azure-functions-core-tools/node_modules/lru-cache": { 1671 | "version": "10.4.3", 1672 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", 1673 | "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", 1674 | "dev": true, 1675 | "license": "ISC" 1676 | }, 1677 | "node_modules/azure-functions-core-tools/node_modules/minimatch": { 1678 | "version": "8.0.4", 1679 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", 1680 | "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", 1681 | "dev": true, 1682 | "license": "ISC", 1683 | "dependencies": { 1684 | "brace-expansion": "^2.0.1" 1685 | }, 1686 | "engines": { 1687 | "node": ">=16 || 14 >=14.17" 1688 | }, 1689 | "funding": { 1690 | "url": "https://github.com/sponsors/isaacs" 1691 | } 1692 | }, 1693 | "node_modules/azure-functions-core-tools/node_modules/minipass": { 1694 | "version": "4.2.8", 1695 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", 1696 | "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", 1697 | "dev": true, 1698 | "license": "ISC", 1699 | "engines": { 1700 | "node": ">=8" 1701 | } 1702 | }, 1703 | "node_modules/azure-functions-core-tools/node_modules/ms": { 1704 | "version": "2.1.3", 1705 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1706 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1707 | "dev": true, 1708 | "license": "MIT" 1709 | }, 1710 | "node_modules/azure-functions-core-tools/node_modules/once": { 1711 | "version": "1.4.0", 1712 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1713 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1714 | "dev": true, 1715 | "dependencies": { 1716 | "wrappy": "1" 1717 | } 1718 | }, 1719 | "node_modules/azure-functions-core-tools/node_modules/path-scurry": { 1720 | "version": "1.11.1", 1721 | "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", 1722 | "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", 1723 | "dev": true, 1724 | "license": "BlueOak-1.0.0", 1725 | "dependencies": { 1726 | "lru-cache": "^10.2.0", 1727 | "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" 1728 | }, 1729 | "engines": { 1730 | "node": ">=16 || 14 >=14.18" 1731 | }, 1732 | "funding": { 1733 | "url": "https://github.com/sponsors/isaacs" 1734 | } 1735 | }, 1736 | "node_modules/azure-functions-core-tools/node_modules/path-scurry/node_modules/minipass": { 1737 | "version": "7.1.2", 1738 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", 1739 | "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", 1740 | "dev": true, 1741 | "license": "ISC", 1742 | "engines": { 1743 | "node": ">=16 || 14 >=14.17" 1744 | } 1745 | }, 1746 | "node_modules/azure-functions-core-tools/node_modules/pend": { 1747 | "version": "1.2.0", 1748 | "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", 1749 | "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", 1750 | "dev": true 1751 | }, 1752 | "node_modules/azure-functions-core-tools/node_modules/progress": { 1753 | "version": "2.0.3", 1754 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", 1755 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", 1756 | "dev": true, 1757 | "engines": { 1758 | "node": ">=0.4.0" 1759 | } 1760 | }, 1761 | "node_modules/azure-functions-core-tools/node_modules/pump": { 1762 | "version": "3.0.0", 1763 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 1764 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 1765 | "dev": true, 1766 | "dependencies": { 1767 | "end-of-stream": "^1.1.0", 1768 | "once": "^1.3.1" 1769 | } 1770 | }, 1771 | "node_modules/azure-functions-core-tools/node_modules/rimraf": { 1772 | "version": "4.4.1", 1773 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", 1774 | "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", 1775 | "dev": true, 1776 | "license": "ISC", 1777 | "dependencies": { 1778 | "glob": "^9.2.0" 1779 | }, 1780 | "bin": { 1781 | "rimraf": "dist/cjs/src/bin.js" 1782 | }, 1783 | "engines": { 1784 | "node": ">=14" 1785 | }, 1786 | "funding": { 1787 | "url": "https://github.com/sponsors/isaacs" 1788 | } 1789 | }, 1790 | "node_modules/azure-functions-core-tools/node_modules/supports-color": { 1791 | "version": "7.1.0", 1792 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", 1793 | "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", 1794 | "dev": true, 1795 | "dependencies": { 1796 | "has-flag": "^4.0.0" 1797 | }, 1798 | "engines": { 1799 | "node": ">=8" 1800 | } 1801 | }, 1802 | "node_modules/azure-functions-core-tools/node_modules/wrappy": { 1803 | "version": "1.0.2", 1804 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1805 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1806 | "dev": true 1807 | }, 1808 | "node_modules/azure-functions-core-tools/node_modules/yauzl": { 1809 | "version": "2.10.0", 1810 | "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", 1811 | "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", 1812 | "dev": true, 1813 | "dependencies": { 1814 | "buffer-crc32": "~0.2.3", 1815 | "fd-slicer": "~1.1.0" 1816 | } 1817 | }, 1818 | "node_modules/base64-js": { 1819 | "version": "1.5.1", 1820 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 1821 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 1822 | "funding": [ 1823 | { 1824 | "type": "github", 1825 | "url": "https://github.com/sponsors/feross" 1826 | }, 1827 | { 1828 | "type": "patreon", 1829 | "url": "https://www.patreon.com/feross" 1830 | }, 1831 | { 1832 | "type": "consulting", 1833 | "url": "https://feross.org/support" 1834 | } 1835 | ], 1836 | "license": "MIT" 1837 | }, 1838 | "node_modules/binary-extensions": { 1839 | "version": "2.3.0", 1840 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", 1841 | "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", 1842 | "license": "MIT", 1843 | "engines": { 1844 | "node": ">=8" 1845 | }, 1846 | "funding": { 1847 | "url": "https://github.com/sponsors/sindresorhus" 1848 | } 1849 | }, 1850 | "node_modules/bindings": { 1851 | "version": "1.5.0", 1852 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 1853 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 1854 | "license": "MIT", 1855 | "dependencies": { 1856 | "file-uri-to-path": "1.0.0" 1857 | } 1858 | }, 1859 | "node_modules/bl": { 1860 | "version": "4.1.0", 1861 | "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", 1862 | "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", 1863 | "license": "MIT", 1864 | "dependencies": { 1865 | "buffer": "^5.5.0", 1866 | "inherits": "^2.0.4", 1867 | "readable-stream": "^3.4.0" 1868 | } 1869 | }, 1870 | "node_modules/buffer": { 1871 | "version": "5.7.1", 1872 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 1873 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 1874 | "funding": [ 1875 | { 1876 | "type": "github", 1877 | "url": "https://github.com/sponsors/feross" 1878 | }, 1879 | { 1880 | "type": "patreon", 1881 | "url": "https://www.patreon.com/feross" 1882 | }, 1883 | { 1884 | "type": "consulting", 1885 | "url": "https://feross.org/support" 1886 | } 1887 | ], 1888 | "license": "MIT", 1889 | "dependencies": { 1890 | "base64-js": "^1.3.1", 1891 | "ieee754": "^1.1.13" 1892 | } 1893 | }, 1894 | "node_modules/buffer-equal-constant-time": { 1895 | "version": "1.0.1", 1896 | "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", 1897 | "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", 1898 | "license": "BSD-3-Clause", 1899 | "peer": true 1900 | }, 1901 | "node_modules/camelcase": { 1902 | "version": "6.3.0", 1903 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", 1904 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 1905 | "license": "MIT", 1906 | "peer": true, 1907 | "engines": { 1908 | "node": ">=10" 1909 | }, 1910 | "funding": { 1911 | "url": "https://github.com/sponsors/sindresorhus" 1912 | } 1913 | }, 1914 | "node_modules/chownr": { 1915 | "version": "1.1.4", 1916 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", 1917 | "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", 1918 | "license": "ISC" 1919 | }, 1920 | "node_modules/color": { 1921 | "version": "4.2.3", 1922 | "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", 1923 | "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", 1924 | "license": "MIT", 1925 | "peer": true, 1926 | "dependencies": { 1927 | "color-convert": "^2.0.1", 1928 | "color-string": "^1.9.0" 1929 | }, 1930 | "engines": { 1931 | "node": ">=12.5.0" 1932 | } 1933 | }, 1934 | "node_modules/color-convert": { 1935 | "version": "2.0.1", 1936 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1937 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1938 | "license": "MIT", 1939 | "peer": true, 1940 | "dependencies": { 1941 | "color-name": "~1.1.4" 1942 | }, 1943 | "engines": { 1944 | "node": ">=7.0.0" 1945 | } 1946 | }, 1947 | "node_modules/color-name": { 1948 | "version": "1.1.4", 1949 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1950 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1951 | "license": "MIT", 1952 | "peer": true 1953 | }, 1954 | "node_modules/color-string": { 1955 | "version": "1.9.1", 1956 | "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", 1957 | "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", 1958 | "license": "MIT", 1959 | "peer": true, 1960 | "dependencies": { 1961 | "color-name": "^1.0.0", 1962 | "simple-swizzle": "^0.2.2" 1963 | } 1964 | }, 1965 | "node_modules/combined-stream": { 1966 | "version": "1.0.8", 1967 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 1968 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 1969 | "license": "MIT", 1970 | "dependencies": { 1971 | "delayed-stream": "~1.0.0" 1972 | }, 1973 | "engines": { 1974 | "node": ">= 0.8" 1975 | } 1976 | }, 1977 | "node_modules/commander": { 1978 | "version": "10.0.1", 1979 | "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", 1980 | "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", 1981 | "license": "MIT", 1982 | "engines": { 1983 | "node": ">=14" 1984 | } 1985 | }, 1986 | "node_modules/cookie": { 1987 | "version": "0.7.2", 1988 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", 1989 | "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", 1990 | "license": "MIT", 1991 | "engines": { 1992 | "node": ">= 0.6" 1993 | } 1994 | }, 1995 | "node_modules/debug": { 1996 | "version": "4.4.0", 1997 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", 1998 | "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", 1999 | "license": "MIT", 2000 | "dependencies": { 2001 | "ms": "^2.1.3" 2002 | }, 2003 | "engines": { 2004 | "node": ">=6.0" 2005 | }, 2006 | "peerDependenciesMeta": { 2007 | "supports-color": { 2008 | "optional": true 2009 | } 2010 | } 2011 | }, 2012 | "node_modules/decamelize": { 2013 | "version": "1.2.0", 2014 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 2015 | "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", 2016 | "license": "MIT", 2017 | "peer": true, 2018 | "engines": { 2019 | "node": ">=0.10.0" 2020 | } 2021 | }, 2022 | "node_modules/decompress-response": { 2023 | "version": "6.0.0", 2024 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", 2025 | "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", 2026 | "license": "MIT", 2027 | "dependencies": { 2028 | "mimic-response": "^3.1.0" 2029 | }, 2030 | "engines": { 2031 | "node": ">=10" 2032 | }, 2033 | "funding": { 2034 | "url": "https://github.com/sponsors/sindresorhus" 2035 | } 2036 | }, 2037 | "node_modules/deep-extend": { 2038 | "version": "0.6.0", 2039 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 2040 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", 2041 | "license": "MIT", 2042 | "engines": { 2043 | "node": ">=4.0.0" 2044 | } 2045 | }, 2046 | "node_modules/deepmerge": { 2047 | "version": "4.3.1", 2048 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", 2049 | "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", 2050 | "license": "MIT", 2051 | "peer": true, 2052 | "engines": { 2053 | "node": ">=0.10.0" 2054 | } 2055 | }, 2056 | "node_modules/delayed-stream": { 2057 | "version": "1.0.0", 2058 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 2059 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 2060 | "license": "MIT", 2061 | "engines": { 2062 | "node": ">=0.4.0" 2063 | } 2064 | }, 2065 | "node_modules/detect-libc": { 2066 | "version": "2.0.3", 2067 | "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", 2068 | "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", 2069 | "license": "Apache-2.0", 2070 | "engines": { 2071 | "node": ">=8" 2072 | } 2073 | }, 2074 | "node_modules/dotenv": { 2075 | "version": "16.4.7", 2076 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", 2077 | "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", 2078 | "license": "BSD-2-Clause", 2079 | "engines": { 2080 | "node": ">=12" 2081 | }, 2082 | "funding": { 2083 | "url": "https://dotenvx.com" 2084 | } 2085 | }, 2086 | "node_modules/ecdsa-sig-formatter": { 2087 | "version": "1.0.11", 2088 | "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", 2089 | "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", 2090 | "license": "Apache-2.0", 2091 | "peer": true, 2092 | "dependencies": { 2093 | "safe-buffer": "^5.0.1" 2094 | } 2095 | }, 2096 | "node_modules/end-of-stream": { 2097 | "version": "1.4.4", 2098 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 2099 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 2100 | "license": "MIT", 2101 | "dependencies": { 2102 | "once": "^1.4.0" 2103 | } 2104 | }, 2105 | "node_modules/event-target-shim": { 2106 | "version": "5.0.1", 2107 | "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", 2108 | "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", 2109 | "license": "MIT", 2110 | "engines": { 2111 | "node": ">=6" 2112 | } 2113 | }, 2114 | "node_modules/eventemitter3": { 2115 | "version": "4.0.7", 2116 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", 2117 | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", 2118 | "license": "MIT" 2119 | }, 2120 | "node_modules/events": { 2121 | "version": "3.3.0", 2122 | "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", 2123 | "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", 2124 | "license": "MIT", 2125 | "engines": { 2126 | "node": ">=0.8.x" 2127 | } 2128 | }, 2129 | "node_modules/expand-template": { 2130 | "version": "2.0.3", 2131 | "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", 2132 | "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", 2133 | "license": "(MIT OR WTFPL)", 2134 | "engines": { 2135 | "node": ">=6" 2136 | } 2137 | }, 2138 | "node_modules/expr-eval": { 2139 | "version": "2.0.2", 2140 | "resolved": "https://registry.npmjs.org/expr-eval/-/expr-eval-2.0.2.tgz", 2141 | "integrity": "sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg==", 2142 | "license": "MIT" 2143 | }, 2144 | "node_modules/extend": { 2145 | "version": "3.0.2", 2146 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 2147 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", 2148 | "license": "MIT", 2149 | "peer": true 2150 | }, 2151 | "node_modules/faiss-node": { 2152 | "version": "0.5.1", 2153 | "resolved": "https://registry.npmjs.org/faiss-node/-/faiss-node-0.5.1.tgz", 2154 | "integrity": "sha512-zD8wobJn8C6OLWo68Unho+Ih8l6nSRB2w3Amj01a+xc4bsEvd2mBDLklAn7VocA9XO3WDvQL/bLpi5flkCn/XQ==", 2155 | "hasInstallScript": true, 2156 | "license": "MIT", 2157 | "dependencies": { 2158 | "bindings": "^1.5.0", 2159 | "node-addon-api": "^6.0.0", 2160 | "prebuild-install": "^7.1.1" 2161 | }, 2162 | "engines": { 2163 | "node": ">= 14.0.0" 2164 | } 2165 | }, 2166 | "node_modules/file-type": { 2167 | "version": "16.5.4", 2168 | "resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz", 2169 | "integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==", 2170 | "license": "MIT", 2171 | "peer": true, 2172 | "dependencies": { 2173 | "readable-web-to-node-stream": "^3.0.0", 2174 | "strtok3": "^6.2.4", 2175 | "token-types": "^4.1.1" 2176 | }, 2177 | "engines": { 2178 | "node": ">=10" 2179 | }, 2180 | "funding": { 2181 | "url": "https://github.com/sindresorhus/file-type?sponsor=1" 2182 | } 2183 | }, 2184 | "node_modules/file-uri-to-path": { 2185 | "version": "1.0.0", 2186 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 2187 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", 2188 | "license": "MIT" 2189 | }, 2190 | "node_modules/flat": { 2191 | "version": "5.0.2", 2192 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 2193 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 2194 | "license": "BSD-3-Clause", 2195 | "bin": { 2196 | "flat": "cli.js" 2197 | } 2198 | }, 2199 | "node_modules/follow-redirects": { 2200 | "version": "1.15.9", 2201 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", 2202 | "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", 2203 | "funding": [ 2204 | { 2205 | "type": "individual", 2206 | "url": "https://github.com/sponsors/RubenVerborgh" 2207 | } 2208 | ], 2209 | "license": "MIT", 2210 | "peer": true, 2211 | "engines": { 2212 | "node": ">=4.0" 2213 | }, 2214 | "peerDependenciesMeta": { 2215 | "debug": { 2216 | "optional": true 2217 | } 2218 | } 2219 | }, 2220 | "node_modules/form-data": { 2221 | "version": "4.0.1", 2222 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", 2223 | "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", 2224 | "license": "MIT", 2225 | "dependencies": { 2226 | "asynckit": "^0.4.0", 2227 | "combined-stream": "^1.0.8", 2228 | "mime-types": "^2.1.12" 2229 | }, 2230 | "engines": { 2231 | "node": ">= 6" 2232 | } 2233 | }, 2234 | "node_modules/form-data-encoder": { 2235 | "version": "1.7.2", 2236 | "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", 2237 | "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==", 2238 | "license": "MIT" 2239 | }, 2240 | "node_modules/formdata-node": { 2241 | "version": "4.4.1", 2242 | "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", 2243 | "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", 2244 | "license": "MIT", 2245 | "dependencies": { 2246 | "node-domexception": "1.0.0", 2247 | "web-streams-polyfill": "4.0.0-beta.3" 2248 | }, 2249 | "engines": { 2250 | "node": ">= 12.20" 2251 | } 2252 | }, 2253 | "node_modules/fs-constants": { 2254 | "version": "1.0.0", 2255 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", 2256 | "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", 2257 | "license": "MIT" 2258 | }, 2259 | "node_modules/fsevents": { 2260 | "version": "2.3.2", 2261 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 2262 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 2263 | "hasInstallScript": true, 2264 | "license": "MIT", 2265 | "optional": true, 2266 | "os": [ 2267 | "darwin" 2268 | ], 2269 | "peer": true, 2270 | "engines": { 2271 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 2272 | } 2273 | }, 2274 | "node_modules/github-from-package": { 2275 | "version": "0.0.0", 2276 | "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", 2277 | "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", 2278 | "license": "MIT" 2279 | }, 2280 | "node_modules/http-proxy-agent": { 2281 | "version": "7.0.2", 2282 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", 2283 | "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", 2284 | "license": "MIT", 2285 | "dependencies": { 2286 | "agent-base": "^7.1.0", 2287 | "debug": "^4.3.4" 2288 | }, 2289 | "engines": { 2290 | "node": ">= 14" 2291 | } 2292 | }, 2293 | "node_modules/https-proxy-agent": { 2294 | "version": "7.0.6", 2295 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", 2296 | "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", 2297 | "license": "MIT", 2298 | "dependencies": { 2299 | "agent-base": "^7.1.2", 2300 | "debug": "4" 2301 | }, 2302 | "engines": { 2303 | "node": ">= 14" 2304 | } 2305 | }, 2306 | "node_modules/humanize-ms": { 2307 | "version": "1.2.1", 2308 | "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", 2309 | "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", 2310 | "license": "MIT", 2311 | "dependencies": { 2312 | "ms": "^2.0.0" 2313 | } 2314 | }, 2315 | "node_modules/ibm-cloud-sdk-core": { 2316 | "version": "5.1.0", 2317 | "resolved": "https://registry.npmjs.org/ibm-cloud-sdk-core/-/ibm-cloud-sdk-core-5.1.0.tgz", 2318 | "integrity": "sha512-KJCbPz3tiXB1NGAD7cL4JtwpWV8yd/C7jsaHsxvedMo2ZblNG8emMyvSpGhiKAQVZmi3c0ujz6eJdy22NHuUWQ==", 2319 | "license": "Apache-2.0", 2320 | "peer": true, 2321 | "dependencies": { 2322 | "@types/debug": "^4.1.12", 2323 | "@types/node": "~10.14.19", 2324 | "@types/tough-cookie": "^4.0.0", 2325 | "axios": "1.7.4", 2326 | "camelcase": "^6.3.0", 2327 | "debug": "^4.3.4", 2328 | "dotenv": "^16.4.5", 2329 | "extend": "3.0.2", 2330 | "file-type": "16.5.4", 2331 | "form-data": "4.0.0", 2332 | "isstream": "0.1.2", 2333 | "jsonwebtoken": "^9.0.2", 2334 | "mime-types": "2.1.35", 2335 | "retry-axios": "^2.6.0", 2336 | "tough-cookie": "^4.1.3" 2337 | }, 2338 | "engines": { 2339 | "node": ">=18" 2340 | } 2341 | }, 2342 | "node_modules/ibm-cloud-sdk-core/node_modules/@types/node": { 2343 | "version": "10.14.22", 2344 | "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.22.tgz", 2345 | "integrity": "sha512-9taxKC944BqoTVjE+UT3pQH0nHZlTvITwfsOZqyc+R3sfJuxaTtxWjfn1K2UlxyPcKHf0rnaXcVFrS9F9vf0bw==", 2346 | "license": "MIT", 2347 | "peer": true 2348 | }, 2349 | "node_modules/ibm-cloud-sdk-core/node_modules/form-data": { 2350 | "version": "4.0.0", 2351 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 2352 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 2353 | "license": "MIT", 2354 | "peer": true, 2355 | "dependencies": { 2356 | "asynckit": "^0.4.0", 2357 | "combined-stream": "^1.0.8", 2358 | "mime-types": "^2.1.12" 2359 | }, 2360 | "engines": { 2361 | "node": ">= 6" 2362 | } 2363 | }, 2364 | "node_modules/ieee754": { 2365 | "version": "1.2.1", 2366 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 2367 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 2368 | "funding": [ 2369 | { 2370 | "type": "github", 2371 | "url": "https://github.com/sponsors/feross" 2372 | }, 2373 | { 2374 | "type": "patreon", 2375 | "url": "https://www.patreon.com/feross" 2376 | }, 2377 | { 2378 | "type": "consulting", 2379 | "url": "https://feross.org/support" 2380 | } 2381 | ], 2382 | "license": "BSD-3-Clause" 2383 | }, 2384 | "node_modules/inherits": { 2385 | "version": "2.0.4", 2386 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 2387 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 2388 | "license": "ISC" 2389 | }, 2390 | "node_modules/ini": { 2391 | "version": "1.3.8", 2392 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", 2393 | "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", 2394 | "license": "ISC" 2395 | }, 2396 | "node_modules/is-arrayish": { 2397 | "version": "0.3.2", 2398 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", 2399 | "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", 2400 | "license": "MIT", 2401 | "peer": true 2402 | }, 2403 | "node_modules/isstream": { 2404 | "version": "0.1.2", 2405 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 2406 | "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", 2407 | "license": "MIT", 2408 | "peer": true 2409 | }, 2410 | "node_modules/jintr": { 2411 | "version": "3.2.0", 2412 | "resolved": "https://registry.npmjs.org/jintr/-/jintr-3.2.0.tgz", 2413 | "integrity": "sha512-psD1yf05kMKDNsUdW1l5YhO59pHScQ6OIHHb8W5SKSM2dCOFPsqolmIuSHgVA8+3Dc47NJR181CXZ4alCAPTkA==", 2414 | "funding": [ 2415 | "https://github.com/sponsors/LuanRT" 2416 | ], 2417 | "license": "MIT", 2418 | "dependencies": { 2419 | "acorn": "^8.8.0" 2420 | } 2421 | }, 2422 | "node_modules/js-tiktoken": { 2423 | "version": "1.0.16", 2424 | "resolved": "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.16.tgz", 2425 | "integrity": "sha512-nUVdO5k/M9llWpiaZlBBDdtmr6qWXwSD6fgaDu2zM8UP+OXxx9V37lFkI6w0/1IuaDx7WffZ37oYd9KvcWKElg==", 2426 | "license": "MIT", 2427 | "dependencies": { 2428 | "base64-js": "^1.5.1" 2429 | } 2430 | }, 2431 | "node_modules/js-yaml": { 2432 | "version": "4.1.0", 2433 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 2434 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 2435 | "license": "MIT", 2436 | "dependencies": { 2437 | "argparse": "^2.0.1" 2438 | }, 2439 | "bin": { 2440 | "js-yaml": "bin/js-yaml.js" 2441 | } 2442 | }, 2443 | "node_modules/jsonpointer": { 2444 | "version": "5.0.1", 2445 | "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", 2446 | "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", 2447 | "license": "MIT", 2448 | "engines": { 2449 | "node": ">=0.10.0" 2450 | } 2451 | }, 2452 | "node_modules/jsonwebtoken": { 2453 | "version": "9.0.2", 2454 | "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", 2455 | "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", 2456 | "license": "MIT", 2457 | "peer": true, 2458 | "dependencies": { 2459 | "jws": "^3.2.2", 2460 | "lodash.includes": "^4.3.0", 2461 | "lodash.isboolean": "^3.0.3", 2462 | "lodash.isinteger": "^4.0.4", 2463 | "lodash.isnumber": "^3.0.3", 2464 | "lodash.isplainobject": "^4.0.6", 2465 | "lodash.isstring": "^4.0.1", 2466 | "lodash.once": "^4.0.0", 2467 | "ms": "^2.1.1", 2468 | "semver": "^7.5.4" 2469 | }, 2470 | "engines": { 2471 | "node": ">=12", 2472 | "npm": ">=6" 2473 | } 2474 | }, 2475 | "node_modules/jwa": { 2476 | "version": "1.4.1", 2477 | "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", 2478 | "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", 2479 | "license": "MIT", 2480 | "peer": true, 2481 | "dependencies": { 2482 | "buffer-equal-constant-time": "1.0.1", 2483 | "ecdsa-sig-formatter": "1.0.11", 2484 | "safe-buffer": "^5.0.1" 2485 | } 2486 | }, 2487 | "node_modules/jws": { 2488 | "version": "3.2.2", 2489 | "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", 2490 | "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", 2491 | "license": "MIT", 2492 | "peer": true, 2493 | "dependencies": { 2494 | "jwa": "^1.4.1", 2495 | "safe-buffer": "^5.0.1" 2496 | } 2497 | }, 2498 | "node_modules/langchain": { 2499 | "version": "0.3.10", 2500 | "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.3.10.tgz", 2501 | "integrity": "sha512-dZXdhs81NU/PS2WfECCLJszx4to3ELK7qTMbumD0rAKx3mQb0sqr8M9MiVCcPgTZ1J1pzoDr5yCSdsmm9UsNXA==", 2502 | "license": "MIT", 2503 | "dependencies": { 2504 | "@langchain/openai": ">=0.1.0 <0.4.0", 2505 | "@langchain/textsplitters": ">=0.0.0 <0.2.0", 2506 | "js-tiktoken": "^1.0.12", 2507 | "js-yaml": "^4.1.0", 2508 | "jsonpointer": "^5.0.1", 2509 | "langsmith": "^0.2.8", 2510 | "openapi-types": "^12.1.3", 2511 | "p-retry": "4", 2512 | "uuid": "^10.0.0", 2513 | "yaml": "^2.2.1", 2514 | "zod": "^3.22.4", 2515 | "zod-to-json-schema": "^3.22.3" 2516 | }, 2517 | "engines": { 2518 | "node": ">=18" 2519 | }, 2520 | "peerDependencies": { 2521 | "@langchain/anthropic": "*", 2522 | "@langchain/aws": "*", 2523 | "@langchain/cerebras": "*", 2524 | "@langchain/cohere": "*", 2525 | "@langchain/core": ">=0.2.21 <0.4.0", 2526 | "@langchain/google-genai": "*", 2527 | "@langchain/google-vertexai": "*", 2528 | "@langchain/google-vertexai-web": "*", 2529 | "@langchain/groq": "*", 2530 | "@langchain/mistralai": "*", 2531 | "@langchain/ollama": "*", 2532 | "axios": "*", 2533 | "cheerio": "*", 2534 | "handlebars": "^4.7.8", 2535 | "peggy": "^3.0.2", 2536 | "typeorm": "*" 2537 | }, 2538 | "peerDependenciesMeta": { 2539 | "@langchain/anthropic": { 2540 | "optional": true 2541 | }, 2542 | "@langchain/aws": { 2543 | "optional": true 2544 | }, 2545 | "@langchain/cerebras": { 2546 | "optional": true 2547 | }, 2548 | "@langchain/cohere": { 2549 | "optional": true 2550 | }, 2551 | "@langchain/google-genai": { 2552 | "optional": true 2553 | }, 2554 | "@langchain/google-vertexai": { 2555 | "optional": true 2556 | }, 2557 | "@langchain/google-vertexai-web": { 2558 | "optional": true 2559 | }, 2560 | "@langchain/groq": { 2561 | "optional": true 2562 | }, 2563 | "@langchain/mistralai": { 2564 | "optional": true 2565 | }, 2566 | "@langchain/ollama": { 2567 | "optional": true 2568 | }, 2569 | "axios": { 2570 | "optional": true 2571 | }, 2572 | "cheerio": { 2573 | "optional": true 2574 | }, 2575 | "handlebars": { 2576 | "optional": true 2577 | }, 2578 | "peggy": { 2579 | "optional": true 2580 | }, 2581 | "typeorm": { 2582 | "optional": true 2583 | } 2584 | } 2585 | }, 2586 | "node_modules/langsmith": { 2587 | "version": "0.2.15", 2588 | "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.2.15.tgz", 2589 | "integrity": "sha512-homtJU41iitqIZVuuLW7iarCzD4f39KcfP9RTBWav9jifhrsDa1Ez89Ejr+4qi72iuBu8Y5xykchsGVgiEZ93w==", 2590 | "license": "MIT", 2591 | "dependencies": { 2592 | "@types/uuid": "^10.0.0", 2593 | "commander": "^10.0.1", 2594 | "p-queue": "^6.6.2", 2595 | "p-retry": "4", 2596 | "semver": "^7.6.3", 2597 | "uuid": "^10.0.0" 2598 | }, 2599 | "peerDependencies": { 2600 | "openai": "*" 2601 | }, 2602 | "peerDependenciesMeta": { 2603 | "openai": { 2604 | "optional": true 2605 | } 2606 | } 2607 | }, 2608 | "node_modules/lodash.includes": { 2609 | "version": "4.3.0", 2610 | "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", 2611 | "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", 2612 | "license": "MIT", 2613 | "peer": true 2614 | }, 2615 | "node_modules/lodash.isboolean": { 2616 | "version": "3.0.3", 2617 | "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", 2618 | "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", 2619 | "license": "MIT", 2620 | "peer": true 2621 | }, 2622 | "node_modules/lodash.isinteger": { 2623 | "version": "4.0.4", 2624 | "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", 2625 | "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", 2626 | "license": "MIT", 2627 | "peer": true 2628 | }, 2629 | "node_modules/lodash.isnumber": { 2630 | "version": "3.0.3", 2631 | "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", 2632 | "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", 2633 | "license": "MIT", 2634 | "peer": true 2635 | }, 2636 | "node_modules/lodash.isplainobject": { 2637 | "version": "4.0.6", 2638 | "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", 2639 | "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", 2640 | "license": "MIT", 2641 | "peer": true 2642 | }, 2643 | "node_modules/lodash.isstring": { 2644 | "version": "4.0.1", 2645 | "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", 2646 | "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", 2647 | "license": "MIT", 2648 | "peer": true 2649 | }, 2650 | "node_modules/lodash.once": { 2651 | "version": "4.1.1", 2652 | "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", 2653 | "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", 2654 | "license": "MIT", 2655 | "peer": true 2656 | }, 2657 | "node_modules/long": { 2658 | "version": "4.0.0", 2659 | "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", 2660 | "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", 2661 | "license": "Apache-2.0" 2662 | }, 2663 | "node_modules/mime-db": { 2664 | "version": "1.52.0", 2665 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 2666 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 2667 | "license": "MIT", 2668 | "engines": { 2669 | "node": ">= 0.6" 2670 | } 2671 | }, 2672 | "node_modules/mime-types": { 2673 | "version": "2.1.35", 2674 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 2675 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 2676 | "license": "MIT", 2677 | "dependencies": { 2678 | "mime-db": "1.52.0" 2679 | }, 2680 | "engines": { 2681 | "node": ">= 0.6" 2682 | } 2683 | }, 2684 | "node_modules/mimic-response": { 2685 | "version": "3.1.0", 2686 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", 2687 | "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", 2688 | "license": "MIT", 2689 | "engines": { 2690 | "node": ">=10" 2691 | }, 2692 | "funding": { 2693 | "url": "https://github.com/sponsors/sindresorhus" 2694 | } 2695 | }, 2696 | "node_modules/minimist": { 2697 | "version": "1.2.8", 2698 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", 2699 | "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", 2700 | "license": "MIT", 2701 | "funding": { 2702 | "url": "https://github.com/sponsors/ljharb" 2703 | } 2704 | }, 2705 | "node_modules/mkdirp-classic": { 2706 | "version": "0.5.3", 2707 | "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", 2708 | "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", 2709 | "license": "MIT" 2710 | }, 2711 | "node_modules/ms": { 2712 | "version": "2.1.3", 2713 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 2714 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 2715 | "license": "MIT" 2716 | }, 2717 | "node_modules/mustache": { 2718 | "version": "4.2.0", 2719 | "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", 2720 | "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", 2721 | "license": "MIT", 2722 | "peer": true, 2723 | "bin": { 2724 | "mustache": "bin/mustache" 2725 | } 2726 | }, 2727 | "node_modules/napi-build-utils": { 2728 | "version": "1.0.2", 2729 | "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", 2730 | "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", 2731 | "license": "MIT" 2732 | }, 2733 | "node_modules/node-abi": { 2734 | "version": "3.71.0", 2735 | "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz", 2736 | "integrity": "sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==", 2737 | "license": "MIT", 2738 | "dependencies": { 2739 | "semver": "^7.3.5" 2740 | }, 2741 | "engines": { 2742 | "node": ">=10" 2743 | } 2744 | }, 2745 | "node_modules/node-addon-api": { 2746 | "version": "6.1.0", 2747 | "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", 2748 | "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", 2749 | "license": "MIT" 2750 | }, 2751 | "node_modules/node-domexception": { 2752 | "version": "1.0.0", 2753 | "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", 2754 | "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", 2755 | "funding": [ 2756 | { 2757 | "type": "github", 2758 | "url": "https://github.com/sponsors/jimmywarting" 2759 | }, 2760 | { 2761 | "type": "github", 2762 | "url": "https://paypal.me/jimmywarting" 2763 | } 2764 | ], 2765 | "license": "MIT", 2766 | "engines": { 2767 | "node": ">=10.5.0" 2768 | } 2769 | }, 2770 | "node_modules/node-fetch": { 2771 | "version": "2.7.0", 2772 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", 2773 | "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", 2774 | "license": "MIT", 2775 | "dependencies": { 2776 | "whatwg-url": "^5.0.0" 2777 | }, 2778 | "engines": { 2779 | "node": "4.x || >=6.0.0" 2780 | }, 2781 | "peerDependencies": { 2782 | "encoding": "^0.1.0" 2783 | }, 2784 | "peerDependenciesMeta": { 2785 | "encoding": { 2786 | "optional": true 2787 | } 2788 | } 2789 | }, 2790 | "node_modules/ollama": { 2791 | "version": "0.5.11", 2792 | "resolved": "https://registry.npmjs.org/ollama/-/ollama-0.5.11.tgz", 2793 | "integrity": "sha512-lDAKcpmBU3VAOGF05NcQipHNKTdpKfAHpZ7bjCsElkUkmX7SNZImi6lwIxz/l1zQtLq0S3wuLneRuiXxX2KIew==", 2794 | "license": "MIT", 2795 | "dependencies": { 2796 | "whatwg-fetch": "^3.6.20" 2797 | } 2798 | }, 2799 | "node_modules/once": { 2800 | "version": "1.4.0", 2801 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 2802 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 2803 | "license": "ISC", 2804 | "dependencies": { 2805 | "wrappy": "1" 2806 | } 2807 | }, 2808 | "node_modules/openai": { 2809 | "version": "4.78.0", 2810 | "resolved": "https://registry.npmjs.org/openai/-/openai-4.78.0.tgz", 2811 | "integrity": "sha512-4rRsKkx++5m1zayxkryVH+K/z91cv1sRbaNJAhSQjZiSCQOR7eaM8KpfIssXrS9Hlpta7+VcuO/fi57pW8xGjA==", 2812 | "license": "Apache-2.0", 2813 | "dependencies": { 2814 | "@types/node": "^18.11.18", 2815 | "@types/node-fetch": "^2.6.4", 2816 | "abort-controller": "^3.0.0", 2817 | "agentkeepalive": "^4.2.1", 2818 | "form-data-encoder": "1.7.2", 2819 | "formdata-node": "^4.3.2", 2820 | "node-fetch": "^2.6.7" 2821 | }, 2822 | "bin": { 2823 | "openai": "bin/cli" 2824 | }, 2825 | "peerDependencies": { 2826 | "zod": "^3.23.8" 2827 | }, 2828 | "peerDependenciesMeta": { 2829 | "zod": { 2830 | "optional": true 2831 | } 2832 | } 2833 | }, 2834 | "node_modules/openapi-types": { 2835 | "version": "12.1.3", 2836 | "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", 2837 | "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", 2838 | "license": "MIT" 2839 | }, 2840 | "node_modules/p-finally": { 2841 | "version": "1.0.0", 2842 | "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", 2843 | "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", 2844 | "license": "MIT", 2845 | "engines": { 2846 | "node": ">=4" 2847 | } 2848 | }, 2849 | "node_modules/p-queue": { 2850 | "version": "6.6.2", 2851 | "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", 2852 | "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", 2853 | "license": "MIT", 2854 | "dependencies": { 2855 | "eventemitter3": "^4.0.4", 2856 | "p-timeout": "^3.2.0" 2857 | }, 2858 | "engines": { 2859 | "node": ">=8" 2860 | }, 2861 | "funding": { 2862 | "url": "https://github.com/sponsors/sindresorhus" 2863 | } 2864 | }, 2865 | "node_modules/p-retry": { 2866 | "version": "4.6.2", 2867 | "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", 2868 | "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", 2869 | "license": "MIT", 2870 | "dependencies": { 2871 | "@types/retry": "0.12.0", 2872 | "retry": "^0.13.1" 2873 | }, 2874 | "engines": { 2875 | "node": ">=8" 2876 | } 2877 | }, 2878 | "node_modules/p-timeout": { 2879 | "version": "3.2.0", 2880 | "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", 2881 | "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", 2882 | "license": "MIT", 2883 | "dependencies": { 2884 | "p-finally": "^1.0.0" 2885 | }, 2886 | "engines": { 2887 | "node": ">=8" 2888 | } 2889 | }, 2890 | "node_modules/peek-readable": { 2891 | "version": "4.1.0", 2892 | "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.1.0.tgz", 2893 | "integrity": "sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==", 2894 | "license": "MIT", 2895 | "peer": true, 2896 | "engines": { 2897 | "node": ">=8" 2898 | }, 2899 | "funding": { 2900 | "type": "github", 2901 | "url": "https://github.com/sponsors/Borewit" 2902 | } 2903 | }, 2904 | "node_modules/playwright": { 2905 | "version": "1.49.1", 2906 | "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.1.tgz", 2907 | "integrity": "sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==", 2908 | "license": "Apache-2.0", 2909 | "peer": true, 2910 | "dependencies": { 2911 | "playwright-core": "1.49.1" 2912 | }, 2913 | "bin": { 2914 | "playwright": "cli.js" 2915 | }, 2916 | "engines": { 2917 | "node": ">=18" 2918 | }, 2919 | "optionalDependencies": { 2920 | "fsevents": "2.3.2" 2921 | } 2922 | }, 2923 | "node_modules/playwright-core": { 2924 | "version": "1.49.1", 2925 | "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.1.tgz", 2926 | "integrity": "sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==", 2927 | "license": "Apache-2.0", 2928 | "peer": true, 2929 | "bin": { 2930 | "playwright-core": "cli.js" 2931 | }, 2932 | "engines": { 2933 | "node": ">=18" 2934 | } 2935 | }, 2936 | "node_modules/prebuild-install": { 2937 | "version": "7.1.2", 2938 | "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", 2939 | "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", 2940 | "license": "MIT", 2941 | "dependencies": { 2942 | "detect-libc": "^2.0.0", 2943 | "expand-template": "^2.0.3", 2944 | "github-from-package": "0.0.0", 2945 | "minimist": "^1.2.3", 2946 | "mkdirp-classic": "^0.5.3", 2947 | "napi-build-utils": "^1.0.1", 2948 | "node-abi": "^3.3.0", 2949 | "pump": "^3.0.0", 2950 | "rc": "^1.2.7", 2951 | "simple-get": "^4.0.0", 2952 | "tar-fs": "^2.0.0", 2953 | "tunnel-agent": "^0.6.0" 2954 | }, 2955 | "bin": { 2956 | "prebuild-install": "bin.js" 2957 | }, 2958 | "engines": { 2959 | "node": ">=10" 2960 | } 2961 | }, 2962 | "node_modules/proxy-from-env": { 2963 | "version": "1.1.0", 2964 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 2965 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", 2966 | "license": "MIT", 2967 | "peer": true 2968 | }, 2969 | "node_modules/psl": { 2970 | "version": "1.15.0", 2971 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", 2972 | "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", 2973 | "license": "MIT", 2974 | "peer": true, 2975 | "dependencies": { 2976 | "punycode": "^2.3.1" 2977 | }, 2978 | "funding": { 2979 | "url": "https://github.com/sponsors/lupomontero" 2980 | } 2981 | }, 2982 | "node_modules/pump": { 2983 | "version": "3.0.2", 2984 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", 2985 | "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", 2986 | "license": "MIT", 2987 | "dependencies": { 2988 | "end-of-stream": "^1.1.0", 2989 | "once": "^1.3.1" 2990 | } 2991 | }, 2992 | "node_modules/punycode": { 2993 | "version": "2.3.1", 2994 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", 2995 | "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", 2996 | "license": "MIT", 2997 | "peer": true, 2998 | "engines": { 2999 | "node": ">=6" 3000 | } 3001 | }, 3002 | "node_modules/querystringify": { 3003 | "version": "2.2.0", 3004 | "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", 3005 | "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", 3006 | "license": "MIT", 3007 | "peer": true 3008 | }, 3009 | "node_modules/rc": { 3010 | "version": "1.2.8", 3011 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 3012 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 3013 | "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", 3014 | "dependencies": { 3015 | "deep-extend": "^0.6.0", 3016 | "ini": "~1.3.0", 3017 | "minimist": "^1.2.0", 3018 | "strip-json-comments": "~2.0.1" 3019 | }, 3020 | "bin": { 3021 | "rc": "cli.js" 3022 | } 3023 | }, 3024 | "node_modules/readable-stream": { 3025 | "version": "3.6.2", 3026 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", 3027 | "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", 3028 | "license": "MIT", 3029 | "dependencies": { 3030 | "inherits": "^2.0.3", 3031 | "string_decoder": "^1.1.1", 3032 | "util-deprecate": "^1.0.1" 3033 | }, 3034 | "engines": { 3035 | "node": ">= 6" 3036 | } 3037 | }, 3038 | "node_modules/readable-web-to-node-stream": { 3039 | "version": "3.0.2", 3040 | "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", 3041 | "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", 3042 | "license": "MIT", 3043 | "peer": true, 3044 | "dependencies": { 3045 | "readable-stream": "^3.6.0" 3046 | }, 3047 | "engines": { 3048 | "node": ">=8" 3049 | }, 3050 | "funding": { 3051 | "type": "github", 3052 | "url": "https://github.com/sponsors/Borewit" 3053 | } 3054 | }, 3055 | "node_modules/requires-port": { 3056 | "version": "1.0.0", 3057 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 3058 | "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", 3059 | "license": "MIT", 3060 | "peer": true 3061 | }, 3062 | "node_modules/retry": { 3063 | "version": "0.13.1", 3064 | "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", 3065 | "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", 3066 | "license": "MIT", 3067 | "engines": { 3068 | "node": ">= 4" 3069 | } 3070 | }, 3071 | "node_modules/retry-axios": { 3072 | "version": "2.6.0", 3073 | "resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-2.6.0.tgz", 3074 | "integrity": "sha512-pOLi+Gdll3JekwuFjXO3fTq+L9lzMQGcSq7M5gIjExcl3Gu1hd4XXuf5o3+LuSBsaULQH7DiNbsqPd1chVpQGQ==", 3075 | "license": "Apache-2.0", 3076 | "peer": true, 3077 | "engines": { 3078 | "node": ">=10.7.0" 3079 | }, 3080 | "peerDependencies": { 3081 | "axios": "*" 3082 | } 3083 | }, 3084 | "node_modules/safe-buffer": { 3085 | "version": "5.2.1", 3086 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 3087 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 3088 | "funding": [ 3089 | { 3090 | "type": "github", 3091 | "url": "https://github.com/sponsors/feross" 3092 | }, 3093 | { 3094 | "type": "patreon", 3095 | "url": "https://www.patreon.com/feross" 3096 | }, 3097 | { 3098 | "type": "consulting", 3099 | "url": "https://feross.org/support" 3100 | } 3101 | ], 3102 | "license": "MIT" 3103 | }, 3104 | "node_modules/semver": { 3105 | "version": "7.6.3", 3106 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", 3107 | "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", 3108 | "license": "ISC", 3109 | "bin": { 3110 | "semver": "bin/semver.js" 3111 | }, 3112 | "engines": { 3113 | "node": ">=10" 3114 | } 3115 | }, 3116 | "node_modules/sharp": { 3117 | "version": "0.33.5", 3118 | "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", 3119 | "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", 3120 | "hasInstallScript": true, 3121 | "license": "Apache-2.0", 3122 | "peer": true, 3123 | "dependencies": { 3124 | "color": "^4.2.3", 3125 | "detect-libc": "^2.0.3", 3126 | "semver": "^7.6.3" 3127 | }, 3128 | "engines": { 3129 | "node": "^18.17.0 || ^20.3.0 || >=21.0.0" 3130 | }, 3131 | "funding": { 3132 | "url": "https://opencollective.com/libvips" 3133 | }, 3134 | "optionalDependencies": { 3135 | "@img/sharp-darwin-arm64": "0.33.5", 3136 | "@img/sharp-darwin-x64": "0.33.5", 3137 | "@img/sharp-libvips-darwin-arm64": "1.0.4", 3138 | "@img/sharp-libvips-darwin-x64": "1.0.4", 3139 | "@img/sharp-libvips-linux-arm": "1.0.5", 3140 | "@img/sharp-libvips-linux-arm64": "1.0.4", 3141 | "@img/sharp-libvips-linux-s390x": "1.0.4", 3142 | "@img/sharp-libvips-linux-x64": "1.0.4", 3143 | "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", 3144 | "@img/sharp-libvips-linuxmusl-x64": "1.0.4", 3145 | "@img/sharp-linux-arm": "0.33.5", 3146 | "@img/sharp-linux-arm64": "0.33.5", 3147 | "@img/sharp-linux-s390x": "0.33.5", 3148 | "@img/sharp-linux-x64": "0.33.5", 3149 | "@img/sharp-linuxmusl-arm64": "0.33.5", 3150 | "@img/sharp-linuxmusl-x64": "0.33.5", 3151 | "@img/sharp-wasm32": "0.33.5", 3152 | "@img/sharp-win32-ia32": "0.33.5", 3153 | "@img/sharp-win32-x64": "0.33.5" 3154 | } 3155 | }, 3156 | "node_modules/simple-concat": { 3157 | "version": "1.0.1", 3158 | "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", 3159 | "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", 3160 | "funding": [ 3161 | { 3162 | "type": "github", 3163 | "url": "https://github.com/sponsors/feross" 3164 | }, 3165 | { 3166 | "type": "patreon", 3167 | "url": "https://www.patreon.com/feross" 3168 | }, 3169 | { 3170 | "type": "consulting", 3171 | "url": "https://feross.org/support" 3172 | } 3173 | ], 3174 | "license": "MIT" 3175 | }, 3176 | "node_modules/simple-get": { 3177 | "version": "4.0.1", 3178 | "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", 3179 | "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", 3180 | "funding": [ 3181 | { 3182 | "type": "github", 3183 | "url": "https://github.com/sponsors/feross" 3184 | }, 3185 | { 3186 | "type": "patreon", 3187 | "url": "https://www.patreon.com/feross" 3188 | }, 3189 | { 3190 | "type": "consulting", 3191 | "url": "https://feross.org/support" 3192 | } 3193 | ], 3194 | "license": "MIT", 3195 | "dependencies": { 3196 | "decompress-response": "^6.0.0", 3197 | "once": "^1.3.1", 3198 | "simple-concat": "^1.0.0" 3199 | } 3200 | }, 3201 | "node_modules/simple-swizzle": { 3202 | "version": "0.2.2", 3203 | "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", 3204 | "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", 3205 | "license": "MIT", 3206 | "peer": true, 3207 | "dependencies": { 3208 | "is-arrayish": "^0.3.1" 3209 | } 3210 | }, 3211 | "node_modules/string_decoder": { 3212 | "version": "1.3.0", 3213 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 3214 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 3215 | "license": "MIT", 3216 | "dependencies": { 3217 | "safe-buffer": "~5.2.0" 3218 | } 3219 | }, 3220 | "node_modules/strip-json-comments": { 3221 | "version": "2.0.1", 3222 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 3223 | "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", 3224 | "license": "MIT", 3225 | "engines": { 3226 | "node": ">=0.10.0" 3227 | } 3228 | }, 3229 | "node_modules/strtok3": { 3230 | "version": "6.3.0", 3231 | "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.3.0.tgz", 3232 | "integrity": "sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==", 3233 | "license": "MIT", 3234 | "peer": true, 3235 | "dependencies": { 3236 | "@tokenizer/token": "^0.3.0", 3237 | "peek-readable": "^4.1.0" 3238 | }, 3239 | "engines": { 3240 | "node": ">=10" 3241 | }, 3242 | "funding": { 3243 | "type": "github", 3244 | "url": "https://github.com/sponsors/Borewit" 3245 | } 3246 | }, 3247 | "node_modules/tar-fs": { 3248 | "version": "2.1.1", 3249 | "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", 3250 | "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", 3251 | "license": "MIT", 3252 | "dependencies": { 3253 | "chownr": "^1.1.1", 3254 | "mkdirp-classic": "^0.5.2", 3255 | "pump": "^3.0.0", 3256 | "tar-stream": "^2.1.4" 3257 | } 3258 | }, 3259 | "node_modules/tar-stream": { 3260 | "version": "2.2.0", 3261 | "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", 3262 | "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", 3263 | "license": "MIT", 3264 | "dependencies": { 3265 | "bl": "^4.0.3", 3266 | "end-of-stream": "^1.4.1", 3267 | "fs-constants": "^1.0.0", 3268 | "inherits": "^2.0.3", 3269 | "readable-stream": "^3.1.1" 3270 | }, 3271 | "engines": { 3272 | "node": ">=6" 3273 | } 3274 | }, 3275 | "node_modules/token-types": { 3276 | "version": "4.2.1", 3277 | "resolved": "https://registry.npmjs.org/token-types/-/token-types-4.2.1.tgz", 3278 | "integrity": "sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ==", 3279 | "license": "MIT", 3280 | "peer": true, 3281 | "dependencies": { 3282 | "@tokenizer/token": "^0.3.0", 3283 | "ieee754": "^1.2.1" 3284 | }, 3285 | "engines": { 3286 | "node": ">=10" 3287 | }, 3288 | "funding": { 3289 | "type": "github", 3290 | "url": "https://github.com/sponsors/Borewit" 3291 | } 3292 | }, 3293 | "node_modules/tough-cookie": { 3294 | "version": "4.1.4", 3295 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", 3296 | "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", 3297 | "license": "BSD-3-Clause", 3298 | "peer": true, 3299 | "dependencies": { 3300 | "psl": "^1.1.33", 3301 | "punycode": "^2.1.1", 3302 | "universalify": "^0.2.0", 3303 | "url-parse": "^1.5.3" 3304 | }, 3305 | "engines": { 3306 | "node": ">=6" 3307 | } 3308 | }, 3309 | "node_modules/tr46": { 3310 | "version": "0.0.3", 3311 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 3312 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", 3313 | "license": "MIT" 3314 | }, 3315 | "node_modules/tslib": { 3316 | "version": "2.8.1", 3317 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", 3318 | "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", 3319 | "license": "0BSD" 3320 | }, 3321 | "node_modules/tunnel-agent": { 3322 | "version": "0.6.0", 3323 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 3324 | "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", 3325 | "license": "Apache-2.0", 3326 | "dependencies": { 3327 | "safe-buffer": "^5.0.1" 3328 | }, 3329 | "engines": { 3330 | "node": "*" 3331 | } 3332 | }, 3333 | "node_modules/undici": { 3334 | "version": "5.28.4", 3335 | "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", 3336 | "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", 3337 | "license": "MIT", 3338 | "dependencies": { 3339 | "@fastify/busboy": "^2.0.0" 3340 | }, 3341 | "engines": { 3342 | "node": ">=14.0" 3343 | } 3344 | }, 3345 | "node_modules/undici-types": { 3346 | "version": "5.26.5", 3347 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", 3348 | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", 3349 | "license": "MIT" 3350 | }, 3351 | "node_modules/universalify": { 3352 | "version": "0.2.0", 3353 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", 3354 | "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", 3355 | "license": "MIT", 3356 | "peer": true, 3357 | "engines": { 3358 | "node": ">= 4.0.0" 3359 | } 3360 | }, 3361 | "node_modules/url-parse": { 3362 | "version": "1.5.10", 3363 | "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", 3364 | "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", 3365 | "license": "MIT", 3366 | "peer": true, 3367 | "dependencies": { 3368 | "querystringify": "^2.1.1", 3369 | "requires-port": "^1.0.0" 3370 | } 3371 | }, 3372 | "node_modules/util-deprecate": { 3373 | "version": "1.0.2", 3374 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 3375 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", 3376 | "license": "MIT" 3377 | }, 3378 | "node_modules/uuid": { 3379 | "version": "10.0.0", 3380 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", 3381 | "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", 3382 | "funding": [ 3383 | "https://github.com/sponsors/broofa", 3384 | "https://github.com/sponsors/ctavan" 3385 | ], 3386 | "license": "MIT", 3387 | "bin": { 3388 | "uuid": "dist/bin/uuid" 3389 | } 3390 | }, 3391 | "node_modules/web-streams-polyfill": { 3392 | "version": "4.0.0-beta.3", 3393 | "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", 3394 | "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", 3395 | "license": "MIT", 3396 | "engines": { 3397 | "node": ">= 14" 3398 | } 3399 | }, 3400 | "node_modules/webidl-conversions": { 3401 | "version": "3.0.1", 3402 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 3403 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", 3404 | "license": "BSD-2-Clause" 3405 | }, 3406 | "node_modules/whatwg-fetch": { 3407 | "version": "3.6.20", 3408 | "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", 3409 | "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", 3410 | "license": "MIT" 3411 | }, 3412 | "node_modules/whatwg-url": { 3413 | "version": "5.0.0", 3414 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 3415 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", 3416 | "license": "MIT", 3417 | "dependencies": { 3418 | "tr46": "~0.0.3", 3419 | "webidl-conversions": "^3.0.0" 3420 | } 3421 | }, 3422 | "node_modules/wrappy": { 3423 | "version": "1.0.2", 3424 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 3425 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 3426 | "license": "ISC" 3427 | }, 3428 | "node_modules/ws": { 3429 | "version": "8.18.0", 3430 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", 3431 | "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", 3432 | "license": "MIT", 3433 | "peer": true, 3434 | "engines": { 3435 | "node": ">=10.0.0" 3436 | }, 3437 | "peerDependencies": { 3438 | "bufferutil": "^4.0.1", 3439 | "utf-8-validate": ">=5.0.2" 3440 | }, 3441 | "peerDependenciesMeta": { 3442 | "bufferutil": { 3443 | "optional": true 3444 | }, 3445 | "utf-8-validate": { 3446 | "optional": true 3447 | } 3448 | } 3449 | }, 3450 | "node_modules/yaml": { 3451 | "version": "2.7.0", 3452 | "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", 3453 | "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", 3454 | "license": "ISC", 3455 | "bin": { 3456 | "yaml": "bin.mjs" 3457 | }, 3458 | "engines": { 3459 | "node": ">= 14" 3460 | } 3461 | }, 3462 | "node_modules/youtube-transcript": { 3463 | "version": "1.2.1", 3464 | "resolved": "https://registry.npmjs.org/youtube-transcript/-/youtube-transcript-1.2.1.tgz", 3465 | "integrity": "sha512-TvEGkBaajKw+B6y91ziLuBLsa5cawgowou+Bk0ciGpjELDfAzSzTGXaZmeSSkUeknCPpEr/WGApOHDwV7V+Y9Q==", 3466 | "license": "MIT", 3467 | "engines": { 3468 | "node": ">=18.0.0" 3469 | } 3470 | }, 3471 | "node_modules/youtubei.js": { 3472 | "version": "12.2.0", 3473 | "resolved": "https://registry.npmjs.org/youtubei.js/-/youtubei.js-12.2.0.tgz", 3474 | "integrity": "sha512-G+50qrbJCToMYhu8jbaHiS3Vf+RRul+CcDbz3hEGwHkGPh+zLiWwD6SS+YhYF+2/op4ZU5zDYQJrGqJ+wKh7Gw==", 3475 | "funding": [ 3476 | "https://github.com/sponsors/LuanRT" 3477 | ], 3478 | "license": "MIT", 3479 | "dependencies": { 3480 | "@bufbuild/protobuf": "^2.0.0", 3481 | "jintr": "^3.2.0", 3482 | "tslib": "^2.5.0", 3483 | "undici": "^5.19.1" 3484 | } 3485 | }, 3486 | "node_modules/zod": { 3487 | "version": "3.24.1", 3488 | "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz", 3489 | "integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==", 3490 | "license": "MIT", 3491 | "funding": { 3492 | "url": "https://github.com/sponsors/colinhacks" 3493 | } 3494 | }, 3495 | "node_modules/zod-to-json-schema": { 3496 | "version": "3.24.1", 3497 | "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.1.tgz", 3498 | "integrity": "sha512-3h08nf3Vw3Wl3PK+q3ow/lIil81IT2Oa7YpQyUUDsEWbXveMesdfK1xBd2RhCkynwZndAxixji/7SYJJowr62w==", 3499 | "license": "ISC", 3500 | "peerDependencies": { 3501 | "zod": "^3.24.1" 3502 | } 3503 | } 3504 | } 3505 | } 3506 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "langchainjs-quickstart-demo", 3 | "version": "1.0.0", 4 | "description": "Generative AI demo using Azure Functions and LangChain.js", 5 | "private": true, 6 | "type": "module", 7 | "main": "src/functions/*.js", 8 | "scripts": { 9 | "start": "func start", 10 | "start:local": "node src/local.js", 11 | "start:azure": "node src/azure.js" 12 | }, 13 | "keywords": [], 14 | "author": { 15 | "name": "Yohan Lasorsa", 16 | "url": "https://twitter.com/sinedied" 17 | }, 18 | "license": "MIT", 19 | "dependencies": { 20 | "@azure/functions": "^4.3.0", 21 | "@azure/search-documents": "^12.0.0", 22 | "@langchain/community": "^0.3.22", 23 | "@langchain/ollama": "^0.1.4", 24 | "@langchain/openai": "^0.3.16", 25 | "dotenv": "^16.4.4", 26 | "faiss-node": "^0.5.1", 27 | "langchain": "^0.3.10", 28 | "youtube-transcript": "^1.2.1", 29 | "youtubei.js": "^12.2.0" 30 | }, 31 | "devDependencies": { 32 | "azure-functions-core-tools": "^4.0.5530" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/azure.js: -------------------------------------------------------------------------------- 1 | import "dotenv/config"; 2 | import { createStuffDocumentsChain } from "langchain/chains/combine_documents"; 3 | import { YoutubeLoader } from "@langchain/community/document_loaders/web/youtube"; 4 | import { RecursiveCharacterTextSplitter } from "langchain/text_splitter"; 5 | import { ChatPromptTemplate } from "@langchain/core/prompts"; 6 | 7 | import { AzureChatOpenAI, AzureOpenAIEmbeddings } from "@langchain/openai"; 8 | import { AzureAISearchVectorStore } from "@langchain/community/vectorstores/azure_aisearch"; 9 | 10 | const YOUTUBE_VIDEO_URL = "https://www.youtube.com/watch?v=FZhbJZEgKQ4"; 11 | const QUESTION = "What are the news about GPT-4 models?"; 12 | 13 | // Load documents ------------------------------------------------------------ 14 | 15 | console.log("Loading documents..."); 16 | 17 | const loader = YoutubeLoader.createFromUrl(YOUTUBE_VIDEO_URL, { 18 | language: "en", 19 | addVideoInfo: true, 20 | }); 21 | const rawDocuments = await loader.load(); 22 | const splitter = new RecursiveCharacterTextSplitter({ 23 | chunkSize: 1500, 24 | chunkOverlap: 200, 25 | }); 26 | const documents = await splitter.splitDocuments(rawDocuments); 27 | 28 | // Init models and DB -------------------------------------------------------- 29 | 30 | console.log("Initializing models and DB..."); 31 | 32 | const embeddings = new AzureOpenAIEmbeddings(); 33 | const model = new AzureChatOpenAI(); 34 | const vectorStore = new AzureAISearchVectorStore(embeddings, {}); 35 | 36 | // Search if documents already exist for the source video 37 | const videoId = YOUTUBE_VIDEO_URL.split("v=")[1]; 38 | const indexedDocuments = await vectorStore.similaritySearch("*", 1, { 39 | filterExpression: `metadata/source eq '${videoId}'`, 40 | }); 41 | 42 | if (indexedDocuments.length === 0) { 43 | console.log("Embedding documents..."); 44 | await vectorStore.addDocuments(documents); 45 | } 46 | 47 | // Run the chain ------------------------------------------------------------- 48 | 49 | console.log("Running the chain..."); 50 | 51 | const questionAnsweringPrompt = ChatPromptTemplate.fromMessages([ 52 | ["system", "Answer the user's question using only the sources below:\n\n{context}"], 53 | ["human", "{input}"], 54 | ]); 55 | const retriever = vectorStore.asRetriever() 56 | const ragChain = await createStuffDocumentsChain({ 57 | prompt: questionAnsweringPrompt, 58 | llm: model, 59 | }); 60 | const stream = await ragChain.stream({ 61 | input: QUESTION, 62 | context: await retriever.invoke(QUESTION) 63 | }); 64 | 65 | // Print the result ---------------------------------------------------------- 66 | 67 | console.log(`Answer for the question "${QUESTION}":\n`); 68 | for await (const chunk of stream) { 69 | process.stdout.write(chunk ?? ""); 70 | } 71 | console.log(); 72 | -------------------------------------------------------------------------------- /src/functions/ask.js: -------------------------------------------------------------------------------- 1 | import "dotenv/config"; 2 | import { Readable } from "node:stream"; 3 | import { app } from '@azure/functions'; 4 | import askYoutubeLocal from "./lib/local.js"; 5 | import askYoutubeAzure from "./lib/azure.js"; 6 | 7 | const YOUTUBE_VIDEO_URL = "https://www.youtube.com/watch?v=FZhbJZEgKQ4"; 8 | const QUESTION = "What are the news about GPT-4 models?"; 9 | 10 | async function ask(request, context) { 11 | const body = request.body ? await request.json() : undefined; 12 | 13 | try { 14 | // Use local or Azure implementation 15 | const useAzure = process.env.USE_AZURE === "true"; 16 | const askYoutube = useAzure ? askYoutubeAzure : askYoutubeLocal; 17 | 18 | const chunks = await askYoutube( 19 | body?.youtubeVideoUrl || YOUTUBE_VIDEO_URL, 20 | body?.question || QUESTION 21 | ); 22 | 23 | return { 24 | body: Readable.from(chunks), 25 | headers: { "Content-Type": "text/plain" }, 26 | }; 27 | } catch (error) { 28 | context.error(error); 29 | 30 | return { 31 | status: 503, 32 | body: "Service has failed to process the request. Please try again later.", 33 | }; 34 | } 35 | } 36 | 37 | app.setup({ enableHttpStream: true }); 38 | app.http('ask', { 39 | methods: ['GET', 'POST'], 40 | authLevel: 'anonymous', 41 | handler: ask 42 | }); 43 | -------------------------------------------------------------------------------- /src/functions/lib/azure.js: -------------------------------------------------------------------------------- 1 | import { createStuffDocumentsChain } from "langchain/chains/combine_documents"; 2 | import { YoutubeLoader } from "@langchain/community/document_loaders/web/youtube"; 3 | import { RecursiveCharacterTextSplitter } from "langchain/text_splitter"; 4 | import { ChatPromptTemplate } from "@langchain/core/prompts"; 5 | 6 | import { AzureChatOpenAI, AzureOpenAIEmbeddings } from "@langchain/openai"; 7 | import { AzureAISearchVectorStore } from "@langchain/community/vectorstores/azure_aisearch"; 8 | 9 | export default async function* askYoutube(youtubeVideoUrl, question) { 10 | console.log("--- Using Azure version ---"); 11 | 12 | // Load documents ------------------------------------------------------------ 13 | 14 | console.log("Loading documents..."); 15 | 16 | const loader = YoutubeLoader.createFromUrl(youtubeVideoUrl, { 17 | language: "en", 18 | addVideoInfo: true, 19 | }); 20 | const rawDocuments = await loader.load(); 21 | const splitter = new RecursiveCharacterTextSplitter({ 22 | chunkSize: 1500, 23 | chunkOverlap: 200, 24 | }); 25 | const documents = await splitter.splitDocuments(rawDocuments); 26 | 27 | // Init models and DB -------------------------------------------------------- 28 | 29 | console.log("Initializing models and DB..."); 30 | 31 | const embeddings = new AzureOpenAIEmbeddings(); 32 | const model = new AzureChatOpenAI(); 33 | const vectorStore = new AzureAISearchVectorStore(embeddings, {}); 34 | 35 | // Search if documents already exist for the source video 36 | const videoId = youtubeVideoUrl.split("v=")[1]; 37 | const indexedDocuments = await vectorStore.similaritySearch("*", 1, { 38 | filterExpression: `metadata/source eq '${videoId}'`, 39 | }); 40 | 41 | if (indexedDocuments.length === 0) { 42 | console.log("Embedding documents..."); 43 | await vectorStore.addDocuments(documents); 44 | } 45 | 46 | // Run the chain ------------------------------------------------------------- 47 | 48 | console.log("Running the chain..."); 49 | 50 | const questionAnsweringPrompt = ChatPromptTemplate.fromMessages([ 51 | ["system", "Answer the user's question using only the sources below:\n\n{context}"], 52 | ["human", "{input}"], 53 | ]); 54 | const retriever = vectorStore.asRetriever(undefined, { 55 | filterExpression: `metadata/source eq '${videoId}'`, 56 | }); 57 | const ragChain = await createStuffDocumentsChain({ 58 | prompt: questionAnsweringPrompt, 59 | llm: model, 60 | }); 61 | const stream = await ragChain.stream({ 62 | input: question, 63 | context: await retriever.invoke(question) 64 | }); 65 | 66 | // Print the result ---------------------------------------------------------- 67 | 68 | console.log(`Answer for the question "${question}" using "${youtubeVideoUrl}":\n`); 69 | for await (const chunk of stream) { 70 | process.stdout.write(chunk ?? ""); 71 | yield chunk ?? ""; 72 | } 73 | console.log(); 74 | } 75 | -------------------------------------------------------------------------------- /src/functions/lib/local.js: -------------------------------------------------------------------------------- 1 | import { createStuffDocumentsChain } from "langchain/chains/combine_documents"; 2 | import { YoutubeLoader } from "@langchain/community/document_loaders/web/youtube"; 3 | import { RecursiveCharacterTextSplitter } from "langchain/text_splitter"; 4 | import { ChatPromptTemplate } from "@langchain/core/prompts"; 5 | 6 | import { ChatOllama, OllamaEmbeddings } from "@langchain/ollama"; 7 | import { FaissStore } from "@langchain/community/vectorstores/faiss"; 8 | 9 | export default async function* askYoutube(youtubeVideoUrl, question) { 10 | console.log("--- Using local version ---"); 11 | 12 | // Load documents ------------------------------------------------------------ 13 | 14 | console.log("Loading documents..."); 15 | 16 | const loader = YoutubeLoader.createFromUrl(youtubeVideoUrl, { 17 | language: "en", 18 | addVideoInfo: true, 19 | }); 20 | const rawDocuments = await loader.load(); 21 | const splitter = new RecursiveCharacterTextSplitter({ 22 | chunkSize: 1500, 23 | chunkOverlap: 200, 24 | }); 25 | const documents = await splitter.splitDocuments(rawDocuments); 26 | 27 | // Init models and DB -------------------------------------------------------- 28 | 29 | console.log("Initializing models and DB..."); 30 | 31 | const embeddings = new OllamaEmbeddings({ model: "nomic-embed-text" }); 32 | const model = new ChatOllama({ model: "llama3" }); 33 | const vectorStore = new FaissStore(embeddings, {}); 34 | 35 | console.log("Embedding documents..."); 36 | await vectorStore.addDocuments(documents); 37 | 38 | // Run the chain ------------------------------------------------------------- 39 | 40 | console.log("Running the chain..."); 41 | 42 | const questionAnsweringPrompt = ChatPromptTemplate.fromMessages([ 43 | ["system", "Answer the user's question using only the sources below:\n\n{context}"], 44 | ["human", "{input}"], 45 | ]); 46 | const retriever = vectorStore.asRetriever() 47 | const ragChain = await createStuffDocumentsChain({ 48 | prompt: questionAnsweringPrompt, 49 | llm: model, 50 | }); 51 | const stream = await ragChain.stream({ 52 | input: question, 53 | context: await retriever.invoke(question) 54 | }); 55 | 56 | // Print the result ---------------------------------------------------------- 57 | 58 | console.log(`Answer for the question "${question}" using "${youtubeVideoUrl}":\n`); 59 | for await (const chunk of stream) { 60 | process.stdout.write(chunk ?? ""); 61 | yield chunk ?? ""; 62 | } 63 | console.log(); 64 | } 65 | -------------------------------------------------------------------------------- /src/local.js: -------------------------------------------------------------------------------- 1 | import "dotenv/config"; 2 | import { createStuffDocumentsChain } from "langchain/chains/combine_documents"; 3 | import { YoutubeLoader } from "@langchain/community/document_loaders/web/youtube"; 4 | import { RecursiveCharacterTextSplitter } from "langchain/text_splitter"; 5 | import { ChatPromptTemplate } from "@langchain/core/prompts"; 6 | 7 | import { ChatOllama, OllamaEmbeddings } from "@langchain/ollama"; 8 | import { FaissStore } from "@langchain/community/vectorstores/faiss"; 9 | 10 | const YOUTUBE_VIDEO_URL = "https://www.youtube.com/watch?v=FZhbJZEgKQ4"; 11 | const QUESTION = "What are the news about GPT-4 models?"; 12 | 13 | // Load documents ------------------------------------------------------------ 14 | 15 | console.log("Loading documents..."); 16 | 17 | const loader = YoutubeLoader.createFromUrl(YOUTUBE_VIDEO_URL, { 18 | language: "en", 19 | addVideoInfo: true, 20 | }); 21 | const rawDocuments = await loader.load(); 22 | const splitter = new RecursiveCharacterTextSplitter({ 23 | chunkSize: 1500, 24 | chunkOverlap: 200, 25 | }); 26 | const documents = await splitter.splitDocuments(rawDocuments); 27 | 28 | // Init models and DB -------------------------------------------------------- 29 | 30 | console.log("Initializing models and DB..."); 31 | 32 | const embeddings = new OllamaEmbeddings({ model: "nomic-embed-text" }); 33 | const model = new ChatOllama({ model: "llama3" }); 34 | const vectorStore = new FaissStore(embeddings, {}); 35 | 36 | console.log("Embedding documents..."); 37 | await vectorStore.addDocuments(documents); 38 | 39 | // Run the chain ------------------------------------------------------------- 40 | 41 | console.log("Running the chain..."); 42 | 43 | const questionAnsweringPrompt = ChatPromptTemplate.fromMessages([ 44 | ["system", "Answer the user's question using only the sources below:\n\n{context}"], 45 | ["human", "{input}"], 46 | ]); 47 | const retriever = vectorStore.asRetriever() 48 | const ragChain = await createStuffDocumentsChain({ 49 | prompt: questionAnsweringPrompt, 50 | llm: model, 51 | }); 52 | const stream = await ragChain.stream({ 53 | input: QUESTION, 54 | context: await retriever.invoke(QUESTION) 55 | }); 56 | 57 | // Print the result ---------------------------------------------------------- 58 | 59 | console.log(`Answer for the question "${QUESTION}":\n`); 60 | for await (const chunk of stream) { 61 | process.stdout.write(chunk ?? ""); 62 | } 63 | console.log(); 64 | --------------------------------------------------------------------------------