langchain 0.0.178 → 0.0.180
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/chains/combine_documents/reduce.cjs +1 -0
- package/chains/combine_documents/reduce.d.ts +1 -0
- package/chains/combine_documents/reduce.js +1 -0
- package/chat_models/bedrock/web.cjs +1 -0
- package/chat_models/bedrock/web.d.ts +1 -0
- package/chat_models/bedrock/web.js +1 -0
- package/chat_models/bedrock.cjs +1 -1
- package/chat_models/bedrock.d.ts +1 -1
- package/chat_models/bedrock.js +1 -1
- package/dist/cache/base.d.ts +1 -1
- package/dist/callbacks/index.d.ts +1 -1
- package/dist/chains/combine_documents/reduce.cjs +69 -0
- package/dist/chains/combine_documents/reduce.d.ts +28 -0
- package/dist/chains/combine_documents/reduce.js +64 -0
- package/dist/chat_models/baiduwenxin.cjs +16 -2
- package/dist/chat_models/baiduwenxin.js +16 -2
- package/dist/chat_models/bedrock/index.cjs +24 -0
- package/dist/chat_models/bedrock/index.d.ts +12 -0
- package/dist/chat_models/bedrock/index.js +18 -0
- package/dist/chat_models/{bedrock.cjs → bedrock/web.cjs} +44 -15
- package/dist/chat_models/{bedrock.d.ts → bedrock/web.d.ts} +14 -5
- package/dist/chat_models/{bedrock.js → bedrock/web.js} +42 -13
- package/dist/chat_models/iflytek_xinghuo/index.cjs +1 -1
- package/dist/chat_models/iflytek_xinghuo/index.js +1 -1
- package/dist/llms/bedrock/index.cjs +17 -0
- package/dist/llms/bedrock/index.d.ts +7 -0
- package/dist/llms/bedrock/index.js +13 -0
- package/dist/llms/{bedrock.cjs → bedrock/web.cjs} +46 -12
- package/dist/llms/{bedrock.d.ts → bedrock/web.d.ts} +17 -4
- package/dist/llms/{bedrock.js → bedrock/web.js} +46 -12
- package/dist/load/import_constants.cjs +3 -0
- package/dist/load/import_constants.js +3 -0
- package/dist/load/import_map.cjs +4 -2
- package/dist/load/import_map.d.ts +2 -0
- package/dist/load/import_map.js +2 -0
- package/dist/output_parsers/json.cjs +77 -0
- package/dist/output_parsers/json.d.ts +1 -0
- package/dist/output_parsers/json.js +73 -0
- package/dist/output_parsers/openai_functions.cjs +37 -2
- package/dist/output_parsers/openai_functions.d.ts +10 -5
- package/dist/output_parsers/openai_functions.js +38 -3
- package/dist/schema/index.cjs +33 -1
- package/dist/schema/index.d.ts +3 -1
- package/dist/schema/index.js +31 -0
- package/dist/schema/output_parser.cjs +63 -3
- package/dist/schema/output_parser.d.ts +16 -1
- package/dist/schema/output_parser.js +59 -0
- package/dist/schema/prompt_template.cjs +33 -0
- package/dist/schema/prompt_template.d.ts +12 -0
- package/dist/schema/prompt_template.js +29 -0
- package/dist/storage/convex.d.ts +21 -0
- package/dist/stores/message/cassandra.cjs +135 -0
- package/dist/stores/message/cassandra.d.ts +44 -0
- package/dist/stores/message/cassandra.js +131 -0
- package/dist/stores/message/convex.d.ts +21 -0
- package/dist/util/bedrock.cjs +13 -1
- package/dist/util/bedrock.d.ts +5 -2
- package/dist/util/bedrock.js +13 -1
- package/dist/util/fast-json-patch/index.cjs +1 -0
- package/dist/util/fast-json-patch/index.d.ts +1 -0
- package/dist/util/fast-json-patch/index.js +1 -0
- package/dist/util/fast-json-patch/src/duplex.cjs +237 -0
- package/dist/util/fast-json-patch/src/duplex.d.ts +23 -0
- package/dist/util/fast-json-patch/src/duplex.js +230 -0
- package/dist/vectorstores/cassandra.cjs +197 -47
- package/dist/vectorstores/cassandra.d.ts +47 -4
- package/dist/vectorstores/cassandra.js +197 -47
- package/dist/vectorstores/convex.d.ts +21 -0
- package/llms/bedrock/web.cjs +1 -0
- package/llms/bedrock/web.d.ts +1 -0
- package/llms/bedrock/web.js +1 -0
- package/llms/bedrock.cjs +1 -1
- package/llms/bedrock.d.ts +1 -1
- package/llms/bedrock.js +1 -1
- package/package.json +41 -1
- package/schema/prompt_template.cjs +1 -0
- package/schema/prompt_template.d.ts +1 -0
- package/schema/prompt_template.js +1 -0
- package/stores/message/cassandra.cjs +1 -0
- package/stores/message/cassandra.d.ts +1 -0
- package/stores/message/cassandra.js +1 -0
- package/dist/schema/runnable/remote.cjs +0 -225
- package/dist/schema/runnable/remote.d.ts +0 -28
- package/dist/schema/runnable/remote.js +0 -221
|
@@ -14,19 +14,19 @@ export class CassandraStore extends VectorStore {
|
|
|
14
14
|
return "cassandra";
|
|
15
15
|
}
|
|
16
16
|
constructor(embeddings, args) {
|
|
17
|
-
|
|
18
|
-
indices: [],
|
|
19
|
-
maxConcurrency: 25,
|
|
20
|
-
batchSize: 1,
|
|
21
|
-
...args,
|
|
22
|
-
};
|
|
23
|
-
super(embeddings, argsWithDefaults);
|
|
17
|
+
super(embeddings, args);
|
|
24
18
|
Object.defineProperty(this, "client", {
|
|
25
19
|
enumerable: true,
|
|
26
20
|
configurable: true,
|
|
27
21
|
writable: true,
|
|
28
22
|
value: void 0
|
|
29
23
|
});
|
|
24
|
+
Object.defineProperty(this, "vectorType", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value: void 0
|
|
29
|
+
});
|
|
30
30
|
Object.defineProperty(this, "dimensions", {
|
|
31
31
|
enumerable: true,
|
|
32
32
|
configurable: true,
|
|
@@ -51,6 +51,18 @@ export class CassandraStore extends VectorStore {
|
|
|
51
51
|
writable: true,
|
|
52
52
|
value: void 0
|
|
53
53
|
});
|
|
54
|
+
Object.defineProperty(this, "withClause", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
configurable: true,
|
|
57
|
+
writable: true,
|
|
58
|
+
value: void 0
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(this, "selectColumns", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
configurable: true,
|
|
63
|
+
writable: true,
|
|
64
|
+
value: void 0
|
|
65
|
+
});
|
|
54
66
|
Object.defineProperty(this, "table", {
|
|
55
67
|
enumerable: true,
|
|
56
68
|
configurable: true,
|
|
@@ -81,19 +93,27 @@ export class CassandraStore extends VectorStore {
|
|
|
81
93
|
writable: true,
|
|
82
94
|
value: void 0
|
|
83
95
|
});
|
|
84
|
-
|
|
96
|
+
const { indices = [], maxConcurrency = 25, withClause = "", batchSize = 1, vectorType = "cosine", dimensions, keyspace, table, primaryKey, metadataColumns, } = args;
|
|
97
|
+
const argsWithDefaults = {
|
|
98
|
+
...args,
|
|
99
|
+
indices,
|
|
100
|
+
maxConcurrency,
|
|
101
|
+
withClause,
|
|
102
|
+
batchSize,
|
|
103
|
+
vectorType,
|
|
104
|
+
};
|
|
105
|
+
this.asyncCaller = new AsyncCaller(argsWithDefaults);
|
|
85
106
|
this.client = new CassandraClient(argsWithDefaults);
|
|
86
|
-
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
this.
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
107
|
+
// Assign properties
|
|
108
|
+
this.vectorType = vectorType;
|
|
109
|
+
this.dimensions = dimensions;
|
|
110
|
+
this.keyspace = keyspace;
|
|
111
|
+
this.table = table;
|
|
112
|
+
this.primaryKey = Array.isArray(primaryKey) ? primaryKey : [primaryKey];
|
|
113
|
+
this.metadataColumns = metadataColumns;
|
|
114
|
+
this.withClause = withClause.trim().replace(/^with\s*/i, "");
|
|
115
|
+
this.indices = indices;
|
|
116
|
+
this.batchSize = batchSize >= 1 ? batchSize : 1;
|
|
97
117
|
}
|
|
98
118
|
/**
|
|
99
119
|
* Method to save vectors to the Cassandra database.
|
|
@@ -129,16 +149,45 @@ export class CassandraStore extends VectorStore {
|
|
|
129
149
|
if (!this.isInitialized) {
|
|
130
150
|
await this.initialize();
|
|
131
151
|
}
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
|
|
152
|
+
// Ensure we have an array of Filter from the public interface
|
|
153
|
+
const filters = this.asFilters(filter);
|
|
154
|
+
const queryStr = this.buildSearchQuery(filters);
|
|
155
|
+
// Search query will be of format:
|
|
156
|
+
// SELECT ..., text, similarity_x(?) AS similarity_score
|
|
157
|
+
// FROM ...
|
|
158
|
+
// <WHERE ...>
|
|
159
|
+
// ORDER BY vector ANN OF ?
|
|
160
|
+
// LIMIT ?
|
|
161
|
+
// If any filter values are specified, they will be in the WHERE clause as
|
|
162
|
+
// filter.name filter.operator ?
|
|
163
|
+
// queryParams is a list of bind variables sent with the prepared statement
|
|
164
|
+
const queryParams = [];
|
|
165
|
+
const vectorAsFloat32Array = new Float32Array(query);
|
|
166
|
+
queryParams.push(vectorAsFloat32Array);
|
|
167
|
+
if (filters) {
|
|
168
|
+
const values = filters.map(({ value }) => value);
|
|
169
|
+
queryParams.push(...values);
|
|
170
|
+
}
|
|
171
|
+
queryParams.push(vectorAsFloat32Array);
|
|
172
|
+
queryParams.push(k);
|
|
173
|
+
const queryResultSet = await this.client.execute(queryStr, queryParams, {
|
|
174
|
+
prepare: true,
|
|
175
|
+
});
|
|
176
|
+
return queryResultSet?.rows.map((row) => {
|
|
135
177
|
const textContent = row.text;
|
|
136
|
-
const sanitizedRow =
|
|
137
|
-
delete sanitizedRow.vector;
|
|
178
|
+
const sanitizedRow = { ...row };
|
|
138
179
|
delete sanitizedRow.text;
|
|
180
|
+
delete sanitizedRow.similarity_score;
|
|
181
|
+
// A null value in Cassandra evaluates to a deleted column
|
|
182
|
+
// as this is treated as a tombstone record for the cell.
|
|
183
|
+
Object.keys(sanitizedRow).forEach((key) => {
|
|
184
|
+
if (sanitizedRow[key] === null) {
|
|
185
|
+
delete sanitizedRow[key];
|
|
186
|
+
}
|
|
187
|
+
});
|
|
139
188
|
return [
|
|
140
189
|
new Document({ pageContent: textContent, metadata: sanitizedRow }),
|
|
141
|
-
|
|
190
|
+
row.similarity_score,
|
|
142
191
|
];
|
|
143
192
|
});
|
|
144
193
|
}
|
|
@@ -191,41 +240,142 @@ export class CassandraStore extends VectorStore {
|
|
|
191
240
|
* @returns Promise that resolves when the database has been initialized.
|
|
192
241
|
*/
|
|
193
242
|
async initialize() {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
243
|
+
let cql = "";
|
|
244
|
+
cql = `CREATE TABLE IF NOT EXISTS ${this.keyspace}.${this.table} (
|
|
245
|
+
${this.primaryKey.map((col) => `${col.name} ${col.type}`).join(", ")}
|
|
246
|
+
, text TEXT
|
|
197
247
|
${this.metadataColumns.length > 0
|
|
198
|
-
?
|
|
248
|
+
? ", " +
|
|
249
|
+
this.metadataColumns
|
|
250
|
+
.map((col) => `${col.name} ${col.type}`)
|
|
251
|
+
.join(", ")
|
|
199
252
|
: ""}
|
|
200
|
-
vector VECTOR<FLOAT, ${this.dimensions}>
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
253
|
+
, vector VECTOR<FLOAT, ${this.dimensions}>
|
|
254
|
+
, ${this.buildPrimaryKey(this.primaryKey)}
|
|
255
|
+
) ${this.withClause ? `WITH ${this.withClause}` : ""};`;
|
|
256
|
+
await this.client.execute(cql);
|
|
257
|
+
this.selectColumns = `${this.primaryKey
|
|
258
|
+
.map((col) => `${col.name}`)
|
|
259
|
+
.join(", ")}
|
|
260
|
+
${this.metadataColumns.length > 0
|
|
261
|
+
? ", " +
|
|
262
|
+
this.metadataColumns
|
|
263
|
+
.map((col) => `${col.name}`)
|
|
264
|
+
.join(", ")
|
|
265
|
+
: ""}`;
|
|
266
|
+
cql = `CREATE CUSTOM INDEX IF NOT EXISTS idx_vector_${this.table}
|
|
267
|
+
ON ${this.keyspace}.${this.table}(vector) USING 'StorageAttachedIndex' WITH OPTIONS = {'similarity_function': '${this.vectorType.toUpperCase()}'};`;
|
|
268
|
+
await this.client.execute(cql);
|
|
205
269
|
for await (const { name, value } of this.indices) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
270
|
+
cql = `CREATE CUSTOM INDEX IF NOT EXISTS idx_${this.table}_${name}
|
|
271
|
+
ON ${this.keyspace}.${this.table} ${value} USING 'StorageAttachedIndex';`;
|
|
272
|
+
await this.client.execute(cql);
|
|
209
273
|
}
|
|
210
274
|
this.isInitialized = true;
|
|
211
275
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
276
|
+
/**
|
|
277
|
+
* Method to build the PRIMARY KEY clause for CREATE TABLE.
|
|
278
|
+
* @param columns: list of Column to include in the key
|
|
279
|
+
* @returns The clause, including PRIMARY KEY
|
|
280
|
+
*/
|
|
281
|
+
buildPrimaryKey(columns) {
|
|
282
|
+
// Partition columns may be specified with optional attribute col.partition
|
|
283
|
+
const partitionColumns = columns
|
|
284
|
+
.filter((col) => col.partition)
|
|
285
|
+
.map((col) => col.name)
|
|
286
|
+
.join(", ");
|
|
287
|
+
// All columns not part of the partition key are clustering columns
|
|
288
|
+
const clusteringColumns = columns
|
|
289
|
+
.filter((col) => !col.partition)
|
|
290
|
+
.map((col) => col.name)
|
|
291
|
+
.join(", ");
|
|
292
|
+
let primaryKey = "";
|
|
293
|
+
// If partition columns are specified, they are included in a () wrapper
|
|
294
|
+
// If not, the clustering columns are used, and the first clustering column
|
|
295
|
+
// is the partition key per normal Cassandra behaviour.
|
|
296
|
+
if (partitionColumns) {
|
|
297
|
+
primaryKey = `PRIMARY KEY ((${partitionColumns}), ${clusteringColumns})`;
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
primaryKey = `PRIMARY KEY (${clusteringColumns})`;
|
|
301
|
+
}
|
|
302
|
+
return primaryKey;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Type guard to check if an object is a Filter.
|
|
306
|
+
* @param obj: the object to check
|
|
307
|
+
* @returns boolean indicating if the object is a Filter
|
|
308
|
+
*/
|
|
309
|
+
isFilter(obj) {
|
|
310
|
+
return (typeof obj === "object" && obj !== null && "name" in obj && "value" in obj);
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Helper to convert Record<string,unknown> to a Filter[]
|
|
314
|
+
* @param record: a key-value Record collection
|
|
315
|
+
* @returns Record as a Filter[]
|
|
316
|
+
*/
|
|
317
|
+
convertToFilters(record) {
|
|
318
|
+
return Object.entries(record).map(([name, value]) => ({
|
|
319
|
+
name,
|
|
320
|
+
value,
|
|
321
|
+
operator: "=",
|
|
322
|
+
}));
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Input santisation method for filters, as FilterType is not required to be
|
|
326
|
+
* Filter[], but we want to use Filter[] internally.
|
|
327
|
+
* @param record: the proposed filter
|
|
328
|
+
* @returns A Filter[], which may be empty
|
|
329
|
+
*/
|
|
330
|
+
asFilters(record) {
|
|
331
|
+
if (!record) {
|
|
332
|
+
return [];
|
|
333
|
+
}
|
|
334
|
+
// If record is already an array
|
|
335
|
+
if (Array.isArray(record)) {
|
|
336
|
+
return record.flatMap((item) => {
|
|
337
|
+
// Check if item is a Filter before passing it to convertToFilters
|
|
338
|
+
if (this.isFilter(item)) {
|
|
339
|
+
return [item];
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
// Here item is treated as Record<string, unknown>
|
|
343
|
+
return this.convertToFilters(item);
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
// If record is a single Filter object, return it in an array
|
|
348
|
+
if (this.isFilter(record)) {
|
|
349
|
+
return [record];
|
|
350
|
+
}
|
|
351
|
+
// If record is a Record<string, unknown>, convert it to an array of Filter
|
|
352
|
+
return this.convertToFilters(record);
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Method to build the WHERE clause of a CQL query, using bind variable ?
|
|
356
|
+
* @param filters list of filters to include in the WHERE clause
|
|
357
|
+
* @returns The WHERE clause
|
|
358
|
+
*/
|
|
359
|
+
buildWhereClause(filters) {
|
|
360
|
+
if (!filters || filters.length === 0) {
|
|
361
|
+
return "";
|
|
362
|
+
}
|
|
363
|
+
const whereConditions = filters.map(({ name, operator = "=" }) => `${name} ${operator} ?`);
|
|
364
|
+
return `WHERE ${whereConditions.join(" AND ")}`;
|
|
217
365
|
}
|
|
218
366
|
/**
|
|
219
367
|
* Method to build an CQL query for searching for similar vectors in the
|
|
220
368
|
* Cassandra database.
|
|
221
369
|
* @param query The query vector.
|
|
222
370
|
* @param k The number of similar vectors to return.
|
|
223
|
-
* @param
|
|
371
|
+
* @param filters
|
|
224
372
|
* @returns The CQL query string.
|
|
225
373
|
*/
|
|
226
|
-
buildSearchQuery(
|
|
227
|
-
const whereClause =
|
|
228
|
-
|
|
374
|
+
buildSearchQuery(filters) {
|
|
375
|
+
const whereClause = filters ? this.buildWhereClause(filters) : "";
|
|
376
|
+
const cqlQuery = `SELECT ${this.selectColumns}, text, similarity_${this.vectorType}(vector, ?) AS similarity_score
|
|
377
|
+
FROM ${this.keyspace}.${this.table} ${whereClause} ORDER BY vector ANN OF ? LIMIT ?`;
|
|
378
|
+
return cqlQuery;
|
|
229
379
|
}
|
|
230
380
|
/**
|
|
231
381
|
* Method for inserting vectors and documents into the Cassandra database in a batch.
|
|
@@ -253,7 +403,7 @@ export class CassandraStore extends VectorStore {
|
|
|
253
403
|
const metadataInsert = metadataColNames.length > 0 ? ", " + metadataColNames.join(", ") : "";
|
|
254
404
|
// Construct the query string and parameters
|
|
255
405
|
const query = {
|
|
256
|
-
query: `INSERT INTO ${this.keyspace}.${this.table} (vector, text${metadataInsert})
|
|
406
|
+
query: `INSERT INTO ${this.keyspace}.${this.table} (vector, text${metadataInsert})
|
|
257
407
|
VALUES (?, ?${", ?".repeat(metadataColNames.length)})`,
|
|
258
408
|
params: [preparedVector, document.pageContent, ...metadataVals],
|
|
259
409
|
};
|
|
@@ -14,12 +14,33 @@ export type ConvexVectorStoreConfig<DataModel extends GenericDataModel, TableNam
|
|
|
14
14
|
id: string;
|
|
15
15
|
}, object | null>> = {
|
|
16
16
|
readonly ctx: GenericActionCtx<DataModel>;
|
|
17
|
+
/**
|
|
18
|
+
* Defaults to "documents"
|
|
19
|
+
*/
|
|
17
20
|
readonly table?: TableName;
|
|
21
|
+
/**
|
|
22
|
+
* Defaults to "byEmbedding"
|
|
23
|
+
*/
|
|
18
24
|
readonly index?: IndexName;
|
|
25
|
+
/**
|
|
26
|
+
* Defaults to "text"
|
|
27
|
+
*/
|
|
19
28
|
readonly textField?: TextFieldName;
|
|
29
|
+
/**
|
|
30
|
+
* Defaults to "embedding"
|
|
31
|
+
*/
|
|
20
32
|
readonly embeddingField?: EmbeddingFieldName;
|
|
33
|
+
/**
|
|
34
|
+
* Defaults to "metadata"
|
|
35
|
+
*/
|
|
21
36
|
readonly metadataField?: MetadataFieldName;
|
|
37
|
+
/**
|
|
38
|
+
* Defaults to `internal.langchain.db.insert`
|
|
39
|
+
*/
|
|
22
40
|
readonly insert?: InsertMutation;
|
|
41
|
+
/**
|
|
42
|
+
* Defaults to `internal.langchain.db.get`
|
|
43
|
+
*/
|
|
23
44
|
readonly get?: GetQuery;
|
|
24
45
|
};
|
|
25
46
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/llms/bedrock/web.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/llms/bedrock/web.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/llms/bedrock/web.js'
|
package/llms/bedrock.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('../dist/llms/bedrock.cjs');
|
|
1
|
+
module.exports = require('../dist/llms/bedrock/index.cjs');
|
package/llms/bedrock.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../dist/llms/bedrock.js'
|
|
1
|
+
export * from '../dist/llms/bedrock/index.js'
|
package/llms/bedrock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../dist/llms/bedrock.js'
|
|
1
|
+
export * from '../dist/llms/bedrock/index.js'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langchain",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.180",
|
|
4
4
|
"description": "Typescript bindings for langchain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -82,6 +82,9 @@
|
|
|
82
82
|
"chains.cjs",
|
|
83
83
|
"chains.js",
|
|
84
84
|
"chains.d.ts",
|
|
85
|
+
"chains/combine_documents/reduce.cjs",
|
|
86
|
+
"chains/combine_documents/reduce.js",
|
|
87
|
+
"chains/combine_documents/reduce.d.ts",
|
|
85
88
|
"chains/load.cjs",
|
|
86
89
|
"chains/load.js",
|
|
87
90
|
"chains/load.d.ts",
|
|
@@ -196,6 +199,9 @@
|
|
|
196
199
|
"llms/bedrock.cjs",
|
|
197
200
|
"llms/bedrock.js",
|
|
198
201
|
"llms/bedrock.d.ts",
|
|
202
|
+
"llms/bedrock/web.cjs",
|
|
203
|
+
"llms/bedrock/web.js",
|
|
204
|
+
"llms/bedrock/web.d.ts",
|
|
199
205
|
"llms/llama_cpp.cjs",
|
|
200
206
|
"llms/llama_cpp.js",
|
|
201
207
|
"llms/llama_cpp.d.ts",
|
|
@@ -478,6 +484,9 @@
|
|
|
478
484
|
"chat_models/bedrock.cjs",
|
|
479
485
|
"chat_models/bedrock.js",
|
|
480
486
|
"chat_models/bedrock.d.ts",
|
|
487
|
+
"chat_models/bedrock/web.cjs",
|
|
488
|
+
"chat_models/bedrock/web.js",
|
|
489
|
+
"chat_models/bedrock/web.d.ts",
|
|
481
490
|
"chat_models/cloudflare_workersai.cjs",
|
|
482
491
|
"chat_models/cloudflare_workersai.js",
|
|
483
492
|
"chat_models/cloudflare_workersai.d.ts",
|
|
@@ -526,6 +535,9 @@
|
|
|
526
535
|
"schema/output_parser.cjs",
|
|
527
536
|
"schema/output_parser.js",
|
|
528
537
|
"schema/output_parser.d.ts",
|
|
538
|
+
"schema/prompt_template.cjs",
|
|
539
|
+
"schema/prompt_template.js",
|
|
540
|
+
"schema/prompt_template.d.ts",
|
|
529
541
|
"schema/query_constructor.cjs",
|
|
530
542
|
"schema/query_constructor.js",
|
|
531
543
|
"schema/query_constructor.d.ts",
|
|
@@ -658,6 +670,9 @@
|
|
|
658
670
|
"stores/file/node.cjs",
|
|
659
671
|
"stores/file/node.js",
|
|
660
672
|
"stores/file/node.d.ts",
|
|
673
|
+
"stores/message/cassandra.cjs",
|
|
674
|
+
"stores/message/cassandra.js",
|
|
675
|
+
"stores/message/cassandra.d.ts",
|
|
661
676
|
"stores/message/convex.cjs",
|
|
662
677
|
"stores/message/convex.js",
|
|
663
678
|
"stores/message/convex.d.ts",
|
|
@@ -1491,6 +1506,11 @@
|
|
|
1491
1506
|
"import": "./chains.js",
|
|
1492
1507
|
"require": "./chains.cjs"
|
|
1493
1508
|
},
|
|
1509
|
+
"./chains/combine_documents/reduce": {
|
|
1510
|
+
"types": "./chains/combine_documents/reduce.d.ts",
|
|
1511
|
+
"import": "./chains/combine_documents/reduce.js",
|
|
1512
|
+
"require": "./chains/combine_documents/reduce.cjs"
|
|
1513
|
+
},
|
|
1494
1514
|
"./chains/load": {
|
|
1495
1515
|
"types": "./chains/load.d.ts",
|
|
1496
1516
|
"import": "./chains/load.js",
|
|
@@ -1681,6 +1701,11 @@
|
|
|
1681
1701
|
"import": "./llms/bedrock.js",
|
|
1682
1702
|
"require": "./llms/bedrock.cjs"
|
|
1683
1703
|
},
|
|
1704
|
+
"./llms/bedrock/web": {
|
|
1705
|
+
"types": "./llms/bedrock/web.d.ts",
|
|
1706
|
+
"import": "./llms/bedrock/web.js",
|
|
1707
|
+
"require": "./llms/bedrock/web.cjs"
|
|
1708
|
+
},
|
|
1684
1709
|
"./llms/llama_cpp": {
|
|
1685
1710
|
"types": "./llms/llama_cpp.d.ts",
|
|
1686
1711
|
"import": "./llms/llama_cpp.js",
|
|
@@ -2151,6 +2176,11 @@
|
|
|
2151
2176
|
"import": "./chat_models/bedrock.js",
|
|
2152
2177
|
"require": "./chat_models/bedrock.cjs"
|
|
2153
2178
|
},
|
|
2179
|
+
"./chat_models/bedrock/web": {
|
|
2180
|
+
"types": "./chat_models/bedrock/web.d.ts",
|
|
2181
|
+
"import": "./chat_models/bedrock/web.js",
|
|
2182
|
+
"require": "./chat_models/bedrock/web.cjs"
|
|
2183
|
+
},
|
|
2154
2184
|
"./chat_models/cloudflare_workersai": {
|
|
2155
2185
|
"types": "./chat_models/cloudflare_workersai.d.ts",
|
|
2156
2186
|
"import": "./chat_models/cloudflare_workersai.js",
|
|
@@ -2231,6 +2261,11 @@
|
|
|
2231
2261
|
"import": "./schema/output_parser.js",
|
|
2232
2262
|
"require": "./schema/output_parser.cjs"
|
|
2233
2263
|
},
|
|
2264
|
+
"./schema/prompt_template": {
|
|
2265
|
+
"types": "./schema/prompt_template.d.ts",
|
|
2266
|
+
"import": "./schema/prompt_template.js",
|
|
2267
|
+
"require": "./schema/prompt_template.cjs"
|
|
2268
|
+
},
|
|
2234
2269
|
"./schema/query_constructor": {
|
|
2235
2270
|
"types": "./schema/query_constructor.d.ts",
|
|
2236
2271
|
"import": "./schema/query_constructor.js",
|
|
@@ -2451,6 +2486,11 @@
|
|
|
2451
2486
|
"import": "./stores/file/node.js",
|
|
2452
2487
|
"require": "./stores/file/node.cjs"
|
|
2453
2488
|
},
|
|
2489
|
+
"./stores/message/cassandra": {
|
|
2490
|
+
"types": "./stores/message/cassandra.d.ts",
|
|
2491
|
+
"import": "./stores/message/cassandra.js",
|
|
2492
|
+
"require": "./stores/message/cassandra.cjs"
|
|
2493
|
+
},
|
|
2454
2494
|
"./stores/message/convex": {
|
|
2455
2495
|
"types": "./stores/message/convex.d.ts",
|
|
2456
2496
|
"import": "./stores/message/convex.js",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/schema/prompt_template.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/schema/prompt_template.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/schema/prompt_template.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/stores/message/cassandra.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/stores/message/cassandra.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/stores/message/cassandra.js'
|