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
package/dist/agents/executor.cjs
CHANGED
|
@@ -158,10 +158,10 @@ class AgentExecutorIterator extends serializable_1.Serializable {
|
|
|
158
158
|
*/
|
|
159
159
|
async onFirstStep() {
|
|
160
160
|
if (this.iterations === 0) {
|
|
161
|
-
const callbackManager = await manager_1.CallbackManager.configure(this.callbacks, this.agentExecutor.callbacks, this.tags, this.agentExecutor.tags, this.metadata, this.agentExecutor.metadata, {
|
|
161
|
+
const callbackManager = await manager_1.CallbackManager.configure(this.callbacks ?? this.config?.callbacks, this.agentExecutor.callbacks, this.tags ?? this.config?.tags, this.agentExecutor.tags, this.metadata ?? this.config?.metadata, this.agentExecutor.metadata, {
|
|
162
162
|
verbose: this.agentExecutor.verbose,
|
|
163
163
|
});
|
|
164
|
-
this.runManager = await callbackManager?.handleChainStart(this.agentExecutor.toJSON(), this.inputs, undefined, undefined, this.tags, this.metadata, this.runName);
|
|
164
|
+
this.runManager = await callbackManager?.handleChainStart(this.agentExecutor.toJSON(), this.inputs, undefined, undefined, this.tags ?? this.config?.tags, this.metadata ?? this.config?.metadata, this.runName ?? this.config?.runName);
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
/**
|
package/dist/agents/executor.js
CHANGED
|
@@ -155,10 +155,10 @@ export class AgentExecutorIterator extends Serializable {
|
|
|
155
155
|
*/
|
|
156
156
|
async onFirstStep() {
|
|
157
157
|
if (this.iterations === 0) {
|
|
158
|
-
const callbackManager = await CallbackManager.configure(this.callbacks, this.agentExecutor.callbacks, this.tags, this.agentExecutor.tags, this.metadata, this.agentExecutor.metadata, {
|
|
158
|
+
const callbackManager = await CallbackManager.configure(this.callbacks ?? this.config?.callbacks, this.agentExecutor.callbacks, this.tags ?? this.config?.tags, this.agentExecutor.tags, this.metadata ?? this.config?.metadata, this.agentExecutor.metadata, {
|
|
159
159
|
verbose: this.agentExecutor.verbose,
|
|
160
160
|
});
|
|
161
|
-
this.runManager = await callbackManager?.handleChainStart(this.agentExecutor.toJSON(), this.inputs, undefined, undefined, this.tags, this.metadata, this.runName);
|
|
161
|
+
this.runManager = await callbackManager?.handleChainStart(this.agentExecutor.toJSON(), this.inputs, undefined, undefined, this.tags ?? this.config?.tags, this.metadata ?? this.config?.metadata, this.runName ?? this.config?.runName);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
@@ -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/fs/docx" instead. This entrypoint will be removed in 0.3.0.
|
|
13
|
+
*
|
|
12
14
|
* A class that extends the `BufferLoader` class. It represents a document
|
|
13
15
|
* loader that loads documents from DOCX files.
|
|
14
16
|
*/
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { Document } from "@langchain/core/documents";
|
|
3
3
|
import { BufferLoader } from "./buffer.js";
|
|
4
4
|
/**
|
|
5
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/docx" instead. This entrypoint will be removed in 0.3.0.
|
|
6
|
+
*
|
|
5
7
|
* A class that extends the `BufferLoader` class. It represents a document
|
|
6
8
|
* loader that loads documents from DOCX files.
|
|
7
9
|
*/
|
|
@@ -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/fs/docx" instead. This entrypoint will be removed in 0.3.0.
|
|
10
|
+
*
|
|
9
11
|
* A class that extends the `BufferLoader` class. It represents a document
|
|
10
12
|
* loader that loads documents from DOCX files.
|
|
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/fs/epub" instead. This entrypoint will be removed in 0.3.0.
|
|
13
|
+
*
|
|
12
14
|
* A class that extends the `BaseDocumentLoader` class. It represents a
|
|
13
15
|
* document loader that loads documents from EPUB files.
|
|
14
16
|
*/
|
|
@@ -2,6 +2,8 @@ import type { EPub } from "epub2";
|
|
|
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/fs/epub" instead. This entrypoint will be removed in 0.3.0.
|
|
6
|
+
*
|
|
5
7
|
* A class that extends the `BaseDocumentLoader` class. It represents a
|
|
6
8
|
* document loader that loads documents from EPUB files.
|
|
7
9
|
*/
|
|
@@ -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/fs/epub" instead. This entrypoint will be removed in 0.3.0.
|
|
10
|
+
*
|
|
9
11
|
* A class that extends the `BaseDocumentLoader` class. It represents a
|
|
10
12
|
* document loader that loads documents from EPUB files.
|
|
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/fs/notion" instead. This entrypoint will be removed in 0.3.0.
|
|
13
|
+
*
|
|
12
14
|
* A class that extends the DirectoryLoader class. It represents a
|
|
13
15
|
* document loader that loads documents from a directory in the Notion
|
|
14
16
|
* format. It uses the TextLoader for loading '.md' files and ignores
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { DirectoryLoader } from "./directory.js";
|
|
2
2
|
/**
|
|
3
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/notion" instead. This entrypoint will be removed in 0.3.0.
|
|
4
|
+
*
|
|
3
5
|
* A class that extends the DirectoryLoader class. It represents a
|
|
4
6
|
* document loader that loads documents from a directory in the Notion
|
|
5
7
|
* format. It uses the TextLoader for loading '.md' files and ignores
|
|
@@ -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/fs/notion" instead. This entrypoint will be removed in 0.3.0.
|
|
10
|
+
*
|
|
9
11
|
* A class that extends the DirectoryLoader class. It represents a
|
|
10
12
|
* document loader that loads documents from a directory in the Notion
|
|
11
13
|
* format. It uses the TextLoader for loading '.md' files and ignores
|
|
@@ -225,6 +225,8 @@ Object.defineProperty(ObsidianFileLoader, "DATAVIEW_INLINE_PAREN_REGEX", {
|
|
|
225
225
|
value: /\((\w+)::\s*(.*)\)/gm
|
|
226
226
|
});
|
|
227
227
|
/**
|
|
228
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/obsidian" instead. This entrypoint will be removed in 0.3.0.
|
|
229
|
+
*
|
|
228
230
|
* Represents a loader for directories containing Obsidian markdown files. This loader extends
|
|
229
231
|
* the DirectoryLoader and provides functionality to load and parse '.md' files with YAML frontmatter,
|
|
230
232
|
* Obsidian tags, and Dataview fields.
|
|
@@ -11,6 +11,8 @@ export interface ObsidianFileLoaderOptions {
|
|
|
11
11
|
collectMetadata?: boolean;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/obsidian" instead. This entrypoint will be removed in 0.3.0.
|
|
15
|
+
*
|
|
14
16
|
* Represents a loader for directories containing Obsidian markdown files. This loader extends
|
|
15
17
|
* the DirectoryLoader and provides functionality to load and parse '.md' files with YAML frontmatter,
|
|
16
18
|
* Obsidian tags, and Dataview fields.
|
|
@@ -219,6 +219,8 @@ Object.defineProperty(ObsidianFileLoader, "DATAVIEW_INLINE_PAREN_REGEX", {
|
|
|
219
219
|
value: /\((\w+)::\s*(.*)\)/gm
|
|
220
220
|
});
|
|
221
221
|
/**
|
|
222
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/obsidian" instead. This entrypoint will be removed in 0.3.0.
|
|
223
|
+
*
|
|
222
224
|
* Represents a loader for directories containing Obsidian markdown files. This loader extends
|
|
223
225
|
* the DirectoryLoader and provides functionality to load and parse '.md' files with YAML frontmatter,
|
|
224
226
|
* Obsidian tags, and Dataview fields.
|
|
@@ -11,6 +11,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
11
11
|
});
|
|
12
12
|
const MODEL_NAME = "whisper-1";
|
|
13
13
|
/**
|
|
14
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/openai_whisper_audio" instead. This entrypoint will be removed in 0.3.0.
|
|
15
|
+
*
|
|
14
16
|
* @example
|
|
15
17
|
* ```typescript
|
|
16
18
|
* const loader = new OpenAIWhisperAudio(
|
|
@@ -3,6 +3,8 @@ import { type ClientOptions } from "@langchain/openai";
|
|
|
3
3
|
import { Document } from "@langchain/core/documents";
|
|
4
4
|
import { BufferLoader } from "./buffer.js";
|
|
5
5
|
/**
|
|
6
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/openai_whisper_audio" instead. This entrypoint will be removed in 0.3.0.
|
|
7
|
+
*
|
|
6
8
|
* @example
|
|
7
9
|
* ```typescript
|
|
8
10
|
* const loader = new OpenAIWhisperAudio(
|
|
@@ -8,6 +8,8 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
8
8
|
});
|
|
9
9
|
const MODEL_NAME = "whisper-1";
|
|
10
10
|
/**
|
|
11
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/openai_whisper_audio" instead. This entrypoint will be removed in 0.3.0.
|
|
12
|
+
*
|
|
11
13
|
* @example
|
|
12
14
|
* ```typescript
|
|
13
15
|
* const loader = new OpenAIWhisperAudio(
|
|
@@ -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/fs/pdf" instead. This entrypoint will be removed in 0.3.0.
|
|
14
|
+
*
|
|
13
15
|
* A class that extends the `BufferLoader` class. It represents a document
|
|
14
16
|
* loader that loads documents from PDF files.
|
|
15
17
|
* @example
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { Document } from "@langchain/core/documents";
|
|
4
4
|
import { BufferLoader } from "./buffer.js";
|
|
5
5
|
/**
|
|
6
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/pdf" instead. This entrypoint will be removed in 0.3.0.
|
|
7
|
+
*
|
|
6
8
|
* A class that extends the `BufferLoader` class. It represents a document
|
|
7
9
|
* loader that loads documents from PDF files.
|
|
8
10
|
* @example
|
|
@@ -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/fs/pdf" instead. This entrypoint will be removed in 0.3.0.
|
|
11
|
+
*
|
|
10
12
|
* A class that extends the `BufferLoader` class. It represents a document
|
|
11
13
|
* loader that loads documents from PDF files.
|
|
12
14
|
* @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/fs/pptx" instead. This entrypoint will be removed in 0.3.0.
|
|
14
|
+
*
|
|
13
15
|
* A class that extends the `BufferLoader` class. It represents a document
|
|
14
16
|
* loader that loads documents from PDF files.
|
|
15
17
|
*/
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { Document } from "@langchain/core/documents";
|
|
3
3
|
import { BufferLoader } from "./buffer.js";
|
|
4
4
|
/**
|
|
5
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/pptx" instead. This entrypoint will be removed in 0.3.0.
|
|
6
|
+
*
|
|
5
7
|
* A class that extends the `BufferLoader` class. It represents a document
|
|
6
8
|
* loader that loads documents from PDF files.
|
|
7
9
|
*/
|
|
@@ -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/fs/pptx" instead. This entrypoint will be removed in 0.3.0.
|
|
11
|
+
*
|
|
10
12
|
* A class that extends the `BufferLoader` class. It represents a document
|
|
11
13
|
* loader that loads documents from PDF files.
|
|
12
14
|
*/
|
|
@@ -12,6 +12,8 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
12
12
|
newPackageName: "@langchain/community",
|
|
13
13
|
});
|
|
14
14
|
/**
|
|
15
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/srt" instead. This entrypoint will be removed in 0.3.0.
|
|
16
|
+
*
|
|
15
17
|
* A class that extends the `TextLoader` class. It represents a document
|
|
16
18
|
* loader that loads documents from SRT (SubRip) subtitle files. It has a
|
|
17
19
|
* constructor that takes a `filePathOrBlob` parameter representing the
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { TextLoader } from "./text.js";
|
|
2
2
|
/**
|
|
3
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/srt" instead. This entrypoint will be removed in 0.3.0.
|
|
4
|
+
*
|
|
3
5
|
* A class that extends the `TextLoader` class. It represents a document
|
|
4
6
|
* loader that loads documents from SRT (SubRip) subtitle files. It has a
|
|
5
7
|
* constructor that takes a `filePathOrBlob` parameter representing the
|
|
@@ -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/fs/srt" instead. This entrypoint will be removed in 0.3.0.
|
|
10
|
+
*
|
|
9
11
|
* A class that extends the `TextLoader` class. It represents a document
|
|
10
12
|
* loader that loads documents from SRT (SubRip) subtitle files. It has a
|
|
11
13
|
* constructor that takes a `filePathOrBlob` parameter representing the
|
|
@@ -33,6 +33,8 @@ const UNSTRUCTURED_API_FILETYPES = [
|
|
|
33
33
|
".epub",
|
|
34
34
|
];
|
|
35
35
|
/**
|
|
36
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/unstructured" instead. This entrypoint will be removed in 0.3.0.
|
|
37
|
+
*
|
|
36
38
|
* A document loader that uses the Unstructured API to load unstructured
|
|
37
39
|
* documents. It supports both the new syntax with options object and the
|
|
38
40
|
* legacy syntax for backward compatibility. The load() method sends a
|
|
@@ -244,7 +246,7 @@ class UnstructuredLoader extends base_js_1.BaseDocumentLoader {
|
|
|
244
246
|
const documents = [];
|
|
245
247
|
for (const element of elements) {
|
|
246
248
|
const { metadata, text } = element;
|
|
247
|
-
if (typeof text === "string") {
|
|
249
|
+
if (typeof text === "string" && text !== "") {
|
|
248
250
|
documents.push(new documents_1.Document({
|
|
249
251
|
pageContent: text,
|
|
250
252
|
metadata: {
|
|
@@ -64,6 +64,8 @@ type UnstructuredDirectoryLoaderOptions = UnstructuredLoaderOptions & {
|
|
|
64
64
|
unknown?: UnknownHandling;
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/unstructured" instead. This entrypoint will be removed in 0.3.0.
|
|
68
|
+
*
|
|
67
69
|
* A document loader that uses the Unstructured API to load unstructured
|
|
68
70
|
* documents. It supports both the new syntax with options object and the
|
|
69
71
|
* legacy syntax for backward compatibility. The load() method sends a
|
|
@@ -29,6 +29,8 @@ const UNSTRUCTURED_API_FILETYPES = [
|
|
|
29
29
|
".epub",
|
|
30
30
|
];
|
|
31
31
|
/**
|
|
32
|
+
* @deprecated - Import from "@langchain/community/document_loaders/fs/unstructured" instead. This entrypoint will be removed in 0.3.0.
|
|
33
|
+
*
|
|
32
34
|
* A document loader that uses the Unstructured API to load unstructured
|
|
33
35
|
* documents. It supports both the new syntax with options object and the
|
|
34
36
|
* legacy syntax for backward compatibility. The load() method sends a
|
|
@@ -240,7 +242,7 @@ export class UnstructuredLoader extends BaseDocumentLoader {
|
|
|
240
242
|
const documents = [];
|
|
241
243
|
for (const element of elements) {
|
|
242
244
|
const { metadata, text } = element;
|
|
243
|
-
if (typeof text === "string") {
|
|
245
|
+
if (typeof text === "string" && text !== "") {
|
|
244
246
|
documents.push(new Document({
|
|
245
247
|
pageContent: text,
|
|
246
248
|
metadata: {
|
|
@@ -12,6 +12,7 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
12
12
|
newPackageName: "@langchain/community",
|
|
13
13
|
});
|
|
14
14
|
/**
|
|
15
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/apify_dataset" instead. This entrypoint will be removed in 0.3.0.
|
|
15
16
|
* A class that extends the BaseDocumentLoader and implements the
|
|
16
17
|
* DocumentLoader interface. It represents a document loader that loads
|
|
17
18
|
* documents from an Apify dataset.
|
|
@@ -3,6 +3,7 @@ import { Document } from "@langchain/core/documents";
|
|
|
3
3
|
import { AsyncCaller, AsyncCallerParams } from "@langchain/core/utils/async_caller";
|
|
4
4
|
import { BaseDocumentLoader, DocumentLoader } from "../base.js";
|
|
5
5
|
/**
|
|
6
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/apify_dataset" instead. This entrypoint will be removed in 0.3.0.
|
|
6
7
|
* A type that represents a function that takes a single object (an Apify
|
|
7
8
|
* dataset item) and converts it to an instance of the Document class.
|
|
8
9
|
*
|
|
@@ -15,6 +16,7 @@ export interface ApifyDatasetLoaderConfig<Metadata extends Record<string, any>>
|
|
|
15
16
|
clientOptions?: ApifyClientOptions;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
19
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/apify_dataset" instead. This entrypoint will be removed in 0.3.0.
|
|
18
20
|
* A class that extends the BaseDocumentLoader and implements the
|
|
19
21
|
* DocumentLoader interface. It represents a document loader that loads
|
|
20
22
|
* documents from an Apify dataset.
|
|
@@ -9,6 +9,7 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
9
9
|
newPackageName: "@langchain/community",
|
|
10
10
|
});
|
|
11
11
|
/**
|
|
12
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/apify_dataset" instead. This entrypoint will be removed in 0.3.0.
|
|
12
13
|
* A class that extends the BaseDocumentLoader and implements the
|
|
13
14
|
* DocumentLoader interface. It represents a document loader that loads
|
|
14
15
|
* documents from an Apify dataset.
|
|
@@ -11,6 +11,7 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
11
11
|
newPackageName: "@langchain/community",
|
|
12
12
|
});
|
|
13
13
|
/**
|
|
14
|
+
* @deprecated
|
|
14
15
|
* Base class for AssemblyAI loaders.
|
|
15
16
|
*/
|
|
16
17
|
class AssemblyAILoader extends base_js_1.BaseDocumentLoader {
|
|
@@ -40,6 +41,9 @@ class AssemblyAILoader extends base_js_1.BaseDocumentLoader {
|
|
|
40
41
|
this.client = new assemblyai_1.AssemblyAI(options);
|
|
41
42
|
}
|
|
42
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated
|
|
46
|
+
*/
|
|
43
47
|
class CreateTranscriptLoader extends AssemblyAILoader {
|
|
44
48
|
/**
|
|
45
49
|
* Transcribe audio or retrieve an existing transcript by its ID.
|
|
@@ -91,6 +95,7 @@ class CreateTranscriptLoader extends AssemblyAILoader {
|
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
/**
|
|
98
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
94
99
|
* Transcribe audio and load the transcript as a document using AssemblyAI.
|
|
95
100
|
*/
|
|
96
101
|
class AudioTranscriptLoader extends CreateTranscriptLoader {
|
|
@@ -111,6 +116,7 @@ class AudioTranscriptLoader extends CreateTranscriptLoader {
|
|
|
111
116
|
}
|
|
112
117
|
exports.AudioTranscriptLoader = AudioTranscriptLoader;
|
|
113
118
|
/**
|
|
119
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
114
120
|
* Transcribe audio and load the paragraphs of the transcript, creating a document for each paragraph.
|
|
115
121
|
*/
|
|
116
122
|
class AudioTranscriptParagraphsLoader extends CreateTranscriptLoader {
|
|
@@ -129,6 +135,7 @@ class AudioTranscriptParagraphsLoader extends CreateTranscriptLoader {
|
|
|
129
135
|
}
|
|
130
136
|
exports.AudioTranscriptParagraphsLoader = AudioTranscriptParagraphsLoader;
|
|
131
137
|
/**
|
|
138
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
132
139
|
* Transcribe audio and load the sentences of the transcript, creating a document for each sentence.
|
|
133
140
|
*/
|
|
134
141
|
class AudioTranscriptSentencesLoader extends CreateTranscriptLoader {
|
|
@@ -147,6 +154,7 @@ class AudioTranscriptSentencesLoader extends CreateTranscriptLoader {
|
|
|
147
154
|
}
|
|
148
155
|
exports.AudioTranscriptSentencesLoader = AudioTranscriptSentencesLoader;
|
|
149
156
|
/**
|
|
157
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
150
158
|
* Transcribe audio and load subtitles for the transcript as `srt` or `vtt` format.
|
|
151
159
|
*/
|
|
152
160
|
class AudioSubtitleLoader extends CreateTranscriptLoader {
|
|
@@ -4,6 +4,7 @@ import { BaseDocumentLoader } from "../base.js";
|
|
|
4
4
|
import { AssemblyAIOptions } from "../../types/assemblyai-types.js";
|
|
5
5
|
export type * from "../../types/assemblyai-types.js";
|
|
6
6
|
/**
|
|
7
|
+
* @deprecated
|
|
7
8
|
* Base class for AssemblyAI loaders.
|
|
8
9
|
*/
|
|
9
10
|
declare abstract class AssemblyAILoader extends BaseDocumentLoader {
|
|
@@ -15,6 +16,9 @@ declare abstract class AssemblyAILoader extends BaseDocumentLoader {
|
|
|
15
16
|
*/
|
|
16
17
|
constructor(assemblyAIOptions?: AssemblyAIOptions);
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated
|
|
21
|
+
*/
|
|
18
22
|
declare abstract class CreateTranscriptLoader extends AssemblyAILoader {
|
|
19
23
|
protected transcribeParams?: TranscribeParams | CreateTranscriptParameters;
|
|
20
24
|
protected transcriptId?: string;
|
|
@@ -28,6 +32,7 @@ declare abstract class CreateTranscriptLoader extends AssemblyAILoader {
|
|
|
28
32
|
protected transcribeOrGetTranscript(): Promise<Transcript>;
|
|
29
33
|
}
|
|
30
34
|
/**
|
|
35
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
31
36
|
* Transcribe audio and load the transcript as a document using AssemblyAI.
|
|
32
37
|
*/
|
|
33
38
|
export declare class AudioTranscriptLoader extends CreateTranscriptLoader {
|
|
@@ -39,6 +44,7 @@ export declare class AudioTranscriptLoader extends CreateTranscriptLoader {
|
|
|
39
44
|
load(): Promise<Document<Transcript>[]>;
|
|
40
45
|
}
|
|
41
46
|
/**
|
|
47
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
42
48
|
* Transcribe audio and load the paragraphs of the transcript, creating a document for each paragraph.
|
|
43
49
|
*/
|
|
44
50
|
export declare class AudioTranscriptParagraphsLoader extends CreateTranscriptLoader {
|
|
@@ -49,6 +55,7 @@ export declare class AudioTranscriptParagraphsLoader extends CreateTranscriptLoa
|
|
|
49
55
|
load(): Promise<Document<TranscriptParagraph>[]>;
|
|
50
56
|
}
|
|
51
57
|
/**
|
|
58
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
52
59
|
* Transcribe audio and load the sentences of the transcript, creating a document for each sentence.
|
|
53
60
|
*/
|
|
54
61
|
export declare class AudioTranscriptSentencesLoader extends CreateTranscriptLoader {
|
|
@@ -59,6 +66,7 @@ export declare class AudioTranscriptSentencesLoader extends CreateTranscriptLoad
|
|
|
59
66
|
load(): Promise<Document<TranscriptSentence>[]>;
|
|
60
67
|
}
|
|
61
68
|
/**
|
|
69
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
62
70
|
* Transcribe audio and load subtitles for the transcript as `srt` or `vtt` format.
|
|
63
71
|
*/
|
|
64
72
|
export declare class AudioSubtitleLoader extends CreateTranscriptLoader {
|
|
@@ -8,6 +8,7 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
8
8
|
newPackageName: "@langchain/community",
|
|
9
9
|
});
|
|
10
10
|
/**
|
|
11
|
+
* @deprecated
|
|
11
12
|
* Base class for AssemblyAI loaders.
|
|
12
13
|
*/
|
|
13
14
|
class AssemblyAILoader extends BaseDocumentLoader {
|
|
@@ -37,6 +38,9 @@ class AssemblyAILoader extends BaseDocumentLoader {
|
|
|
37
38
|
this.client = new AssemblyAI(options);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated
|
|
43
|
+
*/
|
|
40
44
|
class CreateTranscriptLoader extends AssemblyAILoader {
|
|
41
45
|
/**
|
|
42
46
|
* Transcribe audio or retrieve an existing transcript by its ID.
|
|
@@ -88,6 +92,7 @@ class CreateTranscriptLoader extends AssemblyAILoader {
|
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
/**
|
|
95
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
91
96
|
* Transcribe audio and load the transcript as a document using AssemblyAI.
|
|
92
97
|
*/
|
|
93
98
|
export class AudioTranscriptLoader extends CreateTranscriptLoader {
|
|
@@ -107,6 +112,7 @@ export class AudioTranscriptLoader extends CreateTranscriptLoader {
|
|
|
107
112
|
}
|
|
108
113
|
}
|
|
109
114
|
/**
|
|
115
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
110
116
|
* Transcribe audio and load the paragraphs of the transcript, creating a document for each paragraph.
|
|
111
117
|
*/
|
|
112
118
|
export class AudioTranscriptParagraphsLoader extends CreateTranscriptLoader {
|
|
@@ -124,6 +130,7 @@ export class AudioTranscriptParagraphsLoader extends CreateTranscriptLoader {
|
|
|
124
130
|
}
|
|
125
131
|
}
|
|
126
132
|
/**
|
|
133
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
127
134
|
* Transcribe audio and load the sentences of the transcript, creating a document for each sentence.
|
|
128
135
|
*/
|
|
129
136
|
export class AudioTranscriptSentencesLoader extends CreateTranscriptLoader {
|
|
@@ -141,6 +148,7 @@ export class AudioTranscriptSentencesLoader extends CreateTranscriptLoader {
|
|
|
141
148
|
}
|
|
142
149
|
}
|
|
143
150
|
/**
|
|
151
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/assemblyai" instead. This entrypoint will be removed in 0.3.0.
|
|
144
152
|
* Transcribe audio and load subtitles for the transcript as `srt` or `vtt` format.
|
|
145
153
|
*/
|
|
146
154
|
export class AudioSubtitleLoader extends CreateTranscriptLoader {
|
|
@@ -10,6 +10,7 @@ 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/azure_blog_storage_container" instead. This entrypoint will be removed in 0.3.0.
|
|
13
14
|
* Class representing a document loader that loads documents from an Azure
|
|
14
15
|
* Blob Storage container. It extends the BaseDocumentLoader class.
|
|
15
16
|
*/
|
|
@@ -23,6 +23,7 @@ interface AzureBlobStorageContainerLoaderConfig {
|
|
|
23
23
|
unstructuredConfig?: UnstructuredLoaderOptions;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/azure_blog_storage_container" instead. This entrypoint will be removed in 0.3.0.
|
|
26
27
|
* Class representing a document loader that loads documents from an Azure
|
|
27
28
|
* Blob Storage container. It extends the BaseDocumentLoader class.
|
|
28
29
|
*/
|
|
@@ -7,6 +7,7 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
7
7
|
newPackageName: "@langchain/community",
|
|
8
8
|
});
|
|
9
9
|
/**
|
|
10
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/azure_blog_storage_container" instead. This entrypoint will be removed in 0.3.0.
|
|
10
11
|
* Class representing a document loader that loads documents from an Azure
|
|
11
12
|
* Blob Storage container. It extends the BaseDocumentLoader class.
|
|
12
13
|
*/
|
|
@@ -36,6 +36,7 @@ const entrypoint_deprecation_js_1 = require("../../util/entrypoint_deprecation.c
|
|
|
36
36
|
newPackageName: "@langchain/community",
|
|
37
37
|
});
|
|
38
38
|
/**
|
|
39
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/azure_blog_storage_file" instead. This entrypoint will be removed in 0.3.0.
|
|
39
40
|
* Class representing a document loader that loads a specific file from
|
|
40
41
|
* Azure Blob Storage. It extends the BaseDocumentLoader class and
|
|
41
42
|
* implements the DocumentLoader interface.
|
|
@@ -19,6 +19,7 @@ interface AzureBlobStorageFileLoaderConfig {
|
|
|
19
19
|
unstructuredConfig?: UnstructuredLoaderOptions;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/azure_blog_storage_file" instead. This entrypoint will be removed in 0.3.0.
|
|
22
23
|
* Class representing a document loader that loads a specific file from
|
|
23
24
|
* Azure Blob Storage. It extends the BaseDocumentLoader class and
|
|
24
25
|
* implements the DocumentLoader interface.
|
|
@@ -10,6 +10,7 @@ import { logVersion020MigrationWarning } from "../../util/entrypoint_deprecation
|
|
|
10
10
|
newPackageName: "@langchain/community",
|
|
11
11
|
});
|
|
12
12
|
/**
|
|
13
|
+
* @deprecated - Import from "@langchain/community/document_loaders/web/azure_blog_storage_file" instead. This entrypoint will be removed in 0.3.0.
|
|
13
14
|
* Class representing a document loader that loads a specific file from
|
|
14
15
|
* Azure Blob Storage. It extends the BaseDocumentLoader class and
|
|
15
16
|
* implements the DocumentLoader interface.
|