@langchain/core 0.3.68 → 0.3.70

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
  }
@@ -415,6 +415,7 @@ function _formatToolOutput(params) {
415
415
  (Array.isArray(content) &&
416
416
  content.every((item) => typeof item === "object"))) {
417
417
  return new tool_js_1.ToolMessage({
418
+ status: "success",
418
419
  content,
419
420
  artifact,
420
421
  tool_call_id: toolCallId,
@@ -424,6 +425,7 @@ function _formatToolOutput(params) {
424
425
  }
425
426
  else {
426
427
  return new tool_js_1.ToolMessage({
428
+ status: "success",
427
429
  content: _stringify(content),
428
430
  artifact,
429
431
  tool_call_id: toolCallId,
@@ -402,6 +402,7 @@ function _formatToolOutput(params) {
402
402
  (Array.isArray(content) &&
403
403
  content.every((item) => typeof item === "object"))) {
404
404
  return new ToolMessage({
405
+ status: "success",
405
406
  content,
406
407
  artifact,
407
408
  tool_call_id: toolCallId,
@@ -411,6 +412,7 @@ function _formatToolOutput(params) {
411
412
  }
412
413
  else {
413
414
  return new ToolMessage({
415
+ status: "success",
414
416
  content: _stringify(content),
415
417
  artifact,
416
418
  tool_call_id: toolCallId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/core",
3
- "version": "0.3.68",
3
+ "version": "0.3.70",
4
4
  "description": "Core LangChain.js abstractions and schemas",
5
5
  "type": "module",
6
6
  "engines": {