langchain 0.1.6 → 0.1.8

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.
Files changed (38) hide show
  1. package/dist/agents/react/prompt.cjs +1 -1
  2. package/dist/agents/react/prompt.js +1 -1
  3. package/dist/agents/toolkits/conversational_retrieval/openai_functions.cjs +3 -1
  4. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.ts +1 -0
  5. package/dist/agents/toolkits/conversational_retrieval/openai_functions.js +3 -1
  6. package/dist/chains/constitutional_ai/constitutional_principle.js +1 -1
  7. package/dist/document_loaders/web/github.cjs +1 -1
  8. package/dist/document_loaders/web/github.js +1 -1
  9. package/dist/evaluation/comparison/pairwise.cjs +1 -1
  10. package/dist/evaluation/comparison/pairwise.js +1 -1
  11. package/dist/evaluation/criteria/criteria.cjs +1 -1
  12. package/dist/evaluation/criteria/criteria.js +1 -1
  13. package/dist/indexes/index.cjs +5 -0
  14. package/dist/indexes/index.d.ts +1 -0
  15. package/dist/indexes/index.js +1 -0
  16. package/dist/indexes/indexing.cjs +265 -0
  17. package/dist/indexes/indexing.d.ts +75 -0
  18. package/dist/indexes/indexing.js +261 -0
  19. package/dist/load/import_map.cjs +2 -1
  20. package/dist/load/import_map.d.ts +1 -0
  21. package/dist/load/import_map.js +1 -0
  22. package/dist/smith/config.d.ts +76 -26
  23. package/dist/smith/index.cjs +15 -0
  24. package/dist/smith/index.d.ts +3 -3
  25. package/dist/smith/index.js +2 -1
  26. package/dist/smith/runner_utils.cjs +56 -6
  27. package/dist/smith/runner_utils.d.ts +4 -4
  28. package/dist/smith/runner_utils.js +57 -7
  29. package/indexes.cjs +1 -0
  30. package/indexes.d.ts +1 -0
  31. package/indexes.js +1 -0
  32. package/package.json +28 -11
  33. package/tools/chain.cjs +1 -0
  34. package/tools/chain.d.ts +1 -0
  35. package/tools/chain.js +1 -0
  36. package/index.cjs +0 -1
  37. package/index.d.ts +0 -1
  38. package/index.js +0 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FORMAT_INSTRUCTIONS = void 0;
4
- exports.FORMAT_INSTRUCTIONS /* #__PURE__ */ = `Use the following format:
4
+ exports.FORMAT_INSTRUCTIONS = `Use the following format:
5
5
 
6
6
  Question: the input question you must answer
7
7
  Thought: you should always think about what to do
@@ -1,4 +1,4 @@
1
- export const FORMAT_INSTRUCTIONS /* #__PURE__ */ = `Use the following format:
1
+ export const FORMAT_INSTRUCTIONS = `Use the following format:
2
2
 
3
3
  Question: the input question you must answer
4
4
  Thought: you should always think about what to do
@@ -15,13 +15,14 @@ const token_buffer_memory_js_1 = require("./token_buffer_memory.cjs");
15
15
  * @returns A Promise that resolves to an initialized AgentExecutor.
16
16
  */
17
17
  async function createConversationalRetrievalAgent(llm, tools, options) {
18
- const { rememberIntermediateSteps = true, memoryKey = "chat_history", outputKey = "output", prefix, verbose, } = options ?? {};
18
+ const { rememberIntermediateSteps = true, memoryKey = "chat_history", outputKey = "output", inputKey = "input", prefix, verbose, } = options ?? {};
19
19
  let memory;
20
20
  if (rememberIntermediateSteps) {
21
21
  memory = new token_buffer_memory_js_1.OpenAIAgentTokenBufferMemory({
22
22
  memoryKey,
23
23
  llm,
24
24
  outputKey,
25
+ inputKey,
25
26
  });
26
27
  }
27
28
  else {
@@ -31,6 +32,7 @@ async function createConversationalRetrievalAgent(llm, tools, options) {
31
32
  maxTokenLimit: 12000,
32
33
  returnMessages: true,
33
34
  outputKey,
35
+ inputKey,
34
36
  });
35
37
  }
