@langchain/core
Advanced tools
Comparing version
@@ -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
2294038
0.06%57404
0.03%