@langchain/core 0.3.69 → 0.3.71-rc.0

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.
@@ -430,11 +430,13 @@ class _StringImageMessagePromptTemplate extends BaseMessagePromptTemplate {
430
430
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
431
431
  additionalContentFields = prompt.additionalContentFields;
432
432
  }
433
- content.push({
434
- ...additionalContentFields,
435
- type: "text",
436
- text: formatted,
437
- });
433
+ if (formatted !== "") {
434
+ content.push({
435
+ ...additionalContentFields,
436
+ type: "text",
437
+ text: formatted,
438
+ });
439
+ }
438
440
  /** @TODO replace this */
439
441
  // eslint-disable-next-line no-instanceof/no-instanceof
440
442
  }
@@ -422,11 +422,13 @@ class _StringImageMessagePromptTemplate extends BaseMessagePromptTemplate {
422
422
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
423
423
  additionalContentFields = prompt.additionalContentFields;
424
424
  }
425
- content.push({
426
- ...additionalContentFields,
427
- type: "text",
428
- text: formatted,
429
- });
425
+ if (formatted !== "") {
426
+ content.push({
427
+ ...additionalContentFields,
428
+ type: "text",
429
+ text: formatted,
430
+ });
431
+ }
430
432
  /** @TODO replace this */
431
433
  // eslint-disable-next-line no-instanceof/no-instanceof
432
434
  }
@@ -68,6 +68,7 @@ class LangChainTracer extends base_js_1.BaseTracer {
68
68
  return this.runTreeMap.get(id);
69
69
  }
70
70
  updateFromRunTree(runTree) {
71
+ this.runTreeMap.set(runTree.id, runTree);
71
72
  let rootRun = runTree;
72
73
  const visited = new Set();
73
74
  while (rootRun.parent_run) {
@@ -65,6 +65,7 @@ export class LangChainTracer extends BaseTracer {
65
65
  return this.runTreeMap.get(id);
66
66
  }
67
67
  updateFromRunTree(runTree) {
68
+ this.runTreeMap.set(runTree.id, runTree);
68
69
  let rootRun = runTree;
69
70
  const visited = new Set();
70
71
  while (rootRun.parent_run) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/core",
3
- "version": "0.3.69",
3
+ "version": "0.3.71-rc.0",
4
4
  "description": "Core LangChain.js abstractions and schemas",
5
5
  "type": "module",
6
6
  "engines": {