36
38
  const executor = await (0, initialize_js_1.initializeAgentExecutorWithOptions)(tools, llm, {
@@ -4,6 +4,7 @@ export type ConversationalRetrievalAgentOptions = {
4
4
  rememberIntermediateSteps?: boolean;
5
5
  memoryKey?: string;
6
6
  outputKey?: string;
7
+ inputKey?: string;
7
8
  prefix?: string;
8
9
  verbose?: boolean;
9
10
  };
@@ -12,13 +12,14 @@ import { OpenAIAgentTokenBufferMemory } from "./token_buffer_memory.js";
12
12
  * @returns A Promise that resolves to an initialized AgentExecutor.
13
13
  */
14
14
  export async function createConversationalRetrievalAgent(llm, tools, options) {
15
- const { rememberIntermediateSteps = true, memoryKey = "chat_history", outputKey = "output", prefix, verbose, } = options ?? {};
15
+ const { rememberIntermediateSteps = true, memoryKey = "chat_history", outputKey = "output", inputKey = "input", prefix, verbose, } = options ?? {};
16
16
  let memory;
17
17
  if (rememberIntermediateSteps) {
18
18
  memory = new OpenAIAgentTokenBufferMemory({
19
19
  memoryKey,
20
20
  llm,
21
21
  outputKey,
22
+ inputKey,
22
23
  });
23
24
  }
24
25
  else {
@@ -28,6 +29,7 @@ export async function createConversationalRetrievalAgent(llm, tools, options) {
28
29
  maxTokenLimit: 12000,
29
30
  returnMessages: true,
30
31
  outputKey,
32
+ inputKey,
31
33
  });
32
34
  }
33
35
  const executor = await initializeAgentExecutorWithOptions(tools, llm, {
@@ -56,7 +56,7 @@ export class ConstitutionalPrinciple {
56
56
  };
57
57
  }
58
58
  }
59
- export const PRINCIPLES = /* #__PURE__ */ {
59
+ export const PRINCIPLES = {
60
60
  harmful1: /* #__PURE__ */ new ConstitutionalPrinciple({
61
61
  name: "harmful1",
62
62
  critiqueRequest: "Identify specific ways in which the assistant’s last response is harmful, unethical, racist, sexist, toxic, dangerous, or illegal.",
@@ -12,7 +12,7 @@ const async_caller_1 = require("@langchain/core/utils/async_caller");
12
12
  const base_js_1 = require("../base.cjs");
13
13
  const directory_js_1 = require("../fs/directory.cjs");
14
14
  const extname_js_1 = require("../../util/extname.cjs");
15
- const extensions = new Set(binary_extensions_1.default);
15
+ const extensions = /* #__PURE__ */ new Set(binary_extensions_1.default);
16
16
  /**
17
17
  * A function that checks if a file path is a binary file based on its
18
18
  * extension.
@@ -6,7 +6,7 @@ import { AsyncCaller, } from "@langchain/core/utils/async_caller";
6
6
  import { BaseDocumentLoader } from "../base.js";
7
7
  import { UnknownHandling } from "../fs/directory.js";
8
8
  import { extname } from "../../util/extname.js";
9
- const extensions = new Set(binaryExtensions);
9
+ const extensions = /* #__PURE__ */ new Set(binaryExtensions);
10
10
  /**
11
11
  * A function that checks if a file path is a binary file based on its
12
12
  * extension.
@@ -6,7 +6,7 @@ const outputs_1 = require("@langchain/core/outputs");
6
6
  const base_js_1 = require("../base.cjs");
7
7
  const prompt_js_1 = require("./prompt.cjs");
8
8
  const index_js_1 = require("../../chains/index.cjs");
9
- const SUPPORTED_CRITERIA = /* #__PURE__ */ {
9
+ const SUPPORTED_CRITERIA = {
10
10
  conciseness: "Is the submission concise and to the point?",
11
11
  relevance: "Is the submission referring to a real quote from the text?",
12
12
  correctness: "Is the submission correct, accurate, and factual?",
@@ -3,7 +3,7 @@ import { RUN_KEY } from "@langchain/core/outputs";
3
3
  import { eqSet, LLMPairwiseStringEvaluator, } from "../base.js";
4
4
  import { PROMPT, PROMPT_WITH_REFERENCES } from "./prompt.js";
5
5
  import { ConstitutionalPrinciple } from "../../chains/index.js";
6
- const SUPPORTED_CRITERIA = /* #__PURE__ */ {
6
+ const SUPPORTED_CRITERIA = {
7
7
  conciseness: "Is the submission concise and to the point?",
8
8
  relevance: "Is the submission referring to a real quote from the text?",
9
9
  correctness: "Is the submission correct, accurate, and factual?",
@@ -6,7 +6,7 @@ const outputs_1 = require("@langchain/core/outputs");
6
6
  const base_js_1 = require("../base.cjs");
7
7
  const prompt_js_1 = require("./prompt.cjs");
8
8
  const constitutional_principle_js_1 = require("../../chains/constitutional_ai/constitutional_principle.cjs");
9
- const SUPPORTED_CRITERIA = /* #__PURE__ */ {
9
+ const SUPPORTED_CRITERIA = {
10
10
  conciseness: "Is the submission concise and to the point?",
11
11
  relevance: "Is the submission referring to a real quote from the text?",
12
12
  correctness: "Is the submission correct, accurate, and factual?",
@@ -3,7 +3,7 @@ import { RUN_KEY } from "@langchain/core/outputs";
3
3
  import { eqSet, LLMStringEvaluator, } from "../base.js";
4
4
  import { CRITERIA_PROMPT, PROMPT_WITH_REFERENCES } from "./prompt.js";
5
5
  import { ConstitutionalPrinciple } from "../../chains/constitutional_ai/constitutional_principle.js";
6
- const SUPPORTED_CRITERIA = /* #__PURE__ */ {
6
+ const SUPPORTED_CRITERIA = {
7
7
  conciseness: "Is the submission concise and to the point?",
8
8
  relevance: "Is the submission referring to a real quote from the text?",
9
9
  correctness: "Is the submission correct, accurate, and factual?",
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.index = void 0;
4
+ var indexing_js_1 = require("./indexing.cjs");
5
+ Object.defineProperty(exports, "index", { enumerable: true, get: function () { return indexing_js_1.index; } });
@@ -0,0 +1 @@
1
+ export { type CleanupMode, type IndexOptions, index } from "./indexing.js";
@@ -0,0 +1 @@
1
+ export { index } from "./indexing.js";
@@ -0,0 +1,265 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.index = void 0;
4
+ const uuid_1 = require("uuid");
5
+ const base_1 = require("@langchain/community/indexes/base");
6
+ const hash_1 = require("@langchain/core/utils/hash");
7
+ const document_js_1 = require("../document.cjs");
8
+ /**
9
+ * HashedDocument is a Document with hashes calculated.
10
+ * Hashes are calculated based on page content and metadata.
11
+ * It is used for indexing.
12
+ */
13
+ class HashedDocument {
14
+ constructor(fields) {
15
+ Object.defineProperty(this, "uid", {
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true,
19
+ value: void 0
20
+ });
21
+ Object.defineProperty(this, "hash_", {
22
+ enumerable: true,
23
+ configurable: true,
24
+ writable: true,
25
+ value: void 0
26
+ });
27
+ Object.defineProperty(this, "contentHash", {
28
+ enumerable: true,
29
+ configurable: true,
30
+ writable: true,
31
+ value: void 0
32
+ });
33
+ Object.defineProperty(this, "metadataHash", {
34
+ enumerable: true,
35
+ configurable: true,
36
+ writable: true,
37
+ value: void 0
38
+ });
39
+ Object.defineProperty(this, "pageContent", {
40
+ enumerable: true,
41
+ configurable: true,
42
+ writable: true,
43
+ value: void 0
44
+ });
45
+ Object.defineProperty(this, "metadata", {
46
+ enumerable: true,
47
+ configurable: true,
48
+ writable: true,
49
+ value: void 0
50
+ });
51
+ this.uid = fields.uid;
52
+ this.pageContent = fields.pageContent;
53
+ this.metadata = fields.metadata;
54
+ }
55
+ calculateHashes() {
56
+ const forbiddenKeys = ["hash_", "content_hash", "metadata_hash"];
57
+ for (const key of forbiddenKeys) {
58
+ if (key in this.metadata) {
59
+ throw new Error(`Metadata cannot contain key ${key} as it is reserved for internal use. Restricted keys: [${forbiddenKeys.join(", ")}]`);
60
+ }
61
+ }
62
+ const contentHash = this._hashStringToUUID(this.pageContent);
63
+ try {
64
+ const metadataHash = this._hashNestedDictToUUID(this.metadata);
65
+ this.contentHash = contentHash;
66
+ this.metadataHash = metadataHash;
67
+ }
68
+ catch (e) {
69
+ throw new Error(`Failed to hash metadata: ${e}. Please use a dict that can be serialized using json.`);
70
+ }
71
+ this.hash_ = this._hashStringToUUID(this.contentHash + this.metadataHash);
72
+ if (!this.uid) {
73
+ this.uid = this.hash_;
74
+ }
75
+ }
76
+ toDocument() {
77
+ return new document_js_1.Document({
78
+ pageContent: this.pageContent,
79
+ metadata: this.metadata,
80
+ });
81
+ }
82
+ static fromDocument(document, uid) {
83
+ const doc = new this({
84
+ pageContent: document.pageContent,
85
+ metadata: document.metadata,
86
+ uid: uid || document.uid,
87
+ });
88
+ doc.calculateHashes();
89
+ return doc;
90
+ }
91
+ _hashStringToUUID(inputString) {
92
+ const hash_value = (0, hash_1.insecureHash)(inputString);
93
+ return (0, uuid_1.v5)(hash_value, base_1.UUIDV5_NAMESPACE);
94
+ }
95
+ _hashNestedDictToUUID(data) {
96
+ const serialized_data = JSON.stringify(data, Object.keys(data).sort());
97
+ const hash_value = (0, hash_1.insecureHash)(serialized_data);
98
+ return (0, uuid_1.v5)(hash_value, base_1.UUIDV5_NAMESPACE);
99
+ }
100
+ }
101
+ function batch(size, iterable) {
102
+ const batches = [];
103
+ let currentBatch = [];
104
+ iterable.forEach((item) => {
105
+ currentBatch.push(item);
106
+ if (currentBatch.length >= size) {
107
+ batches.push(currentBatch);
108
+ currentBatch = [];
109
+ }
110
+ });
111
+ if (currentBatch.length > 0) {
112
+ batches.push(currentBatch);
113
+ }
114
+ return batches;
115
+ }
116
+ function deduplicateInOrder(hashedDocuments) {
117
+ const seen = new Set();
118
+ const deduplicated = [];
119
+ for (const hashedDoc of hashedDocuments) {
120
+ if (!hashedDoc.hash_) {
121
+ throw new Error("Hashed document does not have a hash");
122
+ }
123
+ if (!seen.has(hashedDoc.hash_)) {
124
+ seen.add(hashedDoc.hash_);
125
+ deduplicated.push(hashedDoc);
126
+ }
127
+ }
128
+ return deduplicated;
129
+ }
130
+ function getSourceIdAssigner(sourceIdKey) {
131
+ if (sourceIdKey === null) {
132
+ return (_doc) => null;
133
+ }
134
+ else if (typeof sourceIdKey === "string") {
135
+ return (doc) => doc.metadata[sourceIdKey];
136
+ }
137
+ else if (typeof sourceIdKey === "function") {
138
+ return sourceIdKey;
139
+ }
140
+ else {
141
+ throw new Error(`sourceIdKey should be null, a string or a function, got ${typeof sourceIdKey}`);
142
+ }
143
+ }
144
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
145
+ const _isBaseDocumentLoader = (arg) => {
146
+ if ("load" in arg &&
147
+ typeof arg.load === "function" &&
148
+ "loadAndSplit" in arg &&
149
+ typeof arg.loadAndSplit === "function") {
150
+ return true;
151
+ }
152
+ return false;
153
+ };
154
+ /**
155
+ * Index data from the doc source into the vector store.
156
+ *
157
+ * Indexing functionality uses a manager to keep track of which documents
158
+ * are in the vector store.
159
+ *
160
+ * This allows us to keep track of which documents were updated, and which
161
+ * documents were deleted, which documents should be skipped.
162
+ *
163
+ * For the time being, documents are indexed using their hashes, and users
164
+ * are not able to specify the uid of the document.
165
+ *
166
+ * @param {IndexArgs} args
167
+ * @param {BaseDocumentLoader | DocumentInterface[]} args.docsSource The source of documents to index. Can be a DocumentLoader or a list of Documents.
168
+ * @param {RecordManagerInterface} args.recordManager The record manager to use for keeping track of indexed documents.
169
+ * @param {VectorStore} args.vectorStore The vector store to use for storing the documents.
170
+ * @param {IndexOptions | undefined} args.options Options for indexing.
171
+ * @returns {Promise<IndexingResult>}
172
+ */
173
+ async function index(args) {
174
+ const { docsSource, recordManager, vectorStore, options } = args;
175
+ const { batchSize = 100, cleanup, sourceIdKey, cleanupBatchSize = 1000, forceUpdate = false, } = options ?? {};
176
+ if (cleanup === "incremental" && !sourceIdKey) {
177
+ throw new Error("sourceIdKey is required when cleanup mode is incremental. Please provide through 'options.sourceIdKey'.");
178
+ }
179
+ const docs = _isBaseDocumentLoader(docsSource)
180
+ ? await docsSource.load()
181
+ : docsSource;
182
+ const sourceIdAssigner = getSourceIdAssigner(sourceIdKey ?? null);
183
+ const indexStartDt = await recordManager.getTime();
184
+ let numAdded = 0;
185
+ let numDeleted = 0;
186
+ let numUpdated = 0;
187
+ let numSkipped = 0;
188
+ const batches = batch(batchSize ?? 100, docs);
189
+ for (const batch of batches) {
190
+ const hashedDocs = deduplicateInOrder(batch.map((doc) => HashedDocument.fromDocument(doc)));
191
+ const sourceIds = hashedDocs.map((doc) => sourceIdAssigner(doc));
192
+ if (cleanup === "incremental") {
193
+ hashedDocs.forEach((_hashedDoc, index) => {
194
+ const source = sourceIds[index];
195
+ if (source === null) {
196
+ throw new Error("sourceIdKey must be provided when cleanup is incremental");
197
+ }
198
+ });
199
+ }
200
+ const batchExists = await recordManager.exists(hashedDocs.map((doc) => doc.uid));
201
+ const uids = [];
202
+ const docsToIndex = [];
203
+ const docsToUpdate = [];
204
+ const seenDocs = new Set();
205
+ hashedDocs.forEach((hashedDoc, i) => {
206
+ const docExists = batchExists[i];
207
+ if (docExists) {
208
+ if (forceUpdate) {
209
+ seenDocs.add(hashedDoc.uid);
210
+ }
211
+ else {
212
+ docsToUpdate.push(hashedDoc.uid);
213
+ return;
214
+ }
215
+ }
216
+ uids.push(hashedDoc.uid);
217
+ docsToIndex.push(hashedDoc.toDocument());
218
+ });
219
+ if (docsToUpdate.length > 0) {
220
+ await recordManager.update(docsToUpdate, { timeAtLeast: indexStartDt });
221
+ numSkipped += docsToUpdate.length;
222
+ }
223
+ if (docsToIndex.length > 0) {
224
+ await vectorStore.addDocuments(docsToIndex, { ids: uids });
225
+ numAdded += docsToIndex.length - seenDocs.size;
226
+ numUpdated += seenDocs.size;
227
+ }
228
+ await recordManager.update(hashedDocs.map((doc) => doc.uid), { timeAtLeast: indexStartDt, groupIds: sourceIds });
229
+ if (cleanup === "incremental") {
230
+ sourceIds.forEach((sourceId) => {
231
+ if (!sourceId)
232
+ throw new Error("Source id cannot be null");
233
+ });
234
+ const uidsToDelete = await recordManager.listKeys({
235
+ before: indexStartDt,
236
+ groupIds: sourceIds,
237
+ });
238
+ await vectorStore.delete({ ids: uidsToDelete });
239
+ await recordManager.deleteKeys(uidsToDelete);
240
+ numDeleted += uidsToDelete.length;
241
+ }
242
+ }
243
+ if (cleanup === "full") {
244
+ let uidsToDelete = await recordManager.listKeys({
245
+ before: indexStartDt,
246
+ limit: cleanupBatchSize,
247
+ });
248
+ while (uidsToDelete.length > 0) {
249
+ await vectorStore.delete({ ids: uidsToDelete });
250
+ await recordManager.deleteKeys(uidsToDelete);
251
+ numDeleted += uidsToDelete.length;
252
+ uidsToDelete = await recordManager.listKeys({
253
+ before: indexStartDt,
254
+ limit: cleanupBatchSize,
255
+ });
256
+ }
257
+ }
258
+ return {
259
+ numAdded,
260
+ numDeleted,
261
+ numUpdated,
262
+ numSkipped,
263
+ };
264
+ }
265
+ exports.index = index;
@@ -0,0 +1,75 @@
1
+ import { VectorStore } from "@langchain/core/vectorstores";
2
+ import { RecordManagerInterface } from "@langchain/community/indexes/base";
3
+ import { DocumentInterface } from "@langchain/core/documents";
4
+ import { BaseDocumentLoader } from "../document_loaders/base.js";
5
+ type IndexingResult = {
6
+ numAdded: number;
7
+ numDeleted: number;
8
+ numUpdated: number;
9
+ numSkipped: number;
10
+ };
11
+ type StringOrDocFunc = string | ((doc: DocumentInterface) => string);
12
+ export type CleanupMode = "full" | "incremental";
13
+ export type IndexOptions = {
14
+ /**
15
+ * The number of documents to index in one batch.
16
+ */
17
+ batchSize?: number;
18
+ /**
19
+ * The cleanup mode to use. Can be "full", "incremental" or undefined.
20
+ * - **Incremental**: Cleans up all documents that haven't been updated AND
21
+ * that are associated with source ids that were seen
22
+ * during indexing.
23
+ * Clean up is done continuously during indexing helping
24
+ * to minimize the probability of users seeing duplicated
25
+ * content.
26
+ * - **Full**: Delete all documents that haven to been returned by the loader.
27
+ * Clean up runs after all documents have been indexed.
28
+ * This means that users may see duplicated content during indexing.
29
+ * - **undefined**: Do not delete any documents.
30
+ */
31
+ cleanup?: CleanupMode;
32
+ /**
33
+ * Optional key that helps identify the original source of the document.
34
+ * Must either be a string representing the key of the source in the metadata
35
+ * or a function that takes a document and returns a string representing the source.
36
+ * **Required when cleanup is incremental**.
37
+ */
38
+ sourceIdKey?: StringOrDocFunc;
39
+ /**
40
+ * Batch size to use when cleaning up documents.
41
+ */
42
+ cleanupBatchSize?: number;
43
+ /**
44
+ * Force update documents even if they are present in the
45
+ * record manager. Useful if you are re-indexing with updated embeddings.
46
+ */
47
+ forceUpdate?: boolean;
48
+ };
49
+ interface IndexArgs {
50
+ docsSource: BaseDocumentLoader | DocumentInterface[];
51
+ recordManager: RecordManagerInterface;
52
+ vectorStore: VectorStore;
53
+ options?: IndexOptions;
54
+ }
55
+ /**
56
+ * Index data from the doc source into the vector store.
57
+ *
58
+ * Indexing functionality uses a manager to keep track of which documents
59
+ * are in the vector store.
60
+ *
61
+ * This allows us to keep track of which documents were updated, and which
62
+ * documents were deleted, which documents should be skipped.
63
+ *
64
+ * For the time being, documents are indexed using their hashes, and users
65
+ * are not able to specify the uid of the document.
66
+ *
67
+ * @param {IndexArgs} args
68
+ * @param {BaseDocumentLoader | DocumentInterface[]} args.docsSource The source of documents to index. Can be a DocumentLoader or a list of Documents.
69
+ * @param {RecordManagerInterface} args.recordManager The record manager to use for keeping track of indexed documents.
70
+ * @param {VectorStore} args.vectorStore The vector store to use for storing the documents.
71
+ * @param {IndexOptions | undefined} args.options Options for indexing.
72
+ * @returns {Promise<IndexingResult>}
73
+ */
74
+ export declare function index(args: IndexArgs): Promise<IndexingResult>;
75
+ export {};