🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

@langchain/core

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@langchain/core - npm Package Compare versions

Comparing version

to
0.3.52

@@ -10,3 +10,4 @@ import { z } from "zod";

import { type JSONSchema } from "../utils/json_schema.js";
export type { BaseDynamicToolInput, ContentAndArtifact, DynamicToolInput, DynamicStructuredToolInput, isLangChainTool, isRunnableToolLike, isStructuredTool, isStructuredToolParams, ResponseFormat, StructuredToolCallInput, StructuredToolInterface, StructuredToolParams, ToolInterface, ToolParams, ToolReturnType, ToolRunnableConfig, ToolInputSchemaBase as ToolSchemaBase, } from "./types.js";
export type { BaseDynamicToolInput, ContentAndArtifact, DynamicToolInput, DynamicStructuredToolInput, ResponseFormat, StructuredToolCallInput, StructuredToolInterface, StructuredToolParams, ToolInterface, ToolParams, ToolReturnType, ToolRunnableConfig, ToolInputSchemaBase as ToolSchemaBase, } from "./types.js";
export { isLangChainTool, isRunnableToolLike, isStructuredTool, isStructuredToolParams, } from "./types.js";
export { ToolInputParsingException };

@@ -13,0 +14,0 @@ /**

@@ -11,2 +11,3 @@ import { z } from "zod";

import { validatesOnlyStrings } from "../utils/json_schema.js";
export { isLangChainTool, isRunnableToolLike, isStructuredTool, isStructuredToolParams, } from "./types.js";
export { ToolInputParsingException };

@@ -13,0 +14,0 @@ /**

@@ -38,3 +38,8 @@ import { Runnable, } from "../runnables/base.js";

// eslint-disable-next-line @typescript-eslint/no-explicit-any
isZodSchema(tool.schema));
(isZodSchema(tool.schema) ||
(tool.schema != null &&
typeof tool.schema === "object" &&
"type" in tool.schema &&
typeof tool.schema.type === "string" &&
["null", "boolean", "object", "array", "number", "string"].includes(tool.schema.type))));
}

@@ -41,0 +46,0 @@ /**

{
"name": "@langchain/core",
"version": "0.3.51",
"version": "0.3.52",
"description": "Core LangChain.js abstractions and schemas",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet