diff --git a/docs/core_docs/docs/concepts.mdx b/docs/core_docs/docs/concepts.mdx index aa50097cbeb2..e960dd18f315 100644 --- a/docs/core_docs/docs/concepts.mdx +++ b/docs/core_docs/docs/concepts.mdx @@ -437,7 +437,7 @@ Each DocumentLoader has its own specific parameters, but they can all be invoked An example use case is as follows: ```typescript -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; const loader = new CSVLoader(); // <-- Integration specific parameters here diff --git a/docs/core_docs/docs/how_to/chatbots_retrieval.ipynb b/docs/core_docs/docs/how_to/chatbots_retrieval.ipynb index e898e8911547..6266bbd5da33 100644 --- a/docs/core_docs/docs/how_to/chatbots_retrieval.ipynb +++ b/docs/core_docs/docs/how_to/chatbots_retrieval.ipynb @@ -67,7 +67,7 @@ ], "source": [ "import \"cheerio\";\n", - "import { CheerioWebBaseLoader } from \"langchain/document_loaders/web/cheerio\";\n", + "import { CheerioWebBaseLoader } from \"@langchain/community/document_loaders/web/cheerio\";\n", "\n", "const loader = new CheerioWebBaseLoader(\n", " \"https://docs.smith.langchain.com/user_guide\"\n", diff --git a/docs/core_docs/docs/how_to/document_loader_csv.mdx b/docs/core_docs/docs/how_to/document_loader_csv.mdx index 9536d8166c68..68d2df1da48d 100644 --- a/docs/core_docs/docs/how_to/document_loader_csv.mdx +++ b/docs/core_docs/docs/how_to/document_loader_csv.mdx @@ -23,7 +23,7 @@ id,text Example code: ```typescript -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; const loader = new CSVLoader("src/document_loaders/example_data/example.csv"); @@ -63,7 +63,7 @@ id,text Example code: ```typescript -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; const loader = new CSVLoader( "src/document_loaders/example_data/example.csv", diff --git a/docs/core_docs/docs/how_to/document_loader_directory.mdx b/docs/core_docs/docs/how_to/document_loader_directory.mdx index cad7f100db90..fab2718487af 100644 --- a/docs/core_docs/docs/how_to/document_loader_directory.mdx +++ b/docs/core_docs/docs/how_to/document_loader_directory.mdx @@ -23,7 +23,7 @@ import { JSONLinesLoader, } from "langchain/document_loaders/fs/json"; import { TextLoader } from "langchain/document_loaders/fs/text"; -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; const loader = new DirectoryLoader( "src/document_loaders/example_data/example", diff --git a/docs/core_docs/docs/how_to/extraction_long_text.ipynb b/docs/core_docs/docs/how_to/extraction_long_text.ipynb index 0e3f033d8ca4..510b76e5e28f 100644 --- a/docs/core_docs/docs/how_to/extraction_long_text.ipynb +++ b/docs/core_docs/docs/how_to/extraction_long_text.ipynb @@ -65,7 +65,7 @@ } ], "source": [ - "import { CheerioWebBaseLoader } from \"langchain/document_loaders/web/cheerio\";\n", + "import { CheerioWebBaseLoader } from \"@langchain/community/document_loaders/web/cheerio\";\n", "// Only required in a Deno notebook environment to load the peer dep.\n", "import \"cheerio\";\n", "\n", diff --git a/docs/core_docs/docs/how_to/qa_chat_history_how_to.ipynb b/docs/core_docs/docs/how_to/qa_chat_history_how_to.ipynb index e873ba55961b..2e276e92f1e2 100644 --- a/docs/core_docs/docs/how_to/qa_chat_history_how_to.ipynb +++ b/docs/core_docs/docs/how_to/qa_chat_history_how_to.ipynb @@ -77,7 +77,7 @@ "outputs": [], "source": [ "import \"cheerio\";\n", - "import { CheerioWebBaseLoader } from \"langchain/document_loaders/web/cheerio\";\n", + "import { CheerioWebBaseLoader } from \"@langchain/community/document_loaders/web/cheerio\";\n", "import { RecursiveCharacterTextSplitter } from \"langchain/text_splitter\";\n", "import { MemoryVectorStore } from \"langchain/vectorstores/memory\"\n", "import { OpenAIEmbeddings, ChatOpenAI } from \"@langchain/openai\";\n", diff --git a/docs/core_docs/docs/how_to/qa_sources.ipynb b/docs/core_docs/docs/how_to/qa_sources.ipynb index 638ad40d3c19..142f40e5909a 100644 --- a/docs/core_docs/docs/how_to/qa_sources.ipynb +++ b/docs/core_docs/docs/how_to/qa_sources.ipynb @@ -145,7 +145,7 @@ { "data": { "text/plain": [ - "\u001b[32m\"Task decomposition is a technique used to break down complex tasks into smaller and simpler steps. T\"\u001b[39m... 287 more characters" + "\u001b[32m\"Task decomposition is a technique used to break down complex tasks into smaller and simpler steps. T\"\u001b[39m... 254 more characters" ] }, "execution_count": 3, @@ -168,7 +168,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -213,11 +213,11 @@ " }\n", " }\n", " ],\n", - " answer: \u001b[32m\"Task decomposition is a technique used to break down complex tasks into smaller and simpler steps fo\"\u001b[39m... 232 more characters\n", + " answer: \u001b[32m\"Task decomposition is a technique used to break down complex tasks into smaller and simpler steps fo\"\u001b[39m... 230 more characters\n", "}" ] }, - "execution_count": 12, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -257,7 +257,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Check out the [LangSmith trace](https://smith.langchain.com/public/f07e78b6-cafc-41fd-af54-892c92263b09/r) here to see the internals of the chain.\n", + "Check out the [LangSmith trace](https://smith.langchain.com/public/c3753531-563c-40d4-a6bf-21bfe8741d10/r) here to see the internals of the chain.\n", "\n", "## Next steps\n", "\n", diff --git a/docs/core_docs/docs/how_to/qa_streaming.ipynb b/docs/core_docs/docs/how_to/qa_streaming.ipynb index 107bc383eb6d..6a301673dc3e 100644 --- a/docs/core_docs/docs/how_to/qa_streaming.ipynb +++ b/docs/core_docs/docs/how_to/qa_streaming.ipynb @@ -125,7 +125,7 @@ ], "source": [ "import \"cheerio\";\n", - "import { CheerioWebBaseLoader } from \"langchain/document_loaders/web/cheerio\";\n", + "import { CheerioWebBaseLoader } from \"@langchain/community/document_loaders/web/cheerio\";\n", "import { RecursiveCharacterTextSplitter } from \"langchain/text_splitter\";\n", "import { MemoryVectorStore } from \"langchain/vectorstores/memory\"\n", "import { OpenAIEmbeddings, ChatOpenAI } from \"@langchain/openai\";\n", diff --git a/docs/core_docs/docs/integrations/document_loaders/file_loaders/chatgpt.mdx b/docs/core_docs/docs/integrations/document_loaders/file_loaders/chatgpt.mdx index 120abd25aada..8e8ea32fdc40 100644 --- a/docs/core_docs/docs/integrations/document_loaders/file_loaders/chatgpt.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/file_loaders/chatgpt.mdx @@ -7,7 +7,7 @@ This example goes over how to load conversations.json from your ChatGPT data exp Example code: ```typescript -import { ChatGPTLoader } from "langchain/document_loaders/fs/chatgpt"; +import { ChatGPTLoader } from "@langchain/community/document_loaders/fs/chatgpt"; const loader = new ChatGPTLoader("./example_data/example_conversations.json"); @@ -21,7 +21,7 @@ console.log(docs); Example code: ```typescript -import { ChatGPTLoader } from "langchain/document_loaders/fs/chatgpt"; +import { ChatGPTLoader } from "@langchain/community/document_loaders/fs/chatgpt"; const loader = new ChatGPTLoader( "./example_data/example_conversations.json", diff --git a/docs/core_docs/docs/integrations/document_loaders/file_loaders/csv.mdx b/docs/core_docs/docs/integrations/document_loaders/file_loaders/csv.mdx index e482cd3717e3..e9adf18540a8 100644 --- a/docs/core_docs/docs/integrations/document_loaders/file_loaders/csv.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/file_loaders/csv.mdx @@ -21,7 +21,7 @@ id,text Example code: ```typescript -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; const loader = new CSVLoader("src/document_loaders/example_data/example.csv"); @@ -61,7 +61,7 @@ id,text Example code: ```typescript -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; const loader = new CSVLoader( "src/document_loaders/example_data/example.csv", diff --git a/docs/core_docs/docs/integrations/document_loaders/file_loaders/directory.mdx b/docs/core_docs/docs/integrations/document_loaders/file_loaders/directory.mdx index 675bd341dda6..a0c3f67ad700 100644 --- a/docs/core_docs/docs/integrations/document_loaders/file_loaders/directory.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/file_loaders/directory.mdx @@ -26,7 +26,7 @@ import { JSONLinesLoader, } from "langchain/document_loaders/fs/json"; import { TextLoader } from "langchain/document_loaders/fs/text"; -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; const loader = new DirectoryLoader( "src/document_loaders/example_data/example", diff --git a/docs/core_docs/docs/integrations/document_loaders/file_loaders/docx.mdx b/docs/core_docs/docs/integrations/document_loaders/file_loaders/docx.mdx index 605a15c0fbc2..95ce7b97dbda 100644 --- a/docs/core_docs/docs/integrations/document_loaders/file_loaders/docx.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/file_loaders/docx.mdx @@ -15,7 +15,7 @@ npm install mammoth # Usage ```typescript -import { DocxLoader } from "langchain/document_loaders/fs/docx"; +import { DocxLoader } from "@langchain/community/document_loaders/fs/docx"; const loader = new DocxLoader( "src/document_loaders/tests/example_data/attention.docx" diff --git a/docs/core_docs/docs/integrations/document_loaders/file_loaders/epub.mdx b/docs/core_docs/docs/integrations/document_loaders/file_loaders/epub.mdx index df9c1faaedad..7e0d6d2f5ebf 100644 --- a/docs/core_docs/docs/integrations/document_loaders/file_loaders/epub.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/file_loaders/epub.mdx @@ -15,7 +15,7 @@ npm install epub2 html-to-text # Usage, one document per chapter ```typescript -import { EPubLoader } from "langchain/document_loaders/fs/epub"; +import { EPubLoader } from "@langchain/community/document_loaders/fs/epub"; const loader = new EPubLoader("src/document_loaders/example_data/example.epub"); @@ -25,7 +25,7 @@ const docs = await loader.load(); # Usage, one document per file ```typescript -import { EPubLoader } from "langchain/document_loaders/fs/epub"; +import { EPubLoader } from "@langchain/community/document_loaders/fs/epub"; const loader = new EPubLoader( "src/document_loaders/example_data/example.epub", diff --git a/docs/core_docs/docs/integrations/document_loaders/file_loaders/pptx.mdx b/docs/core_docs/docs/integrations/document_loaders/file_loaders/pptx.mdx index 5f0f9fb72d43..bbddfec47843 100644 --- a/docs/core_docs/docs/integrations/document_loaders/file_loaders/pptx.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/file_loaders/pptx.mdx @@ -11,7 +11,7 @@ npm install officeparser ## Usage, one document per page ```typescript -import { PPTXLoader } from "langchain/document_loaders/fs/pptx"; +import { PPTXLoader } from "@langchain/community/document_loaders/fs/pptx"; const loader = new PPTXLoader("src/document_loaders/example_data/example.pptx"); diff --git a/docs/core_docs/docs/integrations/document_loaders/file_loaders/subtitles.mdx b/docs/core_docs/docs/integrations/document_loaders/file_loaders/subtitles.mdx index 035c51e903e2..e5164d5ae6e1 100644 --- a/docs/core_docs/docs/integrations/document_loaders/file_loaders/subtitles.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/file_loaders/subtitles.mdx @@ -15,7 +15,7 @@ npm install srt-parser-2 ## Usage ```typescript -import { SRTLoader } from "langchain/document_loaders/fs/srt"; +import { SRTLoader } from "@langchain/community/document_loaders/fs/srt"; const loader = new SRTLoader( "src/document_loaders/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.srt" diff --git a/docs/core_docs/docs/integrations/document_loaders/web_loaders/college_confidential.mdx b/docs/core_docs/docs/integrations/document_loaders/web_loaders/college_confidential.mdx index de141ce97f14..6bc1f62ab144 100644 --- a/docs/core_docs/docs/integrations/document_loaders/web_loaders/college_confidential.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/web_loaders/college_confidential.mdx @@ -15,7 +15,7 @@ npm install cheerio ## Usage ```typescript -import { CollegeConfidentialLoader } from "langchain/document_loaders/web/college_confidential"; +import { CollegeConfidentialLoader } from "@langchain/community/document_loaders/web/college_confidential"; const loader = new CollegeConfidentialLoader( "https://www.collegeconfidential.com/colleges/brown-university/" diff --git a/docs/core_docs/docs/integrations/document_loaders/web_loaders/couchbase.mdx b/docs/core_docs/docs/integrations/document_loaders/web_loaders/couchbase.mdx index 950a01fa354f..4b8fd86d819d 100644 --- a/docs/core_docs/docs/integrations/document_loaders/web_loaders/couchbase.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/web_loaders/couchbase.mdx @@ -24,7 +24,7 @@ For more details on connecting to a Couchbase cluster, please check the [Node.js For help with querying for documents using SQL++ (SQL for JSON), please check the [documentation](https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/index.html). ```typescript -import { CouchbaseDocumentLoader } from "langchain/document_loaders/web/couchbase"; +import { CouchbaseDocumentLoader } from "@langchain/community/document_loaders/web/couchbase"; import { Cluster } from "couchbase"; const connectionString = "couchbase://localhost"; // valid couchbase connection string diff --git a/docs/core_docs/docs/integrations/document_loaders/web_loaders/gitbook.mdx b/docs/core_docs/docs/integrations/document_loaders/web_loaders/gitbook.mdx index 06d88da2ecc7..c436e4551948 100644 --- a/docs/core_docs/docs/integrations/document_loaders/web_loaders/gitbook.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/web_loaders/gitbook.mdx @@ -15,7 +15,7 @@ npm install cheerio ## Load from single GitBook page ```typescript -import { GitbookLoader } from "langchain/document_loaders/web/gitbook"; +import { GitbookLoader } from "@langchain/community/document_loaders/web/gitbook"; const loader = new GitbookLoader( "https://docs.gitbook.com/product-tour/navigation" @@ -29,7 +29,7 @@ const docs = await loader.load(); For this to work, the GitbookLoader needs to be initialized with the root path (https://docs.gitbook.com in this example) and have `shouldLoadAllPaths` set to `true`. ```typescript -import { GitbookLoader } from "langchain/document_loaders/web/gitbook"; +import { GitbookLoader } from "@langchain/community/document_loaders/web/gitbook"; const loader = new GitbookLoader("https://docs.gitbook.com", { shouldLoadAllPaths: true, diff --git a/docs/core_docs/docs/integrations/document_loaders/web_loaders/hn.mdx b/docs/core_docs/docs/integrations/document_loaders/web_loaders/hn.mdx index 65d6b44d9e1d..6887bd375c0b 100644 --- a/docs/core_docs/docs/integrations/document_loaders/web_loaders/hn.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/web_loaders/hn.mdx @@ -15,7 +15,7 @@ npm install cheerio ## Usage ```typescript -import { HNLoader } from "langchain/document_loaders/web/hn"; +import { HNLoader } from "@langchain/community/document_loaders/web/hn"; const loader = new HNLoader("https://news.ycombinator.com/item?id=34817881"); diff --git a/docs/core_docs/docs/integrations/document_loaders/web_loaders/imsdb.mdx b/docs/core_docs/docs/integrations/document_loaders/web_loaders/imsdb.mdx index 27df8ee34f72..59b639096e17 100644 --- a/docs/core_docs/docs/integrations/document_loaders/web_loaders/imsdb.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/web_loaders/imsdb.mdx @@ -15,7 +15,7 @@ npm install cheerio ## Usage ```typescript -import { IMSDBLoader } from "langchain/document_loaders/web/imsdb"; +import { IMSDBLoader } from "@langchain/community/document_loaders/web/imsdb"; const loader = new IMSDBLoader("https://imsdb.com/scripts/BlacKkKlansman.html"); diff --git a/docs/core_docs/docs/integrations/document_loaders/web_loaders/recursive_url_loader.mdx b/docs/core_docs/docs/integrations/document_loaders/web_loaders/recursive_url_loader.mdx index 609edcc0996c..ddcb358c3056 100644 --- a/docs/core_docs/docs/integrations/document_loaders/web_loaders/recursive_url_loader.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/web_loaders/recursive_url_loader.mdx @@ -36,7 +36,7 @@ npm i html-to-text ```typescript import { compile } from "html-to-text"; -import { RecursiveUrlLoader } from "langchain/document_loaders/web/recursive_url"; +import { RecursiveUrlLoader } from "@langchain/community/document_loaders/web/recursive_url"; const url = "/docs/introduction"; diff --git a/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_cheerio.mdx b/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_cheerio.mdx index f4a468d6fcf2..a33912f424ae 100644 --- a/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_cheerio.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_cheerio.mdx @@ -21,7 +21,7 @@ npm install cheerio ## Usage ```typescript -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; const loader = new CheerioWebBaseLoader( "https://news.ycombinator.com/item?id=34817881" @@ -33,7 +33,7 @@ const docs = await loader.load(); ## Usage, with a custom selector ```typescript -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; const loader = new CheerioWebBaseLoader( "https://news.ycombinator.com/item?id=34817881", diff --git a/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_playwright.mdx b/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_playwright.mdx index 07771ac734d2..80dcf76759d6 100644 --- a/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_playwright.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_playwright.mdx @@ -26,7 +26,7 @@ npm install playwright ## Usage ```typescript -import { PlaywrightWebBaseLoader } from "langchain/document_loaders/web/playwright"; +import { PlaywrightWebBaseLoader } from "@langchain/community/document_loaders/web/playwright"; /** * Loader uses `page.content()` @@ -64,7 +64,7 @@ import { PlaywrightWebBaseLoader, Page, Browser, -} from "langchain/document_loaders/web/playwright"; +} from "@langchain/community/document_loaders/web/playwright"; const url = "https://www.tabnews.com.br/"; const loader = new PlaywrightWebBaseLoader(url); @@ -81,7 +81,7 @@ import { PlaywrightWebBaseLoader, Page, Browser, -} from "langchain/document_loaders/web/playwright"; +} from "@langchain/community/document_loaders/web/playwright"; const loader = new PlaywrightWebBaseLoader("https://www.tabnews.com.br/", { launchOptions: { diff --git a/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_puppeteer.mdx b/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_puppeteer.mdx index 5125443780a9..8398a175eec8 100644 --- a/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_puppeteer.mdx +++ b/docs/core_docs/docs/integrations/document_loaders/web_loaders/web_puppeteer.mdx @@ -26,7 +26,7 @@ npm install puppeteer ## Usage ```typescript -import { PuppeteerWebBaseLoader } from "langchain/document_loaders/web/puppeteer"; +import { PuppeteerWebBaseLoader } from "@langchain/community/document_loaders/web/puppeteer"; /** * Loader uses `page.evaluate(() => document.body.innerHTML)` diff --git a/docs/core_docs/docs/tutorials/agents.mdx b/docs/core_docs/docs/tutorials/agents.mdx index 65cb9094878a..abf836f1f152 100644 --- a/docs/core_docs/docs/tutorials/agents.mdx +++ b/docs/core_docs/docs/tutorials/agents.mdx @@ -62,7 +62,7 @@ We will also create a retriever over some data of our own. For a deeper explanat ```typescript import { RecursiveCharacterTextSplitter } from "langchain/text_splitter"; -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; import { MemoryVectorStore } from "langchain/vectorstores/memory"; import { OpenAIEmbeddings } from "@langchain/openai"; diff --git a/docs/core_docs/docs/tutorials/local_rag.ipynb b/docs/core_docs/docs/tutorials/local_rag.ipynb index c0e28eeab0cc..08d4fafa6e1c 100644 --- a/docs/core_docs/docs/tutorials/local_rag.ipynb +++ b/docs/core_docs/docs/tutorials/local_rag.ipynb @@ -62,7 +62,7 @@ "source": [ "import \"cheerio\";\n", "import { RecursiveCharacterTextSplitter } from \"langchain/text_splitter\";\n", - "import { CheerioWebBaseLoader } from \"langchain/document_loaders/web/cheerio\";" + "import { CheerioWebBaseLoader } from \"@langchain/community/document_loaders/web/cheerio\";" ] }, { diff --git a/docs/core_docs/docs/tutorials/qa_chat_history.ipynb b/docs/core_docs/docs/tutorials/qa_chat_history.ipynb index aec57f52724b..73e71987570d 100644 --- a/docs/core_docs/docs/tutorials/qa_chat_history.ipynb +++ b/docs/core_docs/docs/tutorials/qa_chat_history.ipynb @@ -85,7 +85,7 @@ "outputs": [], "source": [ "import \"cheerio\";\n", - "import { CheerioWebBaseLoader } from \"langchain/document_loaders/web/cheerio\";\n", + "import { CheerioWebBaseLoader } from \"@langchain/community/document_loaders/web/cheerio\";\n", "import { RecursiveCharacterTextSplitter } from \"langchain/text_splitter\";\n", "import { MemoryVectorStore } from \"langchain/vectorstores/memory\"\n", "import { OpenAIEmbeddings, ChatOpenAI } from \"@langchain/openai\";\n", diff --git a/docs/core_docs/docs/tutorials/rag.ipynb b/docs/core_docs/docs/tutorials/rag.ipynb index 33933b3c25e4..b7fbcbc1a44f 100644 --- a/docs/core_docs/docs/tutorials/rag.ipynb +++ b/docs/core_docs/docs/tutorials/rag.ipynb @@ -101,7 +101,7 @@ "outputs": [], "source": [ "import \"cheerio\";\n", - "import { CheerioWebBaseLoader } from \"langchain/document_loaders/web/cheerio\";\n", + "import { CheerioWebBaseLoader } from \"@langchain/community/document_loaders/web/cheerio\";\n", "import { RecursiveCharacterTextSplitter } from \"langchain/text_splitter\";\n", "import { MemoryVectorStore } from \"langchain/vectorstores/memory\"\n", "import { OpenAIEmbeddings, ChatOpenAI } from \"@langchain/openai\";\n", diff --git a/environment_tests/test-exports-bun/src/entrypoints.js b/environment_tests/test-exports-bun/src/entrypoints.js index 0127a63d1c08..5daa1a7ae0ae 100644 --- a/environment_tests/test-exports-bun/src/entrypoints.js +++ b/environment_tests/test-exports-bun/src/entrypoints.js @@ -28,10 +28,10 @@ export * from "langchain/memory"; export * from "langchain/memory/index"; export * from "langchain/memory/chat_memory"; export * from "langchain/document"; -export * from "langchain/document_loaders/base"; -export * from "langchain/document_loaders/web/searchapi"; -export * from "langchain/document_loaders/web/serpapi"; -export * from "langchain/document_loaders/web/sort_xyz_blockchain"; +export * from "@langchain/community/document_loaders/base"; +export * from "@langchain/community/document_loaders/web/searchapi"; +export * from "@langchain/community/document_loaders/web/serpapi"; +export * from "@langchain/community/document_loaders/web/sort_xyz_blockchain"; export * from "langchain/document_transformers/openai_functions"; export * from "langchain/callbacks"; export * from "langchain/output_parsers"; diff --git a/environment_tests/test-exports-bun/src/import.cjs b/environment_tests/test-exports-bun/src/import.cjs index b9fc2783d408..e2c3e6477774 100644 --- a/environment_tests/test-exports-bun/src/import.cjs +++ b/environment_tests/test-exports-bun/src/import.cjs @@ -6,7 +6,7 @@ async function test() { const { MemoryVectorStore } = await import("langchain/vectorstores/memory"); const { OpenAIEmbeddings } = await import("@langchain/openai"); const { Document } = await import("@langchain/core/documents"); - const { CSVLoader } = await import("langchain/document_loaders/fs/csv"); + const { CSVLoader } = await import("@langchain/community/document_loaders/fs/csv"); // Test exports assert(typeof OpenAI === "function"); diff --git a/environment_tests/test-exports-bun/src/index.js b/environment_tests/test-exports-bun/src/index.js index 46c07ac9d6bc..a486fa55a203 100644 --- a/environment_tests/test-exports-bun/src/index.js +++ b/environment_tests/test-exports-bun/src/index.js @@ -5,7 +5,7 @@ import { ChatPromptTemplate } from "@langchain/core/prompts"; import { MemoryVectorStore } from "langchain/vectorstores/memory"; import { OpenAIEmbeddings } from "@langchain/openai"; import { Document } from "@langchain/core/documents"; -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; import { CallbackManager } from "@langchain/core/callbacks/manager"; // Test exports diff --git a/environment_tests/test-exports-bun/src/index.ts b/environment_tests/test-exports-bun/src/index.ts index 12ec88e3320d..83798a420746 100644 --- a/environment_tests/test-exports-bun/src/index.ts +++ b/environment_tests/test-exports-bun/src/index.ts @@ -5,7 +5,7 @@ import { ChatPromptTemplate } from "@langchain/core/prompts"; import { MemoryVectorStore } from "langchain/vectorstores/memory"; import { OpenAIEmbeddings } from "@langchain/openai"; import { Document } from "@langchain/core/documents"; -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; async function test(useAzure: boolean = false) { // Test exports diff --git a/environment_tests/test-exports-bun/src/require.cjs b/environment_tests/test-exports-bun/src/require.cjs index d9aeede26252..160e70996ff9 100644 --- a/environment_tests/test-exports-bun/src/require.cjs +++ b/environment_tests/test-exports-bun/src/require.cjs @@ -5,7 +5,7 @@ const { ChatPromptTemplate } = require("@langchain/core/prompts"); const { MemoryVectorStore } = require("langchain/vectorstores/memory"); const { OpenAIEmbeddings } = require("@langchain/openai"); const { Document } = require("@langchain/core/documents"); -const { CSVLoader } = require("langchain/document_loaders/fs/csv"); +const { CSVLoader } = require("@langchain/community/document_loaders/fs/csv"); async function test() { // Test exports diff --git a/environment_tests/test-exports-cf/src/entrypoints.js b/environment_tests/test-exports-cf/src/entrypoints.js index 0127a63d1c08..5daa1a7ae0ae 100644 --- a/environment_tests/test-exports-cf/src/entrypoints.js +++ b/environment_tests/test-exports-cf/src/entrypoints.js @@ -28,10 +28,10 @@ export * from "langchain/memory"; export * from "langchain/memory/index"; export * from "langchain/memory/chat_memory"; export * from "langchain/document"; -export * from "langchain/document_loaders/base"; -export * from "langchain/document_loaders/web/searchapi"; -export * from "langchain/document_loaders/web/serpapi"; -export * from "langchain/document_loaders/web/sort_xyz_blockchain"; +export * from "@langchain/community/document_loaders/base"; +export * from "@langchain/community/document_loaders/web/searchapi"; +export * from "@langchain/community/document_loaders/web/serpapi"; +export * from "@langchain/community/document_loaders/web/sort_xyz_blockchain"; export * from "langchain/document_transformers/openai_functions"; export * from "langchain/callbacks"; export * from "langchain/output_parsers"; diff --git a/environment_tests/test-exports-cf/src/index.ts b/environment_tests/test-exports-cf/src/index.ts index 8061fff86ed6..0a196ce5397a 100644 --- a/environment_tests/test-exports-cf/src/index.ts +++ b/environment_tests/test-exports-cf/src/index.ts @@ -20,7 +20,7 @@ import { } from "@langchain/core/prompts"; import { OpenAI } from "@langchain/openai"; import { OpenAIEmbeddings } from "@langchain/openai"; -import { HNLoader } from "langchain/document_loaders/web/hn"; +import { HNLoader } from "@langchain/community/document_loaders/web/hn"; export interface Env { OPENAI_API_KEY?: string; diff --git a/environment_tests/test-exports-cjs/src/entrypoints.js b/environment_tests/test-exports-cjs/src/entrypoints.js index 5f9a19db39f2..aace9409a61a 100644 --- a/environment_tests/test-exports-cjs/src/entrypoints.js +++ b/environment_tests/test-exports-cjs/src/entrypoints.js @@ -28,10 +28,10 @@ const memory = require("langchain/memory"); const memory_index = require("langchain/memory/index"); const memory_chat_memory = require("langchain/memory/chat_memory"); const document = require("langchain/document"); -const document_loaders_base = require("langchain/document_loaders/base"); -const document_loaders_web_searchapi = require("langchain/document_loaders/web/searchapi"); -const document_loaders_web_serpapi = require("langchain/document_loaders/web/serpapi"); -const document_loaders_web_sort_xyz_blockchain = require("langchain/document_loaders/web/sort_xyz_blockchain"); +const document_loaders_base = require("@langchain/community/document_loaders/base"); +const document_loaders_web_searchapi = require("@langchain/community/document_loaders/web/searchapi"); +const document_loaders_web_serpapi = require("@langchain/community/document_loaders/web/serpapi"); +const document_loaders_web_sort_xyz_blockchain = require("@langchain/community/document_loaders/web/sort_xyz_blockchain"); const document_transformers_openai_functions = require("langchain/document_transformers/openai_functions"); const callbacks = require("langchain/callbacks"); const output_parsers = require("langchain/output_parsers"); diff --git a/environment_tests/test-exports-cjs/src/import.js b/environment_tests/test-exports-cjs/src/import.js index 18a6fd161c3a..ce375bf9b284 100644 --- a/environment_tests/test-exports-cjs/src/import.js +++ b/environment_tests/test-exports-cjs/src/import.js @@ -6,7 +6,7 @@ async function test() { const { HNSWLib } = await import("@langchain/community/vectorstores/hnswlib"); const { HuggingFaceTransformersEmbeddings } = await import("@langchain/community/embeddings/hf_transformers"); const { Document } = await import("@langchain/core/documents"); - const { CSVLoader } = await import("langchain/document_loaders/fs/csv"); + const { CSVLoader } = await import("@langchain/community/document_loaders/fs/csv"); // Test exports assert(typeof OpenAI === "function"); diff --git a/environment_tests/test-exports-cjs/src/index.mjs b/environment_tests/test-exports-cjs/src/index.mjs index 90028e732c3d..e0b99f3be778 100644 --- a/environment_tests/test-exports-cjs/src/index.mjs +++ b/environment_tests/test-exports-cjs/src/index.mjs @@ -5,7 +5,7 @@ import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { ChatPromptTemplate } from "@langchain/core/prompts"; import { HuggingFaceTransformersEmbeddings } from "@langchain/community/embeddings/hf_transformers"; import { Document } from "@langchain/core/documents"; -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; // Test exports assert(typeof OpenAI === "function"); diff --git a/environment_tests/test-exports-cjs/src/index.ts b/environment_tests/test-exports-cjs/src/index.ts index f28f606a28e0..a190d13203c1 100644 --- a/environment_tests/test-exports-cjs/src/index.ts +++ b/environment_tests/test-exports-cjs/src/index.ts @@ -5,7 +5,7 @@ import { ChatPromptTemplate } from "@langchain/core/prompts"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { HuggingFaceTransformersEmbeddings } from "@langchain/community/embeddings/hf_transformers"; import { Document } from "@langchain/core/documents"; -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; async function test(useAzure: boolean = false) { // Test exports diff --git a/environment_tests/test-exports-cjs/src/require.js b/environment_tests/test-exports-cjs/src/require.js index a9d0f32a12fc..e9124c0a8422 100644 --- a/environment_tests/test-exports-cjs/src/require.js +++ b/environment_tests/test-exports-cjs/src/require.js @@ -5,7 +5,7 @@ const { ChatPromptTemplate } = require("@langchain/core/prompts"); const { HNSWLib } = require("@langchain/community/vectorstores/hnswlib"); const { HuggingFaceTransformersEmbeddings } = require("@langchain/community/embeddings/hf_transformers"); const { Document } = require("@langchain/core/documents"); -const { CSVLoader } = require("langchain/document_loaders/fs/csv"); +const { CSVLoader } = require("@langchain/community/document_loaders/fs/csv"); async function test() { // Test exports diff --git a/environment_tests/test-exports-esbuild/src/entrypoints.js b/environment_tests/test-exports-esbuild/src/entrypoints.js index d3b76a743d8a..8d20c90d45b2 100644 --- a/environment_tests/test-exports-esbuild/src/entrypoints.js +++ b/environment_tests/test-exports-esbuild/src/entrypoints.js @@ -28,10 +28,10 @@ import * as memory from "langchain/memory"; import * as memory_index from "langchain/memory/index"; import * as memory_chat_memory from "langchain/memory/chat_memory"; import * as document from "langchain/document"; -import * as document_loaders_base from "langchain/document_loaders/base"; -import * as document_loaders_web_searchapi from "langchain/document_loaders/web/searchapi"; -import * as document_loaders_web_serpapi from "langchain/document_loaders/web/serpapi"; -import * as document_loaders_web_sort_xyz_blockchain from "langchain/document_loaders/web/sort_xyz_blockchain"; +import * as document_loaders_base from "@langchain/community/document_loaders/base"; +import * as document_loaders_web_searchapi from "@langchain/community/document_loaders/web/searchapi"; +import * as document_loaders_web_serpapi from "@langchain/community/document_loaders/web/serpapi"; +import * as document_loaders_web_sort_xyz_blockchain from "@langchain/community/document_loaders/web/sort_xyz_blockchain"; import * as document_transformers_openai_functions from "langchain/document_transformers/openai_functions"; import * as callbacks from "langchain/callbacks"; import * as output_parsers from "langchain/output_parsers"; diff --git a/environment_tests/test-exports-esbuild/src/import.cjs b/environment_tests/test-exports-esbuild/src/import.cjs index 0de8ec153bcf..b0a20377a600 100644 --- a/environment_tests/test-exports-esbuild/src/import.cjs +++ b/environment_tests/test-exports-esbuild/src/import.cjs @@ -6,7 +6,7 @@ async function test() { const { HNSWLib } = await import("@langchain/community/vectorstores/hnswlib"); const { OpenAIEmbeddings } = await import("@langchain/openai"); const { Document } = await import("@langchain/core/documents"); - const { CSVLoader } = await import("langchain/document_loaders/fs/csv"); + const { CSVLoader } = await import("@langchain/community/document_loaders/fs/csv"); // Test exports assert(typeof OpenAI === "function"); diff --git a/environment_tests/test-exports-esbuild/src/index.js b/environment_tests/test-exports-esbuild/src/index.js index 81f7dd48e4e7..b4abfa489369 100644 --- a/environment_tests/test-exports-esbuild/src/index.js +++ b/environment_tests/test-exports-esbuild/src/index.js @@ -5,7 +5,7 @@ import { ChatPromptTemplate } from "@langchain/core/prompts"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { OpenAIEmbeddings } from "@langchain/openai"; import { Document } from "@langchain/core/documents"; -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; import { CallbackManager } from "@langchain/core/callbacks/manager"; // Test exports diff --git a/environment_tests/test-exports-esbuild/src/require.cjs b/environment_tests/test-exports-esbuild/src/require.cjs index 8e2acb525ce8..9540bb5e84ee 100644 --- a/environment_tests/test-exports-esbuild/src/require.cjs +++ b/environment_tests/test-exports-esbuild/src/require.cjs @@ -5,7 +5,7 @@ const { ChatPromptTemplate } = require("@langchain/core/prompts"); const { HNSWLib } = require("@langchain/community/vectorstores/hnswlib"); const { OpenAIEmbeddings } = require("@langchain/openai"); const { Document } = require("@langchain/core/documents"); -const { CSVLoader } = require("langchain/document_loaders/fs/csv"); +const { CSVLoader } = require("@langchain/community/document_loaders/fs/csv"); async function test() { // Test exports diff --git a/environment_tests/test-exports-esbuild/src/typescript.ts b/environment_tests/test-exports-esbuild/src/typescript.ts index 7e611b34ba88..abe736070944 100644 --- a/environment_tests/test-exports-esbuild/src/typescript.ts +++ b/environment_tests/test-exports-esbuild/src/typescript.ts @@ -5,7 +5,7 @@ import { ChatPromptTemplate } from "@langchain/core/prompts"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { OpenAIEmbeddings } from "@langchain/openai"; import { Document } from "@langchain/core/documents"; -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; async function test(useAzure: boolean = false) { // Test exports diff --git a/environment_tests/test-exports-esm/src/entrypoints.js b/environment_tests/test-exports-esm/src/entrypoints.js index d3b76a743d8a..8d20c90d45b2 100644 --- a/environment_tests/test-exports-esm/src/entrypoints.js +++ b/environment_tests/test-exports-esm/src/entrypoints.js @@ -28,10 +28,10 @@ import * as memory from "langchain/memory"; import * as memory_index from "langchain/memory/index"; import * as memory_chat_memory from "langchain/memory/chat_memory"; import * as document from "langchain/document"; -import * as document_loaders_base from "langchain/document_loaders/base"; -import * as document_loaders_web_searchapi from "langchain/document_loaders/web/searchapi"; -import * as document_loaders_web_serpapi from "langchain/document_loaders/web/serpapi"; -import * as document_loaders_web_sort_xyz_blockchain from "langchain/document_loaders/web/sort_xyz_blockchain"; +import * as document_loaders_base from "@langchain/community/document_loaders/base"; +import * as document_loaders_web_searchapi from "@langchain/community/document_loaders/web/searchapi"; +import * as document_loaders_web_serpapi from "@langchain/community/document_loaders/web/serpapi"; +import * as document_loaders_web_sort_xyz_blockchain from "@langchain/community/document_loaders/web/sort_xyz_blockchain"; import * as document_transformers_openai_functions from "langchain/document_transformers/openai_functions"; import * as callbacks from "langchain/callbacks"; import * as output_parsers from "langchain/output_parsers"; diff --git a/environment_tests/test-exports-esm/src/import.cjs b/environment_tests/test-exports-esm/src/import.cjs index 7641af80677b..4f256de0bfa5 100644 --- a/environment_tests/test-exports-esm/src/import.cjs +++ b/environment_tests/test-exports-esm/src/import.cjs @@ -6,7 +6,7 @@ async function test() { const { HNSWLib } = await import("@langchain/community/vectorstores/hnswlib"); const { HuggingFaceTransformersEmbeddings } = await import("@langchain/community/embeddings/hf_transformers"); const { Document } = await import("@langchain/core/documents"); - const { CSVLoader } = await import("langchain/document_loaders/fs/csv"); + const { CSVLoader } = await import("@langchain/community/document_loaders/fs/csv"); // Test exports assert(typeof OpenAI === "function"); diff --git a/environment_tests/test-exports-esm/src/index.js b/environment_tests/test-exports-esm/src/index.js index 952081a6c5af..6478bbcaece2 100644 --- a/environment_tests/test-exports-esm/src/index.js +++ b/environment_tests/test-exports-esm/src/index.js @@ -5,7 +5,7 @@ import { ChatPromptTemplate } from "@langchain/core/prompts"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { HuggingFaceTransformersEmbeddings } from "@langchain/community/embeddings/hf_transformers"; import { Document } from "@langchain/core/documents"; -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; import { CallbackManager } from "@langchain/core/callbacks/manager"; // Test exports diff --git a/environment_tests/test-exports-esm/src/index.ts b/environment_tests/test-exports-esm/src/index.ts index 8dcd5f46aeb1..0e3d688a0461 100644 --- a/environment_tests/test-exports-esm/src/index.ts +++ b/environment_tests/test-exports-esm/src/index.ts @@ -5,7 +5,7 @@ import { ChatPromptTemplate } from "@langchain/core/prompts"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { HuggingFaceTransformersEmbeddings } from "@langchain/community/embeddings/hf_transformers"; import { Document } from "@langchain/core/documents"; -import { CSVLoader } from "langchain/document_loaders/fs/csv"; +import { CSVLoader } from "@langchain/community/document_loaders/fs/csv"; async function test(useAzure: boolean = false) { // Test exports diff --git a/environment_tests/test-exports-esm/src/require.cjs b/environment_tests/test-exports-esm/src/require.cjs index 4652414d937b..edb1f7b60f7d 100644 --- a/environment_tests/test-exports-esm/src/require.cjs +++ b/environment_tests/test-exports-esm/src/require.cjs @@ -5,7 +5,7 @@ const { ChatPromptTemplate } = require("@langchain/core/prompts"); const { HNSWLib } = require("@langchain/community/vectorstores/hnswlib"); const { HuggingFaceTransformersEmbeddings } = require("@langchain/community/embeddings/hf_transformers"); const { Document } = require("@langchain/core/documents"); -const { CSVLoader } = require("langchain/document_loaders/fs/csv"); +const { CSVLoader } = require("@langchain/community/document_loaders/fs/csv"); async function test() { // Test exports diff --git a/environment_tests/test-exports-vercel/src/entrypoints.js b/environment_tests/test-exports-vercel/src/entrypoints.js index 0127a63d1c08..5daa1a7ae0ae 100644 --- a/environment_tests/test-exports-vercel/src/entrypoints.js +++ b/environment_tests/test-exports-vercel/src/entrypoints.js @@ -28,10 +28,10 @@ export * from "langchain/memory"; export * from "langchain/memory/index"; export * from "langchain/memory/chat_memory"; export * from "langchain/document"; -export * from "langchain/document_loaders/base"; -export * from "langchain/document_loaders/web/searchapi"; -export * from "langchain/document_loaders/web/serpapi"; -export * from "langchain/document_loaders/web/sort_xyz_blockchain"; +export * from "@langchain/community/document_loaders/base"; +export * from "@langchain/community/document_loaders/web/searchapi"; +export * from "@langchain/community/document_loaders/web/serpapi"; +export * from "@langchain/community/document_loaders/web/sort_xyz_blockchain"; export * from "langchain/document_transformers/openai_functions"; export * from "langchain/callbacks"; export * from "langchain/output_parsers"; diff --git a/environment_tests/test-exports-vite/src/entrypoints.js b/environment_tests/test-exports-vite/src/entrypoints.js index 0127a63d1c08..5daa1a7ae0ae 100644 --- a/environment_tests/test-exports-vite/src/entrypoints.js +++ b/environment_tests/test-exports-vite/src/entrypoints.js @@ -28,10 +28,10 @@ export * from "langchain/memory"; export * from "langchain/memory/index"; export * from "langchain/memory/chat_memory"; export * from "langchain/document"; -export * from "langchain/document_loaders/base"; -export * from "langchain/document_loaders/web/searchapi"; -export * from "langchain/document_loaders/web/serpapi"; -export * from "langchain/document_loaders/web/sort_xyz_blockchain"; +export * from "@langchain/community/document_loaders/base"; +export * from "@langchain/community/document_loaders/web/searchapi"; +export * from "@langchain/community/document_loaders/web/serpapi"; +export * from "@langchain/community/document_loaders/web/sort_xyz_blockchain"; export * from "langchain/document_transformers/openai_functions"; export * from "langchain/callbacks"; export * from "langchain/output_parsers"; diff --git a/examples/src/agents/quickstart.ts b/examples/src/agents/quickstart.ts index d1c81a6937c2..fafed334e259 100644 --- a/examples/src/agents/quickstart.ts +++ b/examples/src/agents/quickstart.ts @@ -8,7 +8,7 @@ import type { ChatPromptTemplate } from "@langchain/core/prompts"; import { createRetrieverTool } from "langchain/tools/retriever"; import { AgentExecutor, createOpenAIFunctionsAgent } from "langchain/agents"; import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters"; -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; import { MemoryVectorStore } from "langchain/vectorstores/memory"; import { ChatMessageHistory } from "@langchain/community/stores/message/in_memory"; diff --git a/examples/src/document_loaders/apify_dataset_existing.ts b/examples/src/document_loaders/apify_dataset_existing.ts index 8a8428e48080..d9a647ad7403 100644 --- a/examples/src/document_loaders/apify_dataset_existing.ts +++ b/examples/src/document_loaders/apify_dataset_existing.ts @@ -1,4 +1,4 @@ -import { ApifyDatasetLoader } from "langchain/document_loaders/web/apify_dataset"; +import { ApifyDatasetLoader } from "@langchain/community/document_loaders/web/apify_dataset"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { OpenAIEmbeddings, ChatOpenAI } from "@langchain/openai"; import { Document } from "@langchain/core/documents"; diff --git a/examples/src/document_loaders/apify_dataset_new.ts b/examples/src/document_loaders/apify_dataset_new.ts index b6d3b9d80bdb..e0c8718c481e 100644 --- a/examples/src/document_loaders/apify_dataset_new.ts +++ b/examples/src/document_loaders/apify_dataset_new.ts @@ -1,4 +1,4 @@ -import { ApifyDatasetLoader } from "langchain/document_loaders/web/apify_dataset"; +import { ApifyDatasetLoader } from "@langchain/community/document_loaders/web/apify_dataset"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { OpenAIEmbeddings, ChatOpenAI } from "@langchain/openai"; import { Document } from "@langchain/core/documents"; diff --git a/examples/src/document_loaders/assemblyai_audio_transcription.ts b/examples/src/document_loaders/assemblyai_audio_transcription.ts index 19b6f550bcc2..f2ccf28ddeb2 100644 --- a/examples/src/document_loaders/assemblyai_audio_transcription.ts +++ b/examples/src/document_loaders/assemblyai_audio_transcription.ts @@ -2,7 +2,7 @@ import { AudioTranscriptLoader, // AudioTranscriptParagraphsLoader, // AudioTranscriptSentencesLoader -} from "langchain/document_loaders/web/assemblyai"; +} from "@langchain/community/document_loaders/web/assemblyai"; // You can also use a local file path and the loader will upload it to AssemblyAI for you. const audioUrl = "https://storage.googleapis.com/aai-docs-samples/espn.m4a"; diff --git a/examples/src/document_loaders/assemblyai_subtitles.ts b/examples/src/document_loaders/assemblyai_subtitles.ts index c765941941fe..a2246427b01b 100644 --- a/examples/src/document_loaders/assemblyai_subtitles.ts +++ b/examples/src/document_loaders/assemblyai_subtitles.ts @@ -1,4 +1,4 @@ -import { AudioSubtitleLoader } from "langchain/document_loaders/web/assemblyai"; +import { AudioSubtitleLoader } from "@langchain/community/document_loaders/web/assemblyai"; // You can also use a local file path and the loader will upload it to AssemblyAI for you. const audioUrl = "https://storage.googleapis.com/aai-docs-samples/espn.m4a"; diff --git a/examples/src/document_loaders/azure_blob_storage_container.ts b/examples/src/document_loaders/azure_blob_storage_container.ts index 995b40488676..bce98b6297dc 100644 --- a/examples/src/document_loaders/azure_blob_storage_container.ts +++ b/examples/src/document_loaders/azure_blob_storage_container.ts @@ -1,4 +1,4 @@ -import { AzureBlobStorageContainerLoader } from "langchain/document_loaders/web/azure_blob_storage_container"; +import { AzureBlobStorageContainerLoader } from "@langchain/community/document_loaders/web/azure_blob_storage_container"; const loader = new AzureBlobStorageContainerLoader({ azureConfig: { diff --git a/examples/src/document_loaders/azure_blob_storage_file.ts b/examples/src/document_loaders/azure_blob_storage_file.ts index e9a6e4745914..2dd214af3c0d 100644 --- a/examples/src/document_loaders/azure_blob_storage_file.ts +++ b/examples/src/document_loaders/azure_blob_storage_file.ts @@ -1,4 +1,4 @@ -import { AzureBlobStorageFileLoader } from "langchain/document_loaders/web/azure_blob_storage_file"; +import { AzureBlobStorageFileLoader } from "@langchain/community/document_loaders/web/azure_blob_storage_file"; const loader = new AzureBlobStorageFileLoader({ azureConfig: { diff --git a/examples/src/document_loaders/cheerio_web.ts b/examples/src/document_loaders/cheerio_web.ts index 4297e85746d8..41c0b57f621e 100644 --- a/examples/src/document_loaders/cheerio_web.ts +++ b/examples/src/document_loaders/cheerio_web.ts @@ -1,4 +1,4 @@ -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; export const run = async () => { const loader = new CheerioWebBaseLoader( diff --git a/examples/src/document_loaders/college_confidential.ts b/examples/src/document_loaders/college_confidential.ts index 22b4b09003f5..0cec39f0cad8 100644 --- a/examples/src/document_loaders/college_confidential.ts +++ b/examples/src/document_loaders/college_confidential.ts @@ -1,4 +1,4 @@ -import { CollegeConfidentialLoader } from "langchain/document_loaders/web/college_confidential"; +import { CollegeConfidentialLoader } from "@langchain/community/document_loaders/web/college_confidential"; export const run = async () => { const loader = new CollegeConfidentialLoader( diff --git a/examples/src/document_loaders/confluence.ts b/examples/src/document_loaders/confluence.ts index e9d6e265f16c..e43c62475982 100644 --- a/examples/src/document_loaders/confluence.ts +++ b/examples/src/document_loaders/confluence.ts @@ -1,4 +1,4 @@ -import { ConfluencePagesLoader } from "langchain/document_loaders/web/confluence"; +import { ConfluencePagesLoader } from "@langchain/community/document_loaders/web/confluence"; const username = process.env.CONFLUENCE_USERNAME; const accessToken = process.env.CONFLUENCE_ACCESS_TOKEN; diff --git a/examples/src/document_loaders/figma.ts b/examples/src/document_loaders/figma.ts index cce678766c9a..ade401ebe981 100644 --- a/examples/src/document_loaders/figma.ts +++ b/examples/src/document_loaders/figma.ts @@ -1,4 +1,4 @@ -import { FigmaFileLoader } from "langchain/document_loaders/web/figma"; +import { FigmaFileLoader } from "@langchain/community/document_loaders/web/figma"; const loader = new FigmaFileLoader({ accessToken: "FIGMA_ACCESS_TOKEN", // or load it from process.env.FIGMA_ACCESS_TOKEN diff --git a/examples/src/document_loaders/gitbook.ts b/examples/src/document_loaders/gitbook.ts index 454efaf2bb2a..7b2078fc0342 100644 --- a/examples/src/document_loaders/gitbook.ts +++ b/examples/src/document_loaders/gitbook.ts @@ -1,4 +1,4 @@ -import { GitbookLoader } from "langchain/document_loaders/web/gitbook"; +import { GitbookLoader } from "@langchain/community/document_loaders/web/gitbook"; export const run = async () => { const loader = new GitbookLoader("https://docs.gitbook.com"); diff --git a/examples/src/document_loaders/github.ts b/examples/src/document_loaders/github.ts index fd5b9d51ae34..eae1b6e1f7b0 100644 --- a/examples/src/document_loaders/github.ts +++ b/examples/src/document_loaders/github.ts @@ -1,4 +1,4 @@ -import { GithubRepoLoader } from "langchain/document_loaders/web/github"; +import { GithubRepoLoader } from "@langchain/community/document_loaders/web/github"; export const run = async () => { const loader = new GithubRepoLoader( diff --git a/examples/src/document_loaders/github_custom_instance.ts b/examples/src/document_loaders/github_custom_instance.ts index 69368d2c0ae1..f29b6e24cd9a 100644 --- a/examples/src/document_loaders/github_custom_instance.ts +++ b/examples/src/document_loaders/github_custom_instance.ts @@ -1,4 +1,4 @@ -import { GithubRepoLoader } from "langchain/document_loaders/web/github"; +import { GithubRepoLoader } from "@langchain/community/document_loaders/web/github"; export const run = async () => { const loader = new GithubRepoLoader( diff --git a/examples/src/document_loaders/github_ignore_paths.ts b/examples/src/document_loaders/github_ignore_paths.ts index 254271ab216e..6021e826d7bb 100644 --- a/examples/src/document_loaders/github_ignore_paths.ts +++ b/examples/src/document_loaders/github_ignore_paths.ts @@ -1,4 +1,4 @@ -import { GithubRepoLoader } from "langchain/document_loaders/web/github"; +import { GithubRepoLoader } from "@langchain/community/document_loaders/web/github"; export const run = async () => { const loader = new GithubRepoLoader( diff --git a/examples/src/document_loaders/github_stream.ts b/examples/src/document_loaders/github_stream.ts index c34e65af9d0d..a5e3c18ea206 100644 --- a/examples/src/document_loaders/github_stream.ts +++ b/examples/src/document_loaders/github_stream.ts @@ -1,4 +1,4 @@ -import { GithubRepoLoader } from "langchain/document_loaders/web/github"; +import { GithubRepoLoader } from "@langchain/community/document_loaders/web/github"; export const run = async () => { const loader = new GithubRepoLoader( diff --git a/examples/src/document_loaders/github_submodules.ts b/examples/src/document_loaders/github_submodules.ts index 54b726a40fa7..de1929163a62 100644 --- a/examples/src/document_loaders/github_submodules.ts +++ b/examples/src/document_loaders/github_submodules.ts @@ -1,4 +1,4 @@ -import { GithubRepoLoader } from "langchain/document_loaders/web/github"; +import { GithubRepoLoader } from "@langchain/community/document_loaders/web/github"; export const run = async () => { const loader = new GithubRepoLoader( diff --git a/examples/src/document_loaders/hn.ts b/examples/src/document_loaders/hn.ts index d84b5afbefb2..fa62c8c9cf72 100644 --- a/examples/src/document_loaders/hn.ts +++ b/examples/src/document_loaders/hn.ts @@ -1,4 +1,4 @@ -import { HNLoader } from "langchain/document_loaders/web/hn"; +import { HNLoader } from "@langchain/community/document_loaders/web/hn"; export const run = async () => { const loader = new HNLoader("https://news.ycombinator.com/item?id=34817881"); diff --git a/examples/src/document_loaders/imsdb.ts b/examples/src/document_loaders/imsdb.ts index 96a397be805c..7e11a30493f4 100644 --- a/examples/src/document_loaders/imsdb.ts +++ b/examples/src/document_loaders/imsdb.ts @@ -1,4 +1,4 @@ -import { IMSDBLoader } from "langchain/document_loaders/web/imsdb"; +import { IMSDBLoader } from "@langchain/community/document_loaders/web/imsdb"; export const run = async () => { const loader = new IMSDBLoader( diff --git a/examples/src/document_loaders/notion_markdown.ts b/examples/src/document_loaders/notion_markdown.ts index a6927a0887e7..ff055a928156 100644 --- a/examples/src/document_loaders/notion_markdown.ts +++ b/examples/src/document_loaders/notion_markdown.ts @@ -1,4 +1,4 @@ -import { NotionLoader } from "langchain/document_loaders/fs/notion"; +import { NotionLoader } from "@langchain/community/document_loaders/fs/notion"; export const run = async () => { /** Provide the directory path of your notion folder */ diff --git a/examples/src/document_loaders/notionapi.ts b/examples/src/document_loaders/notionapi.ts index 81a7039690f7..25161b1a5b20 100644 --- a/examples/src/document_loaders/notionapi.ts +++ b/examples/src/document_loaders/notionapi.ts @@ -1,4 +1,4 @@ -import { NotionAPILoader } from "langchain/document_loaders/web/notionapi"; +import { NotionAPILoader } from "@langchain/community/document_loaders/web/notionapi"; import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters"; // Loading a page (including child pages all as separate documents) diff --git a/examples/src/document_loaders/obsidian.ts b/examples/src/document_loaders/obsidian.ts index 279618b0d75d..2f25a3b3c36b 100644 --- a/examples/src/document_loaders/obsidian.ts +++ b/examples/src/document_loaders/obsidian.ts @@ -1,4 +1,4 @@ -import { ObsidianLoader } from "langchain/document_loaders/fs/obsidian"; +import { ObsidianLoader } from "@langchain/community/document_loaders/fs/obsidian"; export const run = async () => { const loader = new ObsidianLoader( diff --git a/examples/src/document_loaders/openai_whisper_audio.ts b/examples/src/document_loaders/openai_whisper_audio.ts index e37a711e2b40..69b4b93ff45e 100644 --- a/examples/src/document_loaders/openai_whisper_audio.ts +++ b/examples/src/document_loaders/openai_whisper_audio.ts @@ -1,4 +1,4 @@ -import { OpenAIWhisperAudio } from "langchain/document_loaders/fs/openai_whisper_audio"; +import { OpenAIWhisperAudio } from "@langchain/community/document_loaders/fs/openai_whisper_audio"; const filePath = "./src/document_loaders/example_data/test.mp3"; diff --git a/examples/src/document_loaders/parse_sitemap.ts b/examples/src/document_loaders/parse_sitemap.ts index 8d86fdf5a3fd..d430fef0c402 100644 --- a/examples/src/document_loaders/parse_sitemap.ts +++ b/examples/src/document_loaders/parse_sitemap.ts @@ -1,4 +1,4 @@ -import { SitemapLoader } from "langchain/document_loaders/web/sitemap"; +import { SitemapLoader } from "@langchain/community/document_loaders/web/sitemap"; const loader = new SitemapLoader("https://www.langchain.com/"); diff --git a/examples/src/document_loaders/ppt.ts b/examples/src/document_loaders/ppt.ts index 5b5fc3817d5e..4c7552945d92 100644 --- a/examples/src/document_loaders/ppt.ts +++ b/examples/src/document_loaders/ppt.ts @@ -1,4 +1,4 @@ -import { PPTXLoader } from "langchain/document_loaders/fs/pptx"; +import { PPTXLoader } from "@langchain/community/document_loaders/fs/pptx"; export const run = async () => { const loader = new PPTXLoader( diff --git a/examples/src/document_loaders/puppeteer_screenshot_web.ts b/examples/src/document_loaders/puppeteer_screenshot_web.ts index e6ee5556b9eb..dd3ed09a6484 100644 --- a/examples/src/document_loaders/puppeteer_screenshot_web.ts +++ b/examples/src/document_loaders/puppeteer_screenshot_web.ts @@ -1,4 +1,4 @@ -import { PuppeteerWebBaseLoader } from "langchain/document_loaders/web/puppeteer"; +import { PuppeteerWebBaseLoader } from "@langchain/community/document_loaders/web/puppeteer"; const loaderWithOptions = new PuppeteerWebBaseLoader("https://langchain.com", { launchOptions: { diff --git a/examples/src/document_loaders/puppeteer_web.ts b/examples/src/document_loaders/puppeteer_web.ts index 47f09ebea43f..cd4d9553fba4 100644 --- a/examples/src/document_loaders/puppeteer_web.ts +++ b/examples/src/document_loaders/puppeteer_web.ts @@ -1,4 +1,4 @@ -import { PuppeteerWebBaseLoader } from "langchain/document_loaders/web/puppeteer"; +import { PuppeteerWebBaseLoader } from "@langchain/community/document_loaders/web/puppeteer"; const loaderWithOptions = new PuppeteerWebBaseLoader( "https://www.tabnews.com.br/", diff --git a/examples/src/document_loaders/s3.ts b/examples/src/document_loaders/s3.ts index ccbf736fe43e..cc834cbb1386 100644 --- a/examples/src/document_loaders/s3.ts +++ b/examples/src/document_loaders/s3.ts @@ -1,4 +1,4 @@ -import { S3Loader } from "langchain/document_loaders/web/s3"; +import { S3Loader } from "@langchain/community/document_loaders/web/s3"; const loader = new S3Loader({ bucket: "my-document-bucket-123", diff --git a/examples/src/document_loaders/searchapi.ts b/examples/src/document_loaders/searchapi.ts index 8dce85e04b9b..32b897b94b72 100644 --- a/examples/src/document_loaders/searchapi.ts +++ b/examples/src/document_loaders/searchapi.ts @@ -1,7 +1,7 @@ import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai"; import { MemoryVectorStore } from "langchain/vectorstores/memory"; import { TokenTextSplitter } from "@langchain/textsplitters"; -import { SearchApiLoader } from "langchain/document_loaders/web/searchapi"; +import { SearchApiLoader } from "@langchain/community/document_loaders/web/searchapi"; import { ChatPromptTemplate } from "@langchain/core/prompts"; import { createStuffDocumentsChain } from "langchain/chains/combine_documents"; import { createRetrievalChain } from "langchain/chains/retrieval"; diff --git a/examples/src/document_loaders/serpapi.ts b/examples/src/document_loaders/serpapi.ts index dcccebfc6b03..d697489695cf 100644 --- a/examples/src/document_loaders/serpapi.ts +++ b/examples/src/document_loaders/serpapi.ts @@ -1,6 +1,6 @@ import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai"; import { MemoryVectorStore } from "langchain/vectorstores/memory"; -import { SerpAPILoader } from "langchain/document_loaders/web/serpapi"; +import { SerpAPILoader } from "@langchain/community/document_loaders/web/serpapi"; import { ChatPromptTemplate } from "@langchain/core/prompts"; import { createStuffDocumentsChain } from "langchain/chains/combine_documents"; import { createRetrievalChain } from "langchain/chains/retrieval"; diff --git a/examples/src/document_loaders/sitemap.ts b/examples/src/document_loaders/sitemap.ts index ca3a8298b243..25b004d944d4 100644 --- a/examples/src/document_loaders/sitemap.ts +++ b/examples/src/document_loaders/sitemap.ts @@ -1,4 +1,4 @@ -import { SitemapLoader } from "langchain/document_loaders/web/sitemap"; +import { SitemapLoader } from "@langchain/community/document_loaders/web/sitemap"; const loader = new SitemapLoader("https://www.langchain.com/"); diff --git a/examples/src/document_loaders/sonix_audio_transcription.ts b/examples/src/document_loaders/sonix_audio_transcription.ts index 7f48f2db6ed4..d57211befe82 100644 --- a/examples/src/document_loaders/sonix_audio_transcription.ts +++ b/examples/src/document_loaders/sonix_audio_transcription.ts @@ -1,4 +1,4 @@ -import { SonixAudioTranscriptionLoader } from "langchain/document_loaders/web/sonix_audio"; +import { SonixAudioTranscriptionLoader } from "@langchain/community/document_loaders/web/sonix_audio"; const loader = new SonixAudioTranscriptionLoader({ sonixAuthKey: "SONIX_AUTH_KEY", diff --git a/examples/src/document_loaders/sort_xyz_blockchain.ts b/examples/src/document_loaders/sort_xyz_blockchain.ts index b78a66e73b0d..c643d215cac9 100644 --- a/examples/src/document_loaders/sort_xyz_blockchain.ts +++ b/examples/src/document_loaders/sort_xyz_blockchain.ts @@ -1,4 +1,4 @@ -import { SortXYZBlockchainLoader } from "langchain/document_loaders/web/sort_xyz_blockchain"; +import { SortXYZBlockchainLoader } from "@langchain/community/document_loaders/web/sort_xyz_blockchain"; import { OpenAI } from "@langchain/openai"; /** diff --git a/examples/src/document_loaders/srt.ts b/examples/src/document_loaders/srt.ts index bee6f06d3c22..8473456435cf 100644 --- a/examples/src/document_loaders/srt.ts +++ b/examples/src/document_loaders/srt.ts @@ -1,4 +1,4 @@ -import { SRTLoader } from "langchain/document_loaders/fs/srt"; +import { SRTLoader } from "@langchain/community/document_loaders/fs/srt"; export const run = async () => { const loader = new SRTLoader( diff --git a/examples/src/document_loaders/unstructured.ts b/examples/src/document_loaders/unstructured.ts index d4cb2dbe1e9d..a6e925ef7953 100644 --- a/examples/src/document_loaders/unstructured.ts +++ b/examples/src/document_loaders/unstructured.ts @@ -1,4 +1,4 @@ -import { UnstructuredLoader } from "langchain/document_loaders/fs/unstructured"; +import { UnstructuredLoader } from "@langchain/community/document_loaders/fs/unstructured"; const options = { apiKey: "MY_API_KEY", diff --git a/examples/src/document_loaders/unstructured_directory.ts b/examples/src/document_loaders/unstructured_directory.ts index 8e751823e5b9..944f9729693e 100644 --- a/examples/src/document_loaders/unstructured_directory.ts +++ b/examples/src/document_loaders/unstructured_directory.ts @@ -1,4 +1,4 @@ -import { UnstructuredDirectoryLoader } from "langchain/document_loaders/fs/unstructured"; +import { UnstructuredDirectoryLoader } from "@langchain/community/document_loaders/fs/unstructured"; const options = { apiKey: "MY_API_KEY", diff --git a/examples/src/document_loaders/youtube.ts b/examples/src/document_loaders/youtube.ts index d731d1b91514..373876461150 100644 --- a/examples/src/document_loaders/youtube.ts +++ b/examples/src/document_loaders/youtube.ts @@ -1,4 +1,4 @@ -import { YoutubeLoader } from "langchain/document_loaders/web/youtube"; +import { YoutubeLoader } from "@langchain/community/document_loaders/web/youtube"; const loader = YoutubeLoader.createFromUrl("https://youtu.be/bZQun8Y4L2A", { language: "en", diff --git a/examples/src/document_transformers/html_to_text.ts b/examples/src/document_transformers/html_to_text.ts index c00a36b43553..18724f49a726 100644 --- a/examples/src/document_transformers/html_to_text.ts +++ b/examples/src/document_transformers/html_to_text.ts @@ -1,4 +1,4 @@ -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters"; import { HtmlToTextTransformer } from "@langchain/community/document_transformers/html_to_text"; diff --git a/examples/src/document_transformers/mozilla_readability.ts b/examples/src/document_transformers/mozilla_readability.ts index 5036b9b3066c..b3ac3c2b155a 100644 --- a/examples/src/document_transformers/mozilla_readability.ts +++ b/examples/src/document_transformers/mozilla_readability.ts @@ -1,4 +1,4 @@ -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; import { MozillaReadabilityTransformer } from "@langchain/community/document_transformers/mozilla_readability"; import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters"; diff --git a/examples/src/embeddings/cache_backed_redis.ts b/examples/src/embeddings/cache_backed_redis.ts index 1798264019c7..98bdafb095ee 100644 --- a/examples/src/embeddings/cache_backed_redis.ts +++ b/examples/src/embeddings/cache_backed_redis.ts @@ -4,8 +4,8 @@ import { OpenAIEmbeddings } from "@langchain/openai"; import { CacheBackedEmbeddings } from "langchain/embeddings/cache_backed"; import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters"; import { FaissStore } from "@langchain/community/vectorstores/faiss"; -import { TextLoader } from "langchain/document_loaders/fs/text"; import { RedisByteStore } from "@langchain/community/storage/ioredis"; +import { TextLoader } from "langchain/document_loaders/fs/text"; const underlyingEmbeddings = new OpenAIEmbeddings(); diff --git a/examples/src/get_started/quickstart2.ts b/examples/src/get_started/quickstart2.ts index 1c8e68911f41..fb460adbea6e 100644 --- a/examples/src/get_started/quickstart2.ts +++ b/examples/src/get_started/quickstart2.ts @@ -1,6 +1,6 @@ /* eslint-disable import/first */ /* eslint-disable import/no-duplicates */ -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai"; const chatModel = new ChatOpenAI({}); diff --git a/examples/src/get_started/quickstart3.ts b/examples/src/get_started/quickstart3.ts index 8dc59cc32e77..35dc3838583c 100644 --- a/examples/src/get_started/quickstart3.ts +++ b/examples/src/get_started/quickstart3.ts @@ -1,5 +1,5 @@ /* eslint-disable import/first */ -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai"; const chatModel = new ChatOpenAI({}); diff --git a/examples/src/indexes/indexing_api/indexing.ts b/examples/src/indexes/indexing_api/indexing.ts index 37ac80e8b1fa..338d6e6bed40 100644 --- a/examples/src/indexes/indexing_api/indexing.ts +++ b/examples/src/indexes/indexing_api/indexing.ts @@ -4,7 +4,7 @@ import { PGVectorStore } from "@langchain/community/vectorstores/pgvector"; import { PoolConfig } from "pg"; import { OpenAIEmbeddings } from "@langchain/openai"; import { CharacterTextSplitter } from "@langchain/textsplitters"; -import { BaseDocumentLoader } from "langchain/document_loaders/base"; +import { BaseDocumentLoader } from "@langchain/core/document_loaders/base"; // First, follow set-up instructions at // https://js.langchain.com/docs/modules/indexes/vector_stores/integrations/pgvector diff --git a/examples/src/use_cases/chatbots/quickstart.ts b/examples/src/use_cases/chatbots/quickstart.ts index 375f462ea170..cac7898285ef 100644 --- a/examples/src/use_cases/chatbots/quickstart.ts +++ b/examples/src/use_cases/chatbots/quickstart.ts @@ -86,7 +86,7 @@ const responseMessage2 = await chain.invoke({ console.log(responseMessage2); -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; const loader = new CheerioWebBaseLoader( "https://docs.smith.langchain.com/user_guide" diff --git a/examples/src/use_cases/chatbots/retrieval.ts b/examples/src/use_cases/chatbots/retrieval.ts index 2e4f3c584298..2c3d8207f11e 100644 --- a/examples/src/use_cases/chatbots/retrieval.ts +++ b/examples/src/use_cases/chatbots/retrieval.ts @@ -9,7 +9,7 @@ const chat = new ChatOpenAI({ temperature: 0.2, }); -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; const loader = new CheerioWebBaseLoader( "https://docs.smith.langchain.com/user_guide" diff --git a/examples/src/use_cases/local_retrieval_qa/chain.ts b/examples/src/use_cases/local_retrieval_qa/chain.ts index 92463f026b4a..c5da25e3a6f9 100644 --- a/examples/src/use_cases/local_retrieval_qa/chain.ts +++ b/examples/src/use_cases/local_retrieval_qa/chain.ts @@ -1,4 +1,4 @@ -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { Ollama } from "@langchain/community/llms/ollama"; diff --git a/examples/src/use_cases/local_retrieval_qa/load_documents.ts b/examples/src/use_cases/local_retrieval_qa/load_documents.ts index 9da4fe43c723..9e449b2cc532 100644 --- a/examples/src/use_cases/local_retrieval_qa/load_documents.ts +++ b/examples/src/use_cases/local_retrieval_qa/load_documents.ts @@ -1,4 +1,4 @@ -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { HuggingFaceTransformersEmbeddings } from "@langchain/community/embeddings/hf_transformers"; diff --git a/examples/src/use_cases/local_retrieval_qa/qa_chain.ts b/examples/src/use_cases/local_retrieval_qa/qa_chain.ts index b4c09d4a4c96..949918067369 100644 --- a/examples/src/use_cases/local_retrieval_qa/qa_chain.ts +++ b/examples/src/use_cases/local_retrieval_qa/qa_chain.ts @@ -1,5 +1,5 @@ import { RetrievalQAChain, loadQAStuffChain } from "langchain/chains"; -import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio"; +import { CheerioWebBaseLoader } from "@langchain/community/document_loaders/web/cheerio"; import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { Ollama } from "@langchain/community/llms/ollama"; diff --git a/examples/src/use_cases/query_analysis/quickstart/docs.ts b/examples/src/use_cases/query_analysis/quickstart/docs.ts index 1a040f6d1cb7..5ca65e680c45 100644 --- a/examples/src/use_cases/query_analysis/quickstart/docs.ts +++ b/examples/src/use_cases/query_analysis/quickstart/docs.ts @@ -1,5 +1,5 @@ import { DocumentInterface } from "@langchain/core/documents"; -import { YoutubeLoader } from "langchain/document_loaders/web/youtube"; +import { YoutubeLoader } from "@langchain/community/document_loaders/web/youtube"; import { getYear } from "date-fns"; const urls = [ diff --git a/examples/src/use_cases/query_analysis/quickstart/load_yt_videos.ts b/examples/src/use_cases/query_analysis/quickstart/load_yt_videos.ts index d006e7a5a65a..122f0cc1f9dc 100644 --- a/examples/src/use_cases/query_analysis/quickstart/load_yt_videos.ts +++ b/examples/src/use_cases/query_analysis/quickstart/load_yt_videos.ts @@ -1,5 +1,5 @@ import { DocumentInterface } from "@langchain/core/documents"; -import { YoutubeLoader } from "langchain/document_loaders/web/youtube"; +import { YoutubeLoader } from "@langchain/community/document_loaders/web/youtube"; import { getYear } from "date-fns"; const urls = [ diff --git a/examples/src/use_cases/youtube/chat_with_podcast.ts b/examples/src/use_cases/youtube/chat_with_podcast.ts index 80cd4ba4976d..d7832c1232cb 100644 --- a/examples/src/use_cases/youtube/chat_with_podcast.ts +++ b/examples/src/use_cases/youtube/chat_with_podcast.ts @@ -1,5 +1,5 @@ import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai"; -import { SearchApiLoader } from "langchain/document_loaders/web/searchapi"; +import { SearchApiLoader } from "@langchain/community/document_loaders/web/searchapi"; import { TokenTextSplitter } from "@langchain/textsplitters"; import { FaissStore } from "@langchain/community/vectorstores/faiss"; import { createRetrievalChain } from "langchain/chains/retrieval"; diff --git a/examples/src/use_cases/youtube/podcast_summary.ts b/examples/src/use_cases/youtube/podcast_summary.ts index 10a85ab8ad69..306b02088680 100644 --- a/examples/src/use_cases/youtube/podcast_summary.ts +++ b/examples/src/use_cases/youtube/podcast_summary.ts @@ -1,5 +1,5 @@ import { loadSummarizationChain } from "langchain/chains"; -import { SearchApiLoader } from "langchain/document_loaders/web/searchapi"; +import { SearchApiLoader } from "@langchain/community/document_loaders/web/searchapi"; import { TokenTextSplitter } from "@langchain/textsplitters"; import { PromptTemplate } from "@langchain/core/prompts"; import { ChatAnthropic } from "@langchain/anthropic";