@langchain/core 0.1.46 → 0.1.47

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.
@@ -39,15 +39,15 @@ class BaseLLMOutputParser extends index_js_1.Runnable {
39
39
  */
40
40
  async invoke(input, options) {
41
41
  if (typeof input === "string") {
42
- return this._callWithConfig(async (input) => this.parseResult([{ text: input }]), input, { ...options, runType: "parser" });
42
+ return this._callWithConfig(async (input, options) => this.parseResult([{ text: input }], options?.callbacks), input, { ...options, runType: "parser" });
43
43
  }
44
44
  else {
45
- return this._callWithConfig(async (input) => this.parseResult([
45
+ return this._callWithConfig(async (input, options) => this.parseResult([
46
46
  {
47
47
  message: input,
48
48
  text: this._baseMessageToString(input),
49
49
  },
50
- ]), input, { ...options, runType: "parser" });
50
+ ], options?.callbacks), input, { ...options, runType: "parser" });
51
51
  }
52
52
  }
53
53
  }
@@ -36,15 +36,15 @@ export class BaseLLMOutputParser extends Runnable {
36
36
  */
37
37
  async invoke(input, options) {
38
38
  if (typeof input === "string") {
39
- return this._callWithConfig(async (input) => this.parseResult([{ text: input }]), input, { ...options, runType: "parser" });
39
+ return this._callWithConfig(async (input, options) => this.parseResult([{ text: input }], options?.callbacks), input, { ...options, runType: "parser" });
40
40
  }
41
41
  else {
42
- return this._callWithConfig(async (input) => this.parseResult([
42
+ return this._callWithConfig(async (input, options) => this.parseResult([
43
43
  {
44
44
  message: input,
45
45
  text: this._baseMessageToString(input),
46
46
  },
47
- ]), input, { ...options, runType: "parser" });
47
+ ], options?.callbacks), input, { ...options, runType: "parser" });
48
48
  }
49
49
  }
50
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/core",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "Core LangChain.js abstractions and schemas",
5
5
  "type": "module",
6
6
  "engines": {