@langchain/core 0.1.21 → 0.1.22

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.
@@ -1084,7 +1084,7 @@ class RunnableLambda extends Runnable {
1084
1084
  });
1085
1085
  }
1086
1086
  async _invoke(input, config, runManager) {
1087
- let output = await this.func(input, { config });
1087
+ let output = await this.func(input, { ...config, config });
1088
1088
  if (output && Runnable.isRunnable(output)) {
1089
1089
  if (config?.recursionLimit === 0) {
1090
1090
  throw new Error("Recursion limit reached.");
@@ -1116,7 +1116,7 @@ class RunnableLambda extends Runnable {
1116
1116
  }
1117
1117
  }
1118
1118
  }
1119
- const output = await this.func(finalChunk, { config });
1119
+ const output = await this.func(finalChunk, { ...config, config });
1120
1120
  if (output && Runnable.isRunnable(output)) {
1121
1121
  if (config?.recursionLimit === 0) {
1122
1122
  throw new Error("Recursion limit reached.");
@@ -23,11 +23,11 @@ export interface RunnableInterface<RunInput = any, RunOutput = any, CallOptions
23
23
  stream(input: RunInput, options?: Partial<CallOptions>): Promise<IterableReadableStreamInterface<RunOutput>>;
24
24
  transform(generator: AsyncGenerator<RunInput>, options: Partial<CallOptions>): AsyncGenerator<RunOutput>;
25
25
  }
26
- export type RunnableFunc<RunInput, RunOutput> = (input: RunInput, options?: {
26
+ export type RunnableFunc<RunInput, RunOutput> = (input: RunInput, options?: ({
27
27
  config?: RunnableConfig;
28
- } | Record<string, any> | (Record<string, any> & {
28
+ } & RunnableConfig) | Record<string, any> | (Record<string, any> & {
29
29
  config: RunnableConfig;
30
- })) => RunOutput | Promise<RunOutput>;
30
+ } & RunnableConfig)) => RunOutput | Promise<RunOutput>;
31
31
  export type RunnableMapLike<RunInput, RunOutput> = {
32
32
  [K in keyof RunOutput]: RunnableLike<RunInput, RunOutput[K]>;
33
33
  };
@@ -1071,7 +1071,7 @@ export class RunnableLambda extends Runnable {
1071
1071
  });
1072
1072
  }
1073
1073
  async _invoke(input, config, runManager) {
1074
- let output = await this.func(input, { config });
1074
+ let output = await this.func(input, { ...config, config });
1075
1075
  if (output && Runnable.isRunnable(output)) {
1076
1076
  if (config?.recursionLimit === 0) {
1077
1077
  throw new Error("Recursion limit reached.");
@@ -1103,7 +1103,7 @@ export class RunnableLambda extends Runnable {
1103
1103
  }
1104
1104
  }
1105
1105
  }
1106
- const output = await this.func(finalChunk, { config });
1106
+ const output = await this.func(finalChunk, { ...config, config });
1107
1107
  if (output && Runnable.isRunnable(output)) {
1108
1108
  if (config?.recursionLimit === 0) {
1109
1109
  throw new Error("Recursion limit reached.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/core",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "Core LangChain.js abstractions and schemas",
5
5
  "type": "module",
6
6
  "engines": {
@@ -12,6 +12,7 @@
12
12
  "type": "git",
13
13
  "url": "git@github.com:langchain-ai/langchainjs.git"
14
14
  },
15
+ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/langchain-core/",
15
16
  "scripts": {
16
17
  "build": "yarn clean && yarn build:esm && yarn build:cjs && yarn run build:scripts",
17
18
  "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rimraf dist/tests dist/**/tests",