@langchain/core 0.1.35 → 0.1.36
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/runnables/base.cjs +13 -6
- package/dist/runnables/base.js +13 -6
- package/package.json +2 -2
package/dist/runnables/base.cjs
CHANGED
|
@@ -1283,17 +1283,24 @@ class RunnableLambda extends Runnable {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
async _invoke(input, config, runManager) {
|
|
1285
1285
|
return new Promise((resolve, reject) => {
|
|
1286
|
-
|
|
1286
|
+
const childConfig = (0, config_js_1.patchConfig)(config, {
|
|
1287
|
+
callbacks: runManager?.getChild(),
|
|
1288
|
+
recursionLimit: (config?.recursionLimit ?? config_js_1.DEFAULT_RECURSION_LIMIT) - 1,
|
|
1289
|
+
});
|
|
1290
|
+
void index_js_1.AsyncLocalStorageProviderSingleton.getInstance().run(childConfig, async () => {
|
|
1287
1291
|
try {
|
|
1288
|
-
let output = await this.func(input, {
|
|
1292
|
+
let output = await this.func(input, {
|
|
1293
|
+
...childConfig,
|
|
1294
|
+
config: childConfig,
|
|
1295
|
+
});
|
|
1289
1296
|
if (output && Runnable.isRunnable(output)) {
|
|
1290
1297
|
if (config?.recursionLimit === 0) {
|
|
1291
1298
|
throw new Error("Recursion limit reached.");
|
|
1292
1299
|
}
|
|
1293
|
-
output = await output.invoke(input,
|
|
1294
|
-
|
|
1295
|
-
recursionLimit: (
|
|
1296
|
-
})
|
|
1300
|
+
output = await output.invoke(input, {
|
|
1301
|
+
...childConfig,
|
|
1302
|
+
recursionLimit: (childConfig.recursionLimit ?? config_js_1.DEFAULT_RECURSION_LIMIT) - 1,
|
|
1303
|
+
});
|
|
1297
1304
|
}
|
|
1298
1305
|
resolve(output);
|
|
1299
1306
|
}
|
package/dist/runnables/base.js
CHANGED
|
@@ -1270,17 +1270,24 @@ export class RunnableLambda extends Runnable {
|
|
|
1270
1270
|
}
|
|
1271
1271
|
async _invoke(input, config, runManager) {
|
|
1272
1272
|
return new Promise((resolve, reject) => {
|
|
1273
|
-
|
|
1273
|
+
const childConfig = patchConfig(config, {
|
|
1274
|
+
callbacks: runManager?.getChild(),
|
|
1275
|
+
recursionLimit: (config?.recursionLimit ?? DEFAULT_RECURSION_LIMIT) - 1,
|
|
1276
|
+
});
|
|
1277
|
+
void AsyncLocalStorageProviderSingleton.getInstance().run(childConfig, async () => {
|
|
1274
1278
|
try {
|
|
1275
|
-
let output = await this.func(input, {
|
|
1279
|
+
let output = await this.func(input, {
|
|
1280
|
+
...childConfig,
|
|
1281
|
+
config: childConfig,
|
|
1282
|
+
});
|
|
1276
1283
|
if (output && Runnable.isRunnable(output)) {
|
|
1277
1284
|
if (config?.recursionLimit === 0) {
|
|
1278
1285
|
throw new Error("Recursion limit reached.");
|
|
1279
1286
|
}
|
|
1280
|
-
output = await output.invoke(input,
|
|
1281
|
-
|
|
1282
|
-
recursionLimit: (
|
|
1283
|
-
})
|
|
1287
|
+
output = await output.invoke(input, {
|
|
1288
|
+
...childConfig,
|
|
1289
|
+
recursionLimit: (childConfig.recursionLimit ?? DEFAULT_RECURSION_LIMIT) - 1,
|
|
1290
|
+
});
|
|
1284
1291
|
}
|
|
1285
1292
|
resolve(output);
|
|
1286
1293
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
4
4
|
"description": "Core LangChain.js abstractions and schemas",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"camelcase": "6",
|
|
44
44
|
"decamelize": "1.2.0",
|
|
45
45
|
"js-tiktoken": "^1.0.8",
|
|
46
|
-
"langsmith": "~0.1.
|
|
46
|
+
"langsmith": "~0.1.7",
|
|
47
47
|
"ml-distance": "^4.0.0",
|
|
48
48
|
"p-queue": "^6.6.2",
|
|
49
49
|
"p-retry": "4",
|