langchain 0.2.0-rc.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/executor.cjs +2 -2
- package/dist/agents/executor.js +2 -2
- package/dist/document_loaders/fs/docx.cjs +2 -0
- package/dist/document_loaders/fs/docx.d.ts +2 -0
- package/dist/document_loaders/fs/docx.js +2 -0
- package/dist/document_loaders/fs/epub.cjs +2 -0
- package/dist/document_loaders/fs/epub.d.ts +2 -0
- package/dist/document_loaders/fs/epub.js +2 -0
- package/dist/document_loaders/fs/notion.cjs +2 -0
- package/dist/document_loaders/fs/notion.d.ts +2 -0
- package/dist/document_loaders/fs/notion.js +2 -0
- package/dist/document_loaders/fs/obsidian.cjs +2 -0
- package/dist/document_loaders/fs/obsidian.d.ts +2 -0
- package/dist/document_loaders/fs/obsidian.js +2 -0
- package/dist/document_loaders/fs/openai_whisper_audio.cjs +2 -0
- package/dist/document_loaders/fs/openai_whisper_audio.d.ts +2 -0
- package/dist/document_loaders/fs/openai_whisper_audio.js +2 -0
- package/dist/document_loaders/fs/pdf.cjs +2 -0
- package/dist/document_loaders/fs/pdf.d.ts +2 -0
- package/dist/document_loaders/fs/pdf.js +2 -0
- package/dist/document_loaders/fs/pptx.cjs +2 -0
- package/dist/document_loaders/fs/pptx.d.ts +2 -0
- package/dist/document_loaders/fs/pptx.js +2 -0
- package/dist/document_loaders/fs/srt.cjs +2 -0
- package/dist/document_loaders/fs/srt.d.ts +2 -0
- package/dist/document_loaders/fs/srt.js +2 -0
- package/dist/document_loaders/fs/unstructured.cjs +3 -1
- package/dist/document_loaders/fs/unstructured.d.ts +2 -0
- package/dist/document_loaders/fs/unstructured.js +3 -1
- package/dist/document_loaders/web/apify_dataset.cjs +1 -0
- package/dist/document_loaders/web/apify_dataset.d.ts +2 -0
- package/dist/document_loaders/web/apify_dataset.js +1 -0
- package/dist/document_loaders/web/assemblyai.cjs +8 -0
- package/dist/document_loaders/web/assemblyai.d.ts +8 -0
- package/dist/document_loaders/web/assemblyai.js +8 -0
- package/dist/document_loaders/web/azure_blob_storage_container.cjs +1 -0
- package/dist/document_loaders/web/azure_blob_storage_container.d.ts +1 -0
- package/dist/document_loaders/web/azure_blob_storage_container.js +1 -0
- package/dist/document_loaders/web/azure_blob_storage_file.cjs +1 -0
- package/dist/document_loaders/web/azure_blob_storage_file.d.ts +1 -0
- package/dist/document_loaders/web/azure_blob_storage_file.js +1 -0
- package/dist/document_loaders/web/browserbase.cjs +87 -0
- package/dist/document_loaders/web/browserbase.d.ts +49 -0
- package/dist/document_loaders/web/browserbase.js +80 -0
- package/dist/document_loaders/web/cheerio.cjs +2 -0
- package/dist/document_loaders/web/cheerio.d.ts +4 -0
- package/dist/document_loaders/web/cheerio.js +2 -0
- package/dist/document_loaders/web/college_confidential.cjs +2 -0
- package/dist/document_loaders/web/college_confidential.d.ts +2 -0
- package/dist/document_loaders/web/college_confidential.js +2 -0
- package/dist/document_loaders/web/confluence.cjs +2 -0
- package/dist/document_loaders/web/confluence.d.ts +8 -0
- package/dist/document_loaders/web/confluence.js +2 -0
- package/dist/document_loaders/web/couchbase.cjs +2 -0
- package/dist/document_loaders/web/couchbase.d.ts +2 -0
- package/dist/document_loaders/web/couchbase.js +2 -0
- package/dist/document_loaders/web/figma.cjs +2 -0
- package/dist/document_loaders/web/figma.d.ts +6 -0
- package/dist/document_loaders/web/figma.js +2 -0
- package/dist/document_loaders/web/firecrawl.cjs +2 -0
- package/dist/document_loaders/web/firecrawl.d.ts +2 -0
- package/dist/document_loaders/web/firecrawl.js +2 -0
- package/dist/document_loaders/web/gitbook.cjs +2 -0
- package/dist/document_loaders/web/gitbook.d.ts +2 -0
- package/dist/document_loaders/web/gitbook.js +2 -0
- package/dist/document_loaders/web/github.cjs +2 -0
- package/dist/document_loaders/web/github.d.ts +6 -0
- package/dist/document_loaders/web/github.js +2 -0
- package/dist/document_loaders/web/hn.cjs +2 -0
- package/dist/document_loaders/web/hn.d.ts +2 -0
- package/dist/document_loaders/web/hn.js +2 -0
- package/dist/document_loaders/web/imsdb.cjs +2 -0
- package/dist/document_loaders/web/imsdb.d.ts +2 -0
- package/dist/document_loaders/web/imsdb.js +2 -0
- package/dist/document_loaders/web/notionapi.cjs +2 -0
- package/dist/document_loaders/web/notionapi.d.ts +5 -0
- package/dist/document_loaders/web/notionapi.js +2 -0
- package/dist/document_loaders/web/pdf.cjs +2 -0
- package/dist/document_loaders/web/pdf.d.ts +2 -0
- package/dist/document_loaders/web/pdf.js +2 -0
- package/dist/document_loaders/web/playwright.cjs +2 -0
- package/dist/document_loaders/web/playwright.d.ts +4 -0
- package/dist/document_loaders/web/playwright.js +2 -0
- package/dist/document_loaders/web/puppeteer.cjs +2 -0
- package/dist/document_loaders/web/puppeteer.d.ts +2 -0
- package/dist/document_loaders/web/puppeteer.js +2 -0
- package/dist/document_loaders/web/recursive_url.cjs +3 -0
- package/dist/document_loaders/web/recursive_url.d.ts +6 -0
- package/dist/document_loaders/web/recursive_url.js +3 -0
- package/dist/document_loaders/web/s3.cjs +4 -2
- package/dist/document_loaders/web/s3.d.ts +4 -0
- package/dist/document_loaders/web/s3.js +4 -2
- package/dist/document_loaders/web/searchapi.cjs +2 -0
- package/dist/document_loaders/web/searchapi.d.ts +2 -0
- package/dist/document_loaders/web/searchapi.js +2 -0
- package/dist/document_loaders/web/serpapi.cjs +2 -0
- package/dist/document_loaders/web/serpapi.d.ts +2 -0
- package/dist/document_loaders/web/serpapi.js +2 -0
- package/dist/document_loaders/web/sitemap.cjs +3 -0
- package/dist/document_loaders/web/sitemap.d.ts +5 -0
- package/dist/document_loaders/web/sitemap.js +3 -0
- package/dist/document_loaders/web/sonix_audio.cjs +2 -0
- package/dist/document_loaders/web/sonix_audio.d.ts +2 -0
- package/dist/document_loaders/web/sonix_audio.js +2 -0
- package/dist/document_loaders/web/sort_xyz_blockchain.cjs +2 -0
- package/dist/document_loaders/web/sort_xyz_blockchain.d.ts +2 -0
- package/dist/document_loaders/web/sort_xyz_blockchain.js +2 -0
- package/dist/document_loaders/web/youtube.cjs +2 -0
- package/dist/document_loaders/web/youtube.d.ts +2 -0
- package/dist/document_loaders/web/youtube.js +2 -0
- package/dist/experimental/openai_assistant/index.cjs +3 -0
- package/dist/experimental/openai_assistant/index.js +3 -0
- package/dist/load/import_constants.cjs +1 -0
- package/dist/load/import_constants.js +1 -0
- package/dist/load/import_map.cjs +5 -2
- package/dist/load/import_map.d.ts +3 -0
- package/dist/load/import_map.js +3 -0
- package/dist/load/index.cjs +1 -3
- package/dist/load/index.js +1 -3
- package/dist/schema/prompt_template.cjs +34 -0
- package/dist/schema/prompt_template.d.ts +13 -0
- package/dist/schema/prompt_template.js +30 -0
- package/dist/schema/query_constructor.cjs +32 -0
- package/dist/schema/query_constructor.d.ts +12 -0
- package/dist/schema/query_constructor.js +28 -0
- package/dist/smith/config.d.ts +4 -4
- package/dist/tools/index.cjs +26 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.js +8 -0
- package/document_loaders/web/browserbase.cjs +1 -0
- package/document_loaders/web/browserbase.d.cts +1 -0
- package/document_loaders/web/browserbase.d.ts +1 -0
- package/document_loaders/web/browserbase.js +1 -0
- package/package.json +64 -7
- package/prompts/load.cjs +1 -0
- package/prompts/load.d.cts +1 -0
- package/prompts/load.d.ts +1 -0
- package/prompts/load.js +1 -0
- package/schema/document.cjs +1 -0
- package/schema/document.d.cts +1 -0
- package/schema/document.d.ts +1 -0
- package/schema/document.js +1 -0
- package/schema/prompt_template.cjs +1 -0
- package/schema/prompt_template.d.cts +1 -0
- package/schema/prompt_template.d.ts +1 -0
- package/schema/prompt_template.js +1 -0
- package/schema/query_constructor.cjs +1 -0
- package/schema/query_constructor.d.cts +1 -0
- package/schema/query_constructor.d.ts +1 -0
- package/schema/query_constructor.js +1 -0
- package/tools.cjs +1 -0
- package/tools.d.cts +1 -0
- package/tools.d.ts +1 -0
- package/tools.js +1 -0
- package/dist/load/dynamic_import_map.cjs +0 -51
- package/dist/load/dynamic_import_map.d.ts +0 -8
- package/dist/load/dynamic_import_map.js +0 -47
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BrowserbaseLoader = void 0;
|
|
7
|
+
const documents_1 = require("@langchain/core/documents");
|
|
8
|
+
const sdk_1 = __importDefault(require("@browserbasehq/sdk"));
|
|
9
|
+
const base_js_1 = require("../base.cjs");
|
|
10
|
+
/**
|
|
11
|
+
* Load pre-rendered web pages using a headless browser hosted on Browserbase.
|
|
12
|
+
*
|
|
13
|
+
* Depends on `@browserbasehq/sdk` package.
|
|
14
|
+
* Get your API key from https://browserbase.com
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import { BrowserbaseLoader } from "langchain/document_loaders/web/browserbase";
|
|
19
|
+
*
|
|
20
|
+
* const loader = new BrowserbaseLoader(["https://example.com"], {
|
|
21
|
+
* apiKey: process.env.BROWSERBASE_API_KEY,
|
|
22
|
+
* textContent: true,
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* const docs = await loader.load();
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param {string[]} urls - The URLs of the web pages to load.
|
|
29
|
+
* @param {BrowserbaseLoaderOptions} [options] - Browserbase client options.
|
|
30
|
+
*/
|
|
31
|
+
class BrowserbaseLoader extends base_js_1.BaseDocumentLoader {
|
|
32
|
+
constructor(urls, options = {}) {
|
|
33
|
+
super();
|
|
34
|
+
Object.defineProperty(this, "urls", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: void 0
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(this, "options", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true,
|
|
44
|
+
value: void 0
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(this, "browserbase", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
configurable: true,
|
|
49
|
+
writable: true,
|
|
50
|
+
value: void 0
|
|
51
|
+
});
|
|
52
|
+
this.urls = urls;
|
|
53
|
+
this.options = options;
|
|
54
|
+
this.browserbase = new sdk_1.default(options.apiKey);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Load pages from URLs.
|
|
58
|
+
*
|
|
59
|
+
* @returns {Promise<DocumentInterface[]>} - A promise which resolves to a list of documents.
|
|
60
|
+
*/
|
|
61
|
+
async load() {
|
|
62
|
+
const documents = [];
|
|
63
|
+
for await (const doc of this.lazyLoad()) {
|
|
64
|
+
documents.push(doc);
|
|
65
|
+
}
|
|
66
|
+
return documents;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Load pages from URLs.
|
|
70
|
+
*
|
|
71
|
+
* @returns {Generator<DocumentInterface>} - A generator that yields documents.
|
|
72
|
+
*/
|
|
73
|
+
async *lazyLoad() {
|
|
74
|
+
const pages = await this.browserbase.loadURLs(this.urls, this.options);
|
|
75
|
+
let index = 0;
|
|
76
|
+
for await (const page of pages) {
|
|
77
|
+
yield new documents_1.Document({
|
|
78
|
+
pageContent: page,
|
|
79
|
+
metadata: {
|
|
80
|
+
url: this.urls[index],
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
index += index + 1;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.BrowserbaseLoader = BrowserbaseLoader;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Document, type DocumentInterface } from "@langchain/core/documents";
|
|
2
|
+
import Browserbase, { BrowserbaseLoadOptions } from "@browserbasehq/sdk";
|
|
3
|
+
import { BaseDocumentLoader } from "../base.js";
|
|
4
|
+
import type { DocumentLoader } from "../base.js";
|
|
5
|
+
interface BrowserbaseLoaderOptions extends BrowserbaseLoadOptions {
|
|
6
|
+
apiKey?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Load pre-rendered web pages using a headless browser hosted on Browserbase.
|
|
10
|
+
*
|
|
11
|
+
* Depends on `@browserbasehq/sdk` package.
|
|
12
|
+
* Get your API key from https://browserbase.com
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { BrowserbaseLoader } from "langchain/document_loaders/web/browserbase";
|
|
17
|
+
*
|
|
18
|
+
* const loader = new BrowserbaseLoader(["https://example.com"], {
|
|
19
|
+
* apiKey: process.env.BROWSERBASE_API_KEY,
|
|
20
|
+
* textContent: true,
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* const docs = await loader.load();
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @param {string[]} urls - The URLs of the web pages to load.
|
|
27
|
+
* @param {BrowserbaseLoaderOptions} [options] - Browserbase client options.
|
|
28
|
+
*/
|
|
29
|
+
export declare class BrowserbaseLoader extends BaseDocumentLoader implements DocumentLoader {
|
|
30
|
+
urls: string[];
|
|
31
|
+
options: BrowserbaseLoaderOptions;
|
|
32
|
+
browserbase: Browserbase;
|
|
33
|
+
constructor(urls: string[], options?: BrowserbaseLoaderOptions);
|
|
34
|
+
/**
|
|
35
|
+
* Load pages from URLs.
|
|
36
|
+
*
|
|
37
|
+
* @returns {Promise<DocumentInterface[]>} - A promise which resolves to a list of documents.
|
|
38
|
+
*/
|
|
39
|
+
load(): Promise<DocumentInterface[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Load pages from URLs.
|
|
42
|
+
*
|
|
43
|
+
* @returns {Generator<DocumentInterface>} - A generator that yields documents.
|
|
44
|
+
*/
|
|
45
|
+
lazyLoad(): AsyncGenerator<Document<{
|
|
46
|
+
url: string;
|
|
47
|
+
}>, void, unknown>;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Document } from "@langchain/core/documents";
|
|
2
|
+
import Browserbase from "@browserbasehq/sdk";
|
|
3
|
+
import { BaseDocumentLoader } from "../base.js";
|
|
4
|
+
/**
|
|
5
|
+
* Load pre-rendered web pages using a headless browser hosted on Browserbase.
|
|
6
|
+
*
|
|
7
|
+
* Depends on `@browserbasehq/sdk` package.
|
|
8
|
+
* Get your API key from https://browserbase.com
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { BrowserbaseLoader } from "langchain/document_loaders/web/browserbase";
|
|
13
|
+
*
|
|
14
|
+
* const loader = new BrowserbaseLoader(["https://example.com"], {
|
|
15
|
+
* apiKey: process.env.BROWSERBASE_API_KEY,
|
|
16
|
+
* textContent: true,
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* const docs = await loader.load();
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param {string[]} urls - The URLs of the web pages to load.
|
|
23
|
+
* @param {BrowserbaseLoaderOptions} [options] - Browserbase client options.
|
|
24
|
+
*/
|
|
25
|
+
export class BrowserbaseLoader extends BaseDocumentLoader {
|
|
26
|
+
constructor(urls, options = {}) {
|
|
27
|
+
super();
|
|
28
|
+
Object.defineProperty(this, "urls", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
configurable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
value: void 0
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(this, "options", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: void 0
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(this, "browserbase", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true,
|
|
44
|
+
value: void 0
|
|
45
|
+
});
|
|
46
|
+
this.urls = urls;
|
|
47
|
+
this.options = options;
|
|
48
|
+
this.browserbase = new Browserbase(options.apiKey);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Load pages from URLs.
|
|
52
|
+
*
|
|
53
|
+
* @returns {Promise<DocumentInterface[]>} - A promise which resolves to a list of documents.
|
|
54
|
+
*/
|
|
55
|
+
async load() {
|
|
56
|
+
const documents = [];
|
|
57
|
+
for await (const doc of this.lazyLoad()) {
|
|
58
|
+
documents.push(doc);
|
|
59
|
+
}
|
|
60
|
+
return documents;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Load pages from URLs.
|
|
64
|
+
*
|
|
65
|
+
* @returns {Generator<DocumentInterface>} - A generator that yields documents.
|
|
66
|
+
*/
|
|
67
|
+
async *lazyLoad() {
|
|
68
|
+
const pages = await this.browserbase.loadURLs(this.urls, this.options);
|
|
69
|
+
let index = 0;
|
|
70
|
+
for await (const page of pages) {
|
|
71
|
+
yield new Document({
|
|
72
|
+
pageContent: page,
|
|
73
|
+
metadata: {
|
|
74
|
+
url: this.urls[index],
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
index += index + 1;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -10,6 +10,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
10
10
|
newPackageName: "@langchain/community",
|
|
11
11
|
});
|
|
12
12
|
/**
|
|
13
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/cheerio" instead. This entrypoint will be removed in 0.3.0.
|
|
14
|
+
*
|
|
13
15
|
* A class that extends the BaseDocumentLoader and implements the
|
|
14
16
|
* DocumentLoader interface. It represents a document loader for loading
|
|
15
17
|
* web-based documents using Cheerio.
|
|
@@ -4,6 +4,8 @@ import { AsyncCaller, AsyncCallerParams } from "@langchain/core/utils/async_call
|
|
|
4
4
|
import { BaseDocumentLoader } from "../base.js";
|
|
5
5
|
import type { DocumentLoader } from "../base.js";
|
|
6
6
|
/**
|
|
7
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/cheerio" instead. This entrypoint will be removed in 0.3.0.
|
|
8
|
+
*
|
|
7
9
|
* Represents the parameters for configuring the CheerioWebBaseLoader. It
|
|
8
10
|
* extends the AsyncCallerParams interface and adds additional parameters
|
|
9
11
|
* specific to web-based loaders.
|
|
@@ -24,6 +26,8 @@ export interface WebBaseLoaderParams extends AsyncCallerParams {
|
|
|
24
26
|
textDecoder?: TextDecoder;
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
29
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/cheerio" instead. This entrypoint will be removed in 0.3.0.
|
|
30
|
+
*
|
|
27
31
|
* A class that extends the BaseDocumentLoader and implements the
|
|
28
32
|
* DocumentLoader interface. It represents a document loader for loading
|
|
29
33
|
* web-based documents using Cheerio.
|
|
@@ -7,6 +7,8 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
7
7
|
newPackageName: "@langchain/community",
|
|
8
8
|
});
|
|
9
9
|
/**
|
|
10
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/cheerio" instead. This entrypoint will be removed in 0.3.0.
|
|
11
|
+
*
|
|
10
12
|
* A class that extends the BaseDocumentLoader and implements the
|
|
11
13
|
* DocumentLoader interface. It represents a document loader for loading
|
|
12
14
|
* web-based documents using Cheerio.
|
|
@@ -9,6 +9,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
9
9
|
newPackageName: "@langchain/community",
|
|
10
10
|
});
|
|
11
11
|
/**
|
|
12
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/college_confidential" instead. This entrypoint will be removed in 0.3.0.
|
|
13
|
+
*
|
|
12
14
|
* A document loader specifically designed for loading documents from the
|
|
13
15
|
* College Confidential website. It extends the CheerioWebBaseLoader.
|
|
14
16
|
* @example
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Document } from "@langchain/core/documents";
|
|
2
2
|
import { CheerioWebBaseLoader } from "./cheerio.js";
|
|
3
3
|
/**
|
|
4
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/college_confidential" instead. This entrypoint will be removed in 0.3.0.
|
|
5
|
+
*
|
|
4
6
|
* A document loader specifically designed for loading documents from the
|
|
5
7
|
* College Confidential website. It extends the CheerioWebBaseLoader.
|
|
6
8
|
* @example
|
|
@@ -6,6 +6,8 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
6
6
|
newPackageName: "@langchain/community",
|
|
7
7
|
});
|
|
8
8
|
/**
|
|
9
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/college_confidential" instead. This entrypoint will be removed in 0.3.0.
|
|
10
|
+
*
|
|
9
11
|
* A document loader specifically designed for loading documents from the
|
|
10
12
|
* College Confidential website. It extends the CheerioWebBaseLoader.
|
|
11
13
|
* @example
|
|
@@ -10,6 +10,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
10
10
|
newPackageName: "@langchain/community",
|
|
11
11
|
});
|
|
12
12
|
/**
|
|
13
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/confluence" instead. This entrypoint will be removed in 0.3.0.
|
|
14
|
+
*
|
|
13
15
|
* Class representing a document loader for loading pages from Confluence.
|
|
14
16
|
* @example
|
|
15
17
|
* ```typescript
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Document } from "@langchain/core/documents";
|
|
2
2
|
import { BaseDocumentLoader } from "../base.js";
|
|
3
3
|
/**
|
|
4
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/confluence" instead. This entrypoint will be removed in 0.3.0.
|
|
5
|
+
*
|
|
4
6
|
* Interface representing the parameters for configuring the
|
|
5
7
|
* ConfluencePagesLoader.
|
|
6
8
|
*/
|
|
@@ -14,6 +16,8 @@ export interface ConfluencePagesLoaderParams {
|
|
|
14
16
|
expand?: string;
|
|
15
17
|
}
|
|
16
18
|
/**
|
|
19
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/confluence" instead. This entrypoint will be removed in 0.3.0.
|
|
20
|
+
*
|
|
17
21
|
* Interface representing a Confluence page.
|
|
18
22
|
*/
|
|
19
23
|
export interface ConfluencePage {
|
|
@@ -35,6 +39,8 @@ export interface ConfluencePage {
|
|
|
35
39
|
};
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
42
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/confluence" instead. This entrypoint will be removed in 0.3.0.
|
|
43
|
+
*
|
|
38
44
|
* Interface representing the response from the Confluence API.
|
|
39
45
|
*/
|
|
40
46
|
export interface ConfluenceAPIResponse {
|
|
@@ -42,6 +48,8 @@ export interface ConfluenceAPIResponse {
|
|
|
42
48
|
results: ConfluencePage[];
|
|
43
49
|
}
|
|
44
50
|
/**
|
|
51
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/confluence" instead. This entrypoint will be removed in 0.3.0.
|
|
52
|
+
*
|
|
45
53
|
* Class representing a document loader for loading pages from Confluence.
|
|
46
54
|
* @example
|
|
47
55
|
* ```typescript
|
|
@@ -7,6 +7,8 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
7
7
|
newPackageName: "@langchain/community",
|
|
8
8
|
});
|
|
9
9
|
/**
|
|
10
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/confluence" instead. This entrypoint will be removed in 0.3.0.
|
|
11
|
+
*
|
|
10
12
|
* Class representing a document loader for loading pages from Confluence.
|
|
11
13
|
* @example
|
|
12
14
|
* ```typescript
|
|
@@ -9,6 +9,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
9
9
|
newPackageName: "@langchain/community",
|
|
10
10
|
});
|
|
11
11
|
/**
|
|
12
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/couchbase" instead. This entrypoint will be removed in 0.3.0.
|
|
13
|
+
*
|
|
12
14
|
* loader for couchbase document
|
|
13
15
|
*/
|
|
14
16
|
class CouchbaseDocumentLoader extends base_js_1.BaseDocumentLoader {
|
|
@@ -2,6 +2,8 @@ import { Cluster } from "couchbase";
|
|
|
2
2
|
import { Document } from "@langchain/core/documents";
|
|
3
3
|
import { BaseDocumentLoader, DocumentLoader } from "../base.js";
|
|
4
4
|
/**
|
|
5
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/couchbase" instead. This entrypoint will be removed in 0.3.0.
|
|
6
|
+
*
|
|
5
7
|
* loader for couchbase document
|
|
6
8
|
*/
|
|
7
9
|
export declare class CouchbaseDocumentLoader extends BaseDocumentLoader implements DocumentLoader {
|
|
@@ -6,6 +6,8 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
6
6
|
newPackageName: "@langchain/community",
|
|
7
7
|
});
|
|
8
8
|
/**
|
|
9
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/couchbase" instead. This entrypoint will be removed in 0.3.0.
|
|
10
|
+
*
|
|
9
11
|
* loader for couchbase document
|
|
10
12
|
*/
|
|
11
13
|
export class CouchbaseDocumentLoader extends BaseDocumentLoader {
|
|
@@ -10,6 +10,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
10
10
|
newPackageName: "@langchain/community",
|
|
11
11
|
});
|
|
12
12
|
/**
|
|
13
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/figma" instead. This entrypoint will be removed in 0.3.0.
|
|
14
|
+
*
|
|
13
15
|
* Class representing a document loader for loading Figma files. It
|
|
14
16
|
* extends the BaseDocumentLoader and implements the FigmaLoaderParams
|
|
15
17
|
* interface. The constructor takes a config object as a parameter, which
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Document } from "@langchain/core/documents";
|
|
2
2
|
import { BaseDocumentLoader } from "../base.js";
|
|
3
3
|
/**
|
|
4
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/figma" instead. This entrypoint will be removed in 0.3.0.
|
|
5
|
+
*
|
|
4
6
|
* Interface representing a Figma file. It includes properties for the
|
|
5
7
|
* file name, role, last modified date, editor type, thumbnail URL,
|
|
6
8
|
* version, document node, schema version, main file key, and an array of
|
|
@@ -25,6 +27,8 @@ export interface FigmaFile {
|
|
|
25
27
|
}>;
|
|
26
28
|
}
|
|
27
29
|
/**
|
|
30
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/figma" instead. This entrypoint will be removed in 0.3.0.
|
|
31
|
+
*
|
|
28
32
|
* Interface representing the parameters for configuring the FigmaLoader.
|
|
29
33
|
* It includes optional properties for the access token, an array of node
|
|
30
34
|
* IDs, and the file key.
|
|
@@ -35,6 +39,8 @@ export interface FigmaLoaderParams {
|
|
|
35
39
|
fileKey: string;
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
42
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/figma" instead. This entrypoint will be removed in 0.3.0.
|
|
43
|
+
*
|
|
38
44
|
* Class representing a document loader for loading Figma files. It
|
|
39
45
|
* extends the BaseDocumentLoader and implements the FigmaLoaderParams
|
|
40
46
|
* interface. The constructor takes a config object as a parameter, which
|
|
@@ -7,6 +7,8 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
7
7
|
newPackageName: "@langchain/community",
|
|
8
8
|
});
|
|
9
9
|
/**
|
|
10
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/figma" instead. This entrypoint will be removed in 0.3.0.
|
|
11
|
+
*
|
|
10
12
|
* Class representing a document loader for loading Figma files. It
|
|
11
13
|
* extends the BaseDocumentLoader and implements the FigmaLoaderParams
|
|
12
14
|
* interface. The constructor takes a config object as a parameter, which
|
|
@@ -14,6 +14,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
14
14
|
newPackageName: "@langchain/community",
|
|
15
15
|
});
|
|
16
16
|
/**
|
|
17
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/firecrawl" instead. This entrypoint will be removed in 0.3.0.
|
|
18
|
+
*
|
|
17
19
|
* Class representing a document loader for loading data from
|
|
18
20
|
* Firecrawl (firecrawl.dev). It extends the BaseDocumentLoader class.
|
|
19
21
|
* @example
|
|
@@ -20,6 +20,8 @@ interface FirecrawlLoaderParameters {
|
|
|
20
20
|
params?: Record<string, unknown>;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/firecrawl" instead. This entrypoint will be removed in 0.3.0.
|
|
24
|
+
*
|
|
23
25
|
* Class representing a document loader for loading data from
|
|
24
26
|
* Firecrawl (firecrawl.dev). It extends the BaseDocumentLoader class.
|
|
25
27
|
* @example
|
|
@@ -8,6 +8,8 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
8
8
|
newPackageName: "@langchain/community",
|
|
9
9
|
});
|
|
10
10
|
/**
|
|
11
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/firecrawl" instead. This entrypoint will be removed in 0.3.0.
|
|
12
|
+
*
|
|
11
13
|
* Class representing a document loader for loading data from
|
|
12
14
|
* Firecrawl (firecrawl.dev). It extends the BaseDocumentLoader class.
|
|
13
15
|
* @example
|
|
@@ -9,6 +9,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
9
9
|
newPackageName: "@langchain/community",
|
|
10
10
|
});
|
|
11
11
|
/**
|
|
12
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/gitbook" instead. This entrypoint will be removed in 0.3.0.
|
|
13
|
+
*
|
|
12
14
|
* Class representing a document loader specifically designed for loading
|
|
13
15
|
* documents from Gitbook. It extends the CheerioWebBaseLoader.
|
|
14
16
|
*/
|
|
@@ -9,6 +9,8 @@ interface GitbookLoaderParams {
|
|
|
9
9
|
shouldLoadAllPaths?: boolean;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/gitbook" instead. This entrypoint will be removed in 0.3.0.
|
|
13
|
+
*
|
|
12
14
|
* Class representing a document loader specifically designed for loading
|
|
13
15
|
* documents from Gitbook. It extends the CheerioWebBaseLoader.
|
|
14
16
|
*/
|
|
@@ -6,6 +6,8 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
6
6
|
newPackageName: "@langchain/community",
|
|
7
7
|
});
|
|
8
8
|
/**
|
|
9
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/gitbook" instead. This entrypoint will be removed in 0.3.0.
|
|
10
|
+
*
|
|
9
11
|
* Class representing a document loader specifically designed for loading
|
|
10
12
|
* documents from Gitbook. It extends the CheerioWebBaseLoader.
|
|
11
13
|
*/
|
|
@@ -28,6 +28,8 @@ function isBinaryPath(name) {
|
|
|
28
28
|
return extensions.has((0, extname_js_1.extname)(name).slice(1).toLowerCase());
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/github" instead. This entrypoint will be removed in 0.3.0.
|
|
32
|
+
*
|
|
31
33
|
* A class that extends the BaseDocumentLoader and implements the
|
|
32
34
|
* GithubRepoLoaderParams interface. It represents a document loader for
|
|
33
35
|
* loading files from a GitHub repository.
|
|
@@ -4,6 +4,8 @@ import { AsyncCaller, AsyncCallerParams } from "@langchain/core/utils/async_call
|
|
|
4
4
|
import { BaseDocumentLoader } from "../base.js";
|
|
5
5
|
import { UnknownHandling } from "../fs/directory.js";
|
|
6
6
|
/**
|
|
7
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/github" instead. This entrypoint will be removed in 0.3.0.
|
|
8
|
+
*
|
|
7
9
|
* An interface that represents a file in a GitHub repository. It has
|
|
8
10
|
* properties for the file name, path, SHA, size, URLs, type, and links.
|
|
9
11
|
*/
|
|
@@ -24,6 +26,8 @@ export interface GithubFile {
|
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
29
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/github" instead. This entrypoint will be removed in 0.3.0.
|
|
30
|
+
*
|
|
27
31
|
* An interface that represents the parameters for the GithubRepoLoader
|
|
28
32
|
* class. It extends the AsyncCallerParams interface and adds additional
|
|
29
33
|
* properties specific to the GitHub repository loader.
|
|
@@ -61,6 +65,8 @@ export interface GithubRepoLoaderParams extends AsyncCallerParams {
|
|
|
61
65
|
maxRetries?: number;
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
68
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/github" instead. This entrypoint will be removed in 0.3.0.
|
|
69
|
+
*
|
|
64
70
|
* A class that extends the BaseDocumentLoader and implements the
|
|
65
71
|
* GithubRepoLoaderParams interface. It represents a document loader for
|
|
66
72
|
* loading files from a GitHub repository.
|
|
@@ -22,6 +22,8 @@ function isBinaryPath(name) {
|
|
|
22
22
|
return extensions.has(extname(name).slice(1).toLowerCase());
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/github" instead. This entrypoint will be removed in 0.3.0.
|
|
26
|
+
*
|
|
25
27
|
* A class that extends the BaseDocumentLoader and implements the
|
|
26
28
|
* GithubRepoLoaderParams interface. It represents a document loader for
|
|
27
29
|
* loading files from a GitHub repository.
|
|
@@ -9,6 +9,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
9
9
|
newPackageName: "@langchain/community",
|
|
10
10
|
});
|
|
11
11
|
/**
|
|
12
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/hn" instead. This entrypoint will be removed in 0.3.0.
|
|
13
|
+
*
|
|
12
14
|
* A class that extends the CheerioWebBaseLoader class. It represents a
|
|
13
15
|
* loader for loading web pages from the Hacker News website.
|
|
14
16
|
*/
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Document } from "@langchain/core/documents";
|
|
2
2
|
import { CheerioWebBaseLoader } from "./cheerio.js";
|
|
3
3
|
/**
|
|
4
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/hn" instead. This entrypoint will be removed in 0.3.0.
|
|
5
|
+
*
|
|
4
6
|
* A class that extends the CheerioWebBaseLoader class. It represents a
|
|
5
7
|
* loader for loading web pages from the Hacker News website.
|
|
6
8
|
*/
|
|
@@ -6,6 +6,8 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
6
6
|
newPackageName: "@langchain/community",
|
|
7
7
|
});
|
|
8
8
|
/**
|
|
9
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/hn" instead. This entrypoint will be removed in 0.3.0.
|
|
10
|
+
*
|
|
9
11
|
* A class that extends the CheerioWebBaseLoader class. It represents a
|
|
10
12
|
* loader for loading web pages from the Hacker News website.
|
|
11
13
|
*/
|
|
@@ -9,6 +9,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
9
9
|
newPackageName: "@langchain/community",
|
|
10
10
|
});
|
|
11
11
|
/**
|
|
12
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/imsdb" instead. This entrypoint will be removed in 0.3.0.
|
|
13
|
+
*
|
|
12
14
|
* A class that extends the CheerioWebBaseLoader class. It represents a
|
|
13
15
|
* loader for loading web pages from the IMSDB (Internet Movie Script
|
|
14
16
|
* Database) website.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Document } from "@langchain/core/documents";
|
|
2
2
|
import { CheerioWebBaseLoader } from "./cheerio.js";
|
|
3
3
|
/**
|
|
4
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/imsdb" instead. This entrypoint will be removed in 0.3.0.
|
|
5
|
+
*
|
|
4
6
|
* A class that extends the CheerioWebBaseLoader class. It represents a
|
|
5
7
|
* loader for loading web pages from the IMSDB (Internet Movie Script
|
|
6
8
|
* Database) website.
|
|
@@ -6,6 +6,8 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
6
6
|
newPackageName: "@langchain/community",
|
|
7
7
|
});
|
|
8
8
|
/**
|
|
9
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/imsdb" instead. This entrypoint will be removed in 0.3.0.
|
|
10
|
+
*
|
|
9
11
|
* A class that extends the CheerioWebBaseLoader class. It represents a
|
|
10
12
|
* loader for loading web pages from the IMSDB (Internet Movie Script
|
|
11
13
|
* Database) website.
|
|
@@ -27,6 +27,8 @@ exports.isPage = isPage;
|
|
|
27
27
|
const isDatabase = (res) => (0, exports.isDatabaseResponse)(res) && (0, client_1.isFullDatabase)(res);
|
|
28
28
|
exports.isDatabase = isDatabase;
|
|
29
29
|
/**
|
|
30
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/notionapi" instead. This entrypoint will be removed in 0.3.0.
|
|
31
|
+
*
|
|
30
32
|
* A class that extends the BaseDocumentLoader class. It represents a
|
|
31
33
|
* document loader for loading documents from Notion using the Notion API.
|
|
32
34
|
* @example
|
|
@@ -23,6 +23,9 @@ export declare const isDatabase: (res: GetResponse) => res is import("@notionhq/
|
|
|
23
23
|
*/
|
|
24
24
|
export type NotionAPIType = "database" | "page";
|
|
25
25
|
export type OnDocumentLoadedCallback = (current: number, total: number, currentTitle?: string, rootTitle?: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/notionapi" instead. This entrypoint will be removed in 0.3.0.
|
|
28
|
+
*/
|
|
26
29
|
export type NotionAPILoaderOptions = {
|
|
27
30
|
clientOptions: ConstructorParameters<typeof Client>[0];
|
|
28
31
|
id: string;
|
|
@@ -32,6 +35,8 @@ export type NotionAPILoaderOptions = {
|
|
|
32
35
|
propertiesAsHeader?: boolean;
|
|
33
36
|
};
|
|
34
37
|
/**
|
|
38
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/notionapi" instead. This entrypoint will be removed in 0.3.0.
|
|
39
|
+
*
|
|
35
40
|
* A class that extends the BaseDocumentLoader class. It represents a
|
|
36
41
|
* document loader for loading documents from Notion using the Notion API.
|
|
37
42
|
* @example
|
|
@@ -16,6 +16,8 @@ export const isErrorResponse = (res) => isNotionClientError(res);
|
|
|
16
16
|
export const isPage = (res) => isPageResponse(res) && isFullPage(res);
|
|
17
17
|
export const isDatabase = (res) => isDatabaseResponse(res) && isFullDatabase(res);
|
|
18
18
|
/**
|
|
19
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/notionapi" instead. This entrypoint will be removed in 0.3.0.
|
|
20
|
+
*
|
|
19
21
|
* A class that extends the BaseDocumentLoader class. It represents a
|
|
20
22
|
* document loader for loading documents from Notion using the Notion API.
|
|
21
23
|
* @example
|
|
@@ -10,6 +10,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
10
10
|
newPackageName: "@langchain/community",
|
|
11
11
|
});
|
|
12
12
|
/**
|
|
13
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/pdf" instead. This entrypoint will be removed in 0.3.0.
|
|
14
|
+
*
|
|
13
15
|
* A document loader for loading data from PDFs.
|
|
14
16
|
* @example
|
|
15
17
|
* ```typescript
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { Document } from "@langchain/core/documents";
|
|
3
3
|
import { BaseDocumentLoader } from "../base.js";
|
|
4
4
|
/**
|
|
5
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/pdf" instead. This entrypoint will be removed in 0.3.0.
|
|
6
|
+
*
|
|
5
7
|
* A document loader for loading data from PDFs.
|
|
6
8
|
* @example
|
|
7
9
|
* ```typescript
|