From ca44bd7a14a03576aae1794cb3acc058ec3fa3c6 Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Mon, 25 Nov 2024 09:57:12 -0800 Subject: [PATCH] fix(core): Move type (#7246) --- langchain-core/src/tools/index.ts | 4 +++- langchain-core/src/types/zod.ts | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 langchain-core/src/types/zod.ts diff --git a/langchain-core/src/tools/index.ts b/langchain-core/src/tools/index.ts index 844295e605f8..348e85103904 100644 --- a/langchain-core/src/tools/index.ts +++ b/langchain-core/src/tools/index.ts @@ -16,7 +16,6 @@ import { } from "../runnables/config.js"; import type { RunnableFunc, RunnableInterface } from "../runnables/base.js"; import { ToolCall, ToolMessage } from "../messages/tool.js"; -import { ZodObjectAny } from "../types/zod.js"; import { MessageContent } from "../messages/base.js"; import { AsyncLocalStorageProviderSingleton } from "../singletons/index.js"; import { _isToolCall, ToolInputParsingException } from "./utils.js"; @@ -32,6 +31,9 @@ type ToolReturnType = any; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type ContentAndArtifact = [MessageContent, any]; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +type ZodObjectAny = z.ZodObject; + /** * Parameters for the Tool classes. */ diff --git a/langchain-core/src/types/zod.ts b/langchain-core/src/types/zod.ts deleted file mode 100644 index faaa92b3bff2..000000000000 --- a/langchain-core/src/types/zod.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { z } from "zod"; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export type ZodObjectAny = z.ZodObject